@nukleus-sports/ui-patterns 0.0.0-stage → 0.1.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.
@@ -0,0 +1,456 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, MouseEvent } from 'react';
3
+
4
+ type EntityType = "player" | "coach" | "team" | "contact" | "company" | "agency" | "initials";
5
+ type EntityAvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
6
+ interface BaseEntityData {
7
+ first_name?: string | null;
8
+ last_name?: string | null;
9
+ player_image_url?: string | null;
10
+ coach_image_url?: string | null;
11
+ profile_image_url?: string | null;
12
+ team?: string | null;
13
+ nickname?: string | null;
14
+ team_logo_url?: string | null;
15
+ name?: string | null;
16
+ avatar_url?: string | null;
17
+ }
18
+ /**
19
+ * CSS pixel size of each avatar size step, mirroring `sizeClasses`/`contactSizeClasses` below.
20
+ * Exported so a consuming app's `resolveImageUrl` adapter can request an appropriately
21
+ * sized render (e.g. nukleus-clientapp's `sizedStorageImage(rawUrl, ENTITY_AVATAR_SIZE_PX[size], "cover")`)
22
+ * without this package needing to know about that CDN's resize API.
23
+ */
24
+ declare const ENTITY_AVATAR_SIZE_PX: Record<EntityAvatarSize, number>;
25
+ /**
26
+ * Turns a raw, possibly-relative stored image path into a renderable URL.
27
+ *
28
+ * Both source apps resolved this inline by calling Supabase-storage-specific helpers
29
+ * (`getStoragePublicUrl`, `sizedStorageImage`, cache-busting query params) straight out of
30
+ * `@/lib/image-utils`. This package has no legitimate reason to talk to Supabase or know
31
+ * about a particular CDN's URL shape, so that resolution step is lifted out to this
32
+ * injectable adapter instead of being baked into the shared component — the same
33
+ * data-arrives-through-props principle this repo already applies to page-shells.
34
+ *
35
+ * Return `null` to fall back to initials/the default placeholder image.
36
+ */
37
+ type EntityImageResolver = (rawUrl: string, context: {
38
+ entityType: EntityType;
39
+ size: EntityAvatarSize;
40
+ cacheBreaker?: string | number;
41
+ }) => string | null;
42
+ interface EntityAvatarProps {
43
+ /**
44
+ * Drives image resolution and the placeholder shown when there's no image.
45
+ * Defaults to "initials" — image when one is supplied, initials otherwise —
46
+ * which is the behaviour every plain `name` + `imageUrl` call site expects.
47
+ */
48
+ entityType?: EntityType;
49
+ entityData?: BaseEntityData | null;
50
+ firstName?: string | null;
51
+ lastName?: string | null;
52
+ name?: string | null;
53
+ imageUrl?: string | null;
54
+ /**
55
+ * Resolves a raw stored image path/URL into something renderable. Omit it to only
56
+ * render already-absolute URLs (`http(s)://...` or `data:...`) as-is — anything else
57
+ * (a bare storage path) falls back to initials/the default placeholder, since this
58
+ * package can't resolve it itself. See `EntityImageResolver` for why.
59
+ */
60
+ resolveImageUrl?: EntityImageResolver;
61
+ size?: EntityAvatarSize;
62
+ className?: string;
63
+ fallbackClassName?: string;
64
+ showInitials?: boolean;
65
+ cacheBreaker?: string | number;
66
+ }
67
+ declare function EntityAvatar({ entityType, entityData, firstName, lastName, name, imageUrl, resolveImageUrl, size, className, fallbackClassName, showInitials, cacheBreaker, }: EntityAvatarProps): react.JSX.Element;
68
+
69
+ interface RowAction {
70
+ /** Visible text. */
71
+ label: ReactNode;
72
+ /** Click handler — receives the original event so callers can `stopPropagation()`. */
73
+ onClick: (e: MouseEvent) => void;
74
+ /** Renders the item with destructive (red) styling. */
75
+ destructive?: boolean;
76
+ /** When `false`, the item is omitted entirely. */
77
+ when?: boolean;
78
+ /** Disable the item. */
79
+ disabled?: boolean;
80
+ /** Tooltip shown when the item is disabled. */
81
+ disabledTooltip?: string;
82
+ /** Optional override class for the item. */
83
+ className?: string;
84
+ }
85
+ interface RowActionsDropdownProps {
86
+ actions: RowAction[];
87
+ /** Override the trigger button. Default: `MoreIcon` button. */
88
+ trigger?: ReactNode;
89
+ /** Trigger button extra classes. */
90
+ triggerClassName?: string;
91
+ /**
92
+ * Extra classes on the menu content. Mainly for stacking: the menu defaults
93
+ * to `z-[60]`, which sits below overlays such as `Sheet` (`z-[120]`), so a
94
+ * dropdown opened inside one needs a higher `z-` here to render above it.
95
+ */
96
+ contentClassName?: string;
97
+ /** `align` prop on the popover content. Default `"end"`. */
98
+ align?: "start" | "center" | "end";
99
+ /** Aria label on the trigger button. */
100
+ ariaLabel?: string;
101
+ /**
102
+ * Radix `modal` on the menu. Default `true`.
103
+ *
104
+ * Pass `false` when the dropdown lives inside a modal Dialog/Sheet: two
105
+ * nested modal layers each lock `pointer-events` on `document.body` and each
106
+ * register a dismissable layer, so on touch the tap that opens the menu is
107
+ * then read as an outside-press and closes it again — the trigger looks dead.
108
+ */
109
+ modal?: boolean;
110
+ }
111
+ /**
112
+ * Canonical "row actions" dropdown — replaces the repeated
113
+ * MoreIcon trigger + popover-styled content + Edit/Delete items pattern.
114
+ *
115
+ * @example
116
+ * <RowActionsDropdown
117
+ * ariaLabel={`Actions for ${row.name}`}
118
+ * actions={[
119
+ * { label: "Edit", onClick: () => onEdit(row) },
120
+ * { label: "Delete", onClick: () => onDelete(row.id), destructive: true },
121
+ * ]}
122
+ * />
123
+ */
124
+ declare function RowActionsDropdown({ actions, trigger, triggerClassName, contentClassName, align, ariaLabel, modal, }: RowActionsDropdownProps): react.JSX.Element | null;
125
+
126
+ interface DealEmptyStateProps {
127
+ /** The empty-state copy to display. */
128
+ message: string;
129
+ /** Optional override/extension for the wrapping container's classes. */
130
+ className?: string;
131
+ /** Optional override/extension for the message text's classes. */
132
+ messageClassName?: string;
133
+ }
134
+ /**
135
+ * Empty-state placeholder for a deals list (marketing deals tab/page).
136
+ *
137
+ * Extracted from two independent, non-exported local components:
138
+ * - nukleus-app's `MarketingDealsTab.tsx` (`text-[14px] text-text-primary`)
139
+ * - nukleus-clientapp's `Marketing.tsx` (`body-text text-text-secondary`)
140
+ *
141
+ * Both apps already agree on the `{ message: string }` shape and layout; the text
142
+ * styling genuinely diverged. This uses clientapp's version as the default — it
143
+ * reaches for the shared `body-text` typography primitive instead of a magic
144
+ * `text-[14px]`, and dims the copy with `text-secondary`, which reads better for
145
+ * empty-state messaging than the higher-emphasis `text-primary` nukleus-app used.
146
+ * `messageClassName` is exposed so either app can override back to its prior look
147
+ * if that divergence turns out to matter at the call site.
148
+ */
149
+ declare function DealEmptyState({ message, className, messageClassName }: DealEmptyStateProps): react.JSX.Element;
150
+
151
+ /**
152
+ * Reconciled from two independent implementations:
153
+ * - nukleus-app's `ManualDealCard.tsx` — superset: has Edit/Delete, a raw
154
+ * `DropdownMenu` + `MoreIcon` trigger, an explicit "Preview Doc" quick-open
155
+ * affordance next to the brand name, and an entirely separate collapsible
156
+ * mobile layout (chevron + brand/amount summary row, expanding to a "View
157
+ * Details"/"Preview Doc" footer).
158
+ * - nukleus-clientapp's `ManualDealCard.tsx` — read-only subset: no Edit/Delete,
159
+ * already uses a shared `RowActionsDropdown` (single "Preview Deal" action),
160
+ * no "Preview Doc" affordance on the card at all, and no distinct mobile
161
+ * layout (always renders the "desktop" row).
162
+ *
163
+ * Union, not intersection:
164
+ * - `onEdit`/`onDelete` are optional — omitting either simply drops that row
165
+ * action, which is exactly how clientapp's read-only usage degrades.
166
+ * - The "Preview Doc" quick-open link is kept (additive from nukleus-app) and
167
+ * gated on both a resolved document *and* `onOpenDocument` being supplied.
168
+ * - The collapsible mobile layout is kept (additive from nukleus-app, and not
169
+ * actually mentioned by the rollout-plan doc — found by reading the source).
170
+ * It's implemented with Tailwind `sm:` responsive classes (both layouts are
171
+ * in the DOM, toggled by `hidden`/`sm:hidden`) rather than a JS viewport
172
+ * hook, so this stays free of any store/router dependency.
173
+ *
174
+ * Genuine conflicts resolved (not just formatting):
175
+ * - Lead-agent avatar `entityType`: nukleus-app used `"agency"` while passing
176
+ * only a flattened `name` string (no `firstName`/`lastName`). `EntityAvatar`'s
177
+ * `"agency"` initials fallback reads `firstName`/`lastName`, not `name` — so
178
+ * nukleus-app's original call site would always fall back to "?" for any
179
+ * lead agent without a profile photo. clientapp used `"initials"`, which
180
+ * correctly derives initials from a plain `name` string. This component uses
181
+ * `"initials"` (clientapp's choice), both to fix that latent bug and because
182
+ * this component only ever receives a flattened `lead_agent_name` string.
183
+ * - Lead-agent name formatting: nukleus-app abbreviated it via a local
184
+ * `getInitialFullName(name, null, true)` helper to "J. Smith"; clientapp
185
+ * rendered the full name as-is. That abbreviation helper isn't part of this
186
+ * design system and is a display nicety, not core behavior, so this
187
+ * component renders `lead_agent_name` verbatim (clientapp's behavior). An
188
+ * adapter that wants the abbreviated form can format the string itself
189
+ * before passing it in.
190
+ * - Brand avatar size: nukleus-app hard-coded `w-[34px] h-[34px]` on top of
191
+ * `size="sm"` (overriding the scale to a bespoke value); clientapp left the
192
+ * standard `size="sm"` (24px) in place. Kept clientapp's behavior — fighting
193
+ * a documented size step with a one-off pixel override is the smell here,
194
+ * not the other way around. `className` is still exposed if 34px turns out
195
+ * to be the intentional spec.
196
+ */
197
+ interface ManualDealDocumentRef {
198
+ /** Resolved, directly-fetchable URL for the attached document — a signed/serve
199
+ * URL (nukleus-app) or a public URL (clientapp), whatever the host app's
200
+ * adapter resolves it to. */
201
+ url: string;
202
+ /** Display name for the document, when known. */
203
+ name?: string | null;
204
+ }
205
+ interface ManualDealMetadata {
206
+ brand_name: string;
207
+ deal_category?: string | null;
208
+ total_deal_amount: number;
209
+ start_date?: string | null;
210
+ end_date?: string | null;
211
+ brand_payment_due_date?: string | null;
212
+ client_name?: string | null;
213
+ client_invoice_name?: string | null;
214
+ agency_name?: string | null;
215
+ agency_commission?: number | null;
216
+ agency_payment_due_date?: string | null;
217
+ has_third_party?: boolean | null;
218
+ third_party_name?: string | null;
219
+ third_party_invoice_name?: string | null;
220
+ third_party_commission?: number | null;
221
+ third_party_payment_due_date?: string | null;
222
+ notes?: string | null;
223
+ document_name?: string | null;
224
+ document_url?: string | null;
225
+ /** nukleus-app-only shape for an internally-uploaded document; clientapp
226
+ * never populates this and relies solely on the flattened `document_*` pair. */
227
+ uploaded_document?: {
228
+ name: string;
229
+ url: string;
230
+ } | null;
231
+ }
232
+ interface ManualDeal {
233
+ id?: string;
234
+ metadata: ManualDealMetadata;
235
+ company_name?: string | null;
236
+ company_avatar_url?: string | null;
237
+ /** Pre-resolved display name for the deal's lead agent. nukleus-app derives
238
+ * this from `lead_agent_profile ?? created_by_profile`; clientapp already
239
+ * has it flattened. Resolving which profile wins is adapter work, not this
240
+ * component's — it only ever renders the final string. */
241
+ lead_agent_name?: string | null;
242
+ lead_agent_avatar_url?: string | null;
243
+ }
244
+ /** Resolves the one attached document, whichever of the two historical shapes
245
+ * it was stored under. Returns `null` when the deal has no document, in which
246
+ * case neither this card nor `ManualDealPreviewDialog` render a document
247
+ * affordance. */
248
+ declare function resolveDealDocument(meta: ManualDealMetadata): ManualDealDocumentRef | null;
249
+ interface ManualDealCardProps {
250
+ deal: ManualDeal;
251
+ onPreview: (deal: ManualDeal) => void;
252
+ /** Omit to hide the "Edit" row action entirely (clientapp's read-only usage). */
253
+ onEdit?: (deal: ManualDeal) => void;
254
+ /** Omit to hide the "Delete" row action entirely (clientapp's read-only usage). */
255
+ onDelete?: (deal: ManualDeal) => void;
256
+ /** Required only insofar as a document is actually attached — the "Preview
257
+ * Doc" link only renders when both a document resolves (see
258
+ * `resolveDealDocument`) and this is supplied. Never call `window.open()` or
259
+ * a document-fetch service directly from this package. */
260
+ onOpenDocument?: (doc: ManualDealDocumentRef) => void;
261
+ /** Passed straight through to this card's `EntityAvatar` instances. See
262
+ * `EntityImageResolver` for why this package can't resolve storage paths
263
+ * itself. */
264
+ resolveImageUrl?: EntityImageResolver;
265
+ className?: string;
266
+ }
267
+ declare function ManualDealCard({ deal, onPreview, onEdit, onDelete, onOpenDocument, resolveImageUrl, className, }: ManualDealCardProps): react.JSX.Element;
268
+
269
+ interface ManualDealPreviewDialogProps {
270
+ deal: ManualDeal | null;
271
+ open: boolean;
272
+ onOpenChange: (open: boolean) => void;
273
+ /** Omit to hide the "Edit Deal" footer button entirely (clientapp's
274
+ * read-only usage). */
275
+ onEdit?: (deal: ManualDeal) => void;
276
+ /** Never call `window.open()` or a document-fetch service directly from
277
+ * this package — see the file-level comment for why the two source apps'
278
+ * behavior couldn't be unified here. */
279
+ onOpenDocument: (doc: ManualDealDocumentRef) => void;
280
+ /** Passed straight through to this dialog's `EntityAvatar` instance. */
281
+ resolveImageUrl?: EntityImageResolver;
282
+ }
283
+ declare function ManualDealPreviewDialog({ deal, open, onOpenChange, onEdit, onOpenDocument, resolveImageUrl, }: ManualDealPreviewDialogProps): react.JSX.Element | null;
284
+
285
+ /**
286
+ * Reconciled from two independent implementations:
287
+ * - nukleus-app's `ProjectDealCard.tsx` — superset: gates the "Collab"
288
+ * link/badge on project membership, has a demo-mode fallback (non-member
289
+ * -of-org "explorable" projects swap the link for a toast-triggering
290
+ * button), shows a "N of M payments" line, and has an entirely separate
291
+ * collapsible mobile layout (chevron + brand/amount summary row, expanding
292
+ * to stats/progress/footer).
293
+ * - nukleus-clientapp's `ProjectDealCard.tsx` — no membership gate at all (see
294
+ * bug below), no demo-mode concept, no payments-count line, and a single
295
+ * layout used at every viewport width, with its own more defensive
296
+ * responsive wrapping for the tracking row.
297
+ *
298
+ * ## Confirmed bug: unconditional "Collab" link (fixed here)
299
+ * nukleus-app calls `useGetProjectMembersQuery` and only renders the "Collab"
300
+ * footer link when the current user `isProjectMember`; clientapp's card has
301
+ * **no membership gate at all** — the link renders unconditionally. A
302
+ * clientapp user linked to the org but not individually added as a
303
+ * `project_members` row can click through to a project detail page that then
304
+ * immediately bounces them for failing its own membership check. Confirmed by
305
+ * reading both files in full; this is not a reconciliation artifact.
306
+ *
307
+ * This package can't import RTK Query (no data-fetching in a shared
308
+ * presentational component), so the membership check itself has to live in
309
+ * each app's adapter/hook. To stop a call site from ever *forgetting* that
310
+ * check — or from treating "still loading" as "show the link", which is the
311
+ * exact shape of bug clientapp shipped — `collabMembership` is a **required,
312
+ * explicit tri-state** (`"loading" | "member" | "not-member"`) rather than an
313
+ * optional boolean:
314
+ * - Required means omitting it is a type error, not a silent default.
315
+ * - Tri-state means there is no boolean "both missing and false look the
316
+ * same" ambiguity — "loading" is its own named state, and this component
317
+ * treats it identically to "not-member" (hidden), which is also exactly
318
+ * nukleus-app's original runtime behavior (`!!members?.find(...)` is
319
+ * `false` while `members` is still `undefined`). The link can only ever
320
+ * render when the caller has explicitly resolved and supplied `"member"`.
321
+ * A plain `isProjectMember?: boolean` was considered and rejected — making
322
+ * it required-but-boolean still lets a lazy adapter write
323
+ * `isProjectMember={someQuery.data?.find(...) !== undefined}` without ever
324
+ * having had to name the loading state, whereas the tri-state forces that
325
+ * decision into the open at the call site.
326
+ *
327
+ * ## Mobile accordion
328
+ * Verified nukleus-app's collapsed/expanded mobile behavior is real
329
+ * open/closed state (a chevron button toggles `isExpanded`), not just a
330
+ * responsive layout swap — but that's exactly what `ManualDealCard` (this
331
+ * same directory) already does: Tailwind `sm:hidden`/`hidden sm:flex` decides
332
+ * *which* layout is in the DOM, and a local `useState` drives the
333
+ * expand/collapse *within* the mobile one. Ported faithfully using that same
334
+ * established convention, so this stays store/router-free. The mobile
335
+ * layout's own card chrome (bordered, rounded, standalone) and the desktop
336
+ * layout's chrome (flush list row, `border-b`) are genuinely different
337
+ * between the two apps' originals and are kept as-is rather than forced
338
+ * under one shared wrapper style.
339
+ *
340
+ * ## Other genuine conflicts resolved (not formatting)
341
+ * - Tracking row on tablet widths: nukleus-app hides the whole
342
+ * deliverables/paid-status row between `sm` and `xl` (`hidden xl:flex`) —
343
+ * real content just disappears at tablet widths. clientapp solves the same
344
+ * "N items don't fit in a row" problem by reflowing into a responsive grid
345
+ * instead (`grid grid-cols-2 md:grid-cols-3 lg:flex`), never hiding it.
346
+ * Kept clientapp's grid — it's strictly better (no hidden content) and
347
+ * doesn't conflict with keeping the mobile accordion, since the accordion
348
+ * only applies below `sm` and this row only applies at `sm` and up.
349
+ * - Lead/owner avatar `entityType`: same latent bug as `ManualDealCard` —
350
+ * nukleus-app used `"agency"` while only ever passing a flattened `name`
351
+ * (not `firstName`/`lastName`, which is what `"agency"` initials read), so
352
+ * it always fell back to "?" for an owner with no photo. clientapp used
353
+ * `"initials"`, which correctly derives initials from `name`. Kept
354
+ * `"initials"`, same reasoning as `ManualDealCard`.
355
+ * - Owner name abbreviation: nukleus-app abbreviated via a local
356
+ * `getInitialFullName(name, null, true)` helper ("J. Smith"); clientapp
357
+ * rendered the name as-is. Not part of this design system (display nicety,
358
+ * not core behavior) — rendered verbatim, same call as `ManualDealCard`.
359
+ * - Owner-name empty fallback: nukleus-app used a literal `"--"`; clientapp
360
+ * used `"—"` (em dash). `formatDealDate` (from `@nukleus-sports/core`)
361
+ * already established "—" as this design system's missing-value sentinel,
362
+ * so that's what's used here instead of introducing a second glyph.
363
+ * - Brand avatar size: nukleus-app hard-coded `w-[34px] h-[34px]` on top of
364
+ * `size="sm"`; clientapp left the standard `size="sm"` (24px) in place.
365
+ * Kept clientapp's behavior, same reasoning as `ManualDealCard`.
366
+ * - Owner avatar size: nukleus-app used `size="sm"` for the owner's
367
+ * `EntityAvatar`; clientapp used `size="xs"`. Kept `"sm"` — it's what
368
+ * `ManualDealCard`'s own lead-agent avatar (the equivalent "who owns this"
369
+ * row in this same package) already established, and consistency across
370
+ * this package's cards outweighs either single original's choice.
371
+ * - "Complete" vs "Completed" status label: nukleus-app relabels the
372
+ * `"Complete"` status to "Completed" in its badge text (both its layouts);
373
+ * clientapp renders the raw status value. Kept nukleus-app's relabel (it's
374
+ * the grammatically correct one) and, since "Completed" is longer than
375
+ * clientapp's fixed `w-[104px]` badge was sized for, dropped that fixed
376
+ * width in favor of nukleus-app's auto-sized badge so the longer label
377
+ * never clips.
378
+ * - Collected-amount trailing space: nukleus-app's template literal leaves a
379
+ * trailing space when `total_collected` is 0 (`` `${fmtUSD(...)} ` ``
380
+ * with an empty suffix); clientapp's has no such gap. Kept clientapp's.
381
+ * - First footer span's flex sizing: clientapp adds `min-w-0` alongside
382
+ * `flex-1` so `truncate`/wrapping actually engages instead of overflowing
383
+ * the card; nukleus-app's omits it. Kept clientapp's (a strict fix, same
384
+ * `min-w-0` reasoning already documented in `ManualDealCard`/`TrackingItem`).
385
+ * - "N of M payments" line: only nukleus-app's RPC/type returns
386
+ * `payments_total`/`payments_paid` — clientapp's doesn't have these fields
387
+ * and never rendered the line. Kept as an *additive* capability gated on
388
+ * both fields being supplied, rather than dropped or forced to be required.
389
+ * - Demo-mode link/button swap: nukleus-app swaps the "Collab" link for a
390
+ * plain button that triggers a demo-limit toast when a project isn't
391
+ * "explorable" in demo mode. `isDemoMode`/`showDemoLimitToast` are
392
+ * app-internal concepts this package can't import. Generalized into
393
+ * `onCollabClick`: when supplied, the "Collab" affordance renders as a
394
+ * `<button>` calling it instead of an `<a href>` — nukleus-app's adapter
395
+ * can wire its demo-mode toast through this; clientapp simply never passes
396
+ * it and always gets a real link.
397
+ *
398
+ * No icon needed inlining — `ArrowDownFormIcon`, `CheckRingRoundIcon`, and
399
+ * `XsViewInvoiceIcon` are all already in `@nukleus-sports/icons`.
400
+ */
401
+ interface ProjectDeal {
402
+ project_id: string;
403
+ project_title: string;
404
+ brand_name: string | null;
405
+ company_name?: string | null;
406
+ company_avatar_url?: string | null;
407
+ owner_name?: string | null;
408
+ owner_avatar_url?: string | null;
409
+ deal_terms: {
410
+ startDate?: string | null;
411
+ endDate?: string | null;
412
+ category?: string | null;
413
+ } | null;
414
+ total_contracted: number;
415
+ total_collected: number;
416
+ total_equity_shares: number;
417
+ deliverables_total: number;
418
+ deliverables_met: number;
419
+ /** Only present in nukleus-app's RPC today — clientapp's doesn't return
420
+ * these. The "N of M payments" line only renders when both are supplied. */
421
+ payments_total?: number;
422
+ payments_paid?: number;
423
+ client_paid: boolean;
424
+ agency_paid: boolean;
425
+ has_third_party: boolean;
426
+ third_party_paid: boolean;
427
+ }
428
+ /**
429
+ * Tri-state result of the caller's own project-membership check (see the
430
+ * module doc above for why this is required and not an optional boolean).
431
+ * `"loading"` and `"not-member"` are both treated as "hide the Collab
432
+ * affordance" — only `"member"` ever shows it.
433
+ */
434
+ type ProjectCollabMembership = "loading" | "member" | "not-member";
435
+ interface ProjectDealCardProps {
436
+ deal: ProjectDeal;
437
+ isCompleted: boolean;
438
+ /** Required — see module doc. Gates every "Collab"/"Collab Hub" affordance
439
+ * on this card. */
440
+ collabMembership: ProjectCollabMembership;
441
+ /** Destination for the "Collab"/"Collab Hub" link, e.g.
442
+ * `/projects/${deal.project_id}?tab=overview`. Rendered as a plain
443
+ * `<a href>` — never a `react-router` `Link` — so this package carries no
444
+ * router dependency. */
445
+ collabHref: string;
446
+ /** Supply to replace the `<a href={collabHref}>` with a `<button>` that
447
+ * calls this instead (e.g. nukleus-app's demo-mode upsell toast for a
448
+ * non-"explorable" project). Omit for a normal link. */
449
+ onCollabClick?: (e: MouseEvent<HTMLButtonElement>) => void;
450
+ /** Passed straight through to this card's `EntityAvatar` instances. */
451
+ resolveImageUrl?: EntityImageResolver;
452
+ className?: string;
453
+ }
454
+ declare function ProjectDealCard({ deal, isCompleted, collabMembership, collabHref, onCollabClick, resolveImageUrl, className, }: ProjectDealCardProps): react.JSX.Element;
455
+
456
+ export { DealEmptyState, type DealEmptyStateProps, ENTITY_AVATAR_SIZE_PX, EntityAvatar, type EntityAvatarProps, type EntityAvatarSize, type EntityImageResolver, type EntityType, type ManualDeal, ManualDealCard, type ManualDealCardProps, type ManualDealDocumentRef, type ManualDealMetadata, ManualDealPreviewDialog, type ManualDealPreviewDialogProps, type ProjectCollabMembership, type ProjectDeal, ProjectDealCard, type ProjectDealCardProps, type RowAction, RowActionsDropdown, type RowActionsDropdownProps, resolveDealDocument };