@nukleus-sports/ui-patterns 0.1.2 → 0.3.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.
@@ -1,70 +1,6 @@
1
1
  import * as react from 'react';
2
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;
3
+ import { EntityImageResolver } from './index.cjs';
68
4
 
69
5
  interface RowAction {
70
6
  /** Visible text. */
@@ -148,6 +84,61 @@ interface DealEmptyStateProps {
148
84
  */
149
85
  declare function DealEmptyState({ message, className, messageClassName }: DealEmptyStateProps): react.JSX.Element;
150
86
 
87
+ /**
88
+ * Reconciled from two near-identical implementations (clientapp's own file
89
+ * comment already said "Mirrors nukleus-app's ContractDetailsCard"):
90
+ * - nukleus-app's version had optional `title`/`caption` props (defaulting
91
+ * to "Contract Details", no caption) -- kept as a strict superset,
92
+ * clientapp's callers simply never pass them.
93
+ * - clientapp's due-date formatting was a local `date-fns`-based helper
94
+ * producing "MMM dd, yyyy" (zero-padded day); this uses `@nukleus-sports/
95
+ * core`'s existing `formatDealDate` ("MMM d, yyyy", no zero-padding)
96
+ * instead of introducing a second date formatter for one field -- the
97
+ * day-padding difference is cosmetic.
98
+ *
99
+ * Found missing from this package entirely while wiring the Marketing Deals
100
+ * Layer 5 retrofit into both apps: both apps' real `MarketingDealMetadata`
101
+ * already has an identical `contract_details` shape (read from an uploaded
102
+ * contract via each app's own AI extraction flow), and both apps' local
103
+ * `ManualDealPreviewDialog`s already rendered this card -- a genuine
104
+ * duplicate that simply hadn't been ported yet, not a single-app feature.
105
+ */
106
+ interface ContractDetailsCardDeliverable {
107
+ description: string;
108
+ due_date: string | null;
109
+ units: number | null;
110
+ }
111
+ interface ContractDetailsCardWarning {
112
+ issue: string;
113
+ detail: string | null;
114
+ }
115
+ interface MarketingDealContractDetails {
116
+ territory: string | null;
117
+ is_exclusive: boolean | null;
118
+ exclusivity: string | null;
119
+ payment_terms: string | null;
120
+ usage_after_term_days: number | null;
121
+ usage_after_term: string | null;
122
+ /** The talent's company that signed the contract (e.g. a loan-out LLC). */
123
+ contracting_entity: string | null;
124
+ deliverables: ContractDetailsCardDeliverable[];
125
+ /** Issues the extractor flagged in the document (e.g. dates that don't line up). */
126
+ warnings: ContractDetailsCardWarning[];
127
+ }
128
+ interface ContractDetailsCardProps {
129
+ details: MarketingDealContractDetails;
130
+ title?: string;
131
+ /** One-line note under the title (e.g. where the details came from). */
132
+ caption?: string;
133
+ className?: string;
134
+ }
135
+ /**
136
+ * Contract terms the deal form has no field for (territory, exclusivity,
137
+ * payment terms, usage rights, deliverables, warnings), read from the
138
+ * uploaded contract. Read-only; rows without a value are left out.
139
+ */
140
+ declare function ContractDetailsCard({ details, title, caption, className, }: ContractDetailsCardProps): react.JSX.Element;
141
+
151
142
  /**
152
143
  * Reconciled from two independent implementations:
153
144
  * - nukleus-app's `ManualDealCard.tsx` — superset: has Edit/Delete, a raw
@@ -193,6 +184,23 @@ declare function DealEmptyState({ message, className, messageClassName }: DealEm
193
184
  * a documented size step with a one-off pixel override is the smell here,
194
185
  * not the other way around. `className` is still exposed if 34px turns out
195
186
  * to be the intentional spec.
187
+ *
188
+ * Revisited after this component shipped: clientapp's real `ManualDealCard`
189
+ * has since converged onto the same aside/tracking-row/payment-footer shape
190
+ * `ProjectDealCard` already had (its `DealAside`/`DealDesktopCard` are shared
191
+ * between both of its card types), independently of this package. Ported
192
+ * into the desktop layout: a status pill (always literal "Complete" — a past
193
+ * deal has no Active/Upcoming state, so this isn't `ProjectDealCard`'s own
194
+ * `statusLabel()`), a Client/Agency/Third-Party-paid tracking row (always
195
+ * `done` — a past deal is definitionally fully settled, same as clientapp's
196
+ * `getPastDealPaymentProgress`'s synthetic fully-paid values), and a payment
197
+ * progress footer (always 100%, "Fully Paid"). `asideFooter` is the same
198
+ * generic slot `ProjectDealCard` has, for clientapp's per-deal commission
199
+ * line ("$X to you · Y% agency commission") — this package has no opinion on
200
+ * what goes there. Desktop only for now; the mobile layout's structure
201
+ * doesn't share clientapp's `DealMobileCard`/`DealCollectedSummary`
202
+ * abstraction the way the desktop one does, a separate, bigger gap left for
203
+ * its own decision later.
196
204
  */
197
205
  interface ManualDealDocumentRef {
198
206
  /** Resolved, directly-fetchable URL for the attached document — a signed/serve
@@ -228,6 +236,12 @@ interface ManualDealMetadata {
228
236
  name: string;
229
237
  url: string;
230
238
  } | null;
239
+ /** The current field for the preview dialog's "Contract Summary" section.
240
+ * `notes` is the legacy key for rows written before this field existed. */
241
+ summary?: string | null;
242
+ /** Terms read from the uploaded contract via each app's own AI extraction
243
+ * flow. Both apps' real data already has this identical shape. */
244
+ contract_details?: MarketingDealContractDetails | null;
231
245
  }
232
246
  interface ManualDeal {
233
247
  id?: string;
@@ -262,9 +276,14 @@ interface ManualDealCardProps {
262
276
  * `EntityImageResolver` for why this package can't resolve storage paths
263
277
  * itself. */
264
278
  resolveImageUrl?: EntityImageResolver;
279
+ /** Rendered at the end of the desktop layout's amount/status column,
280
+ * after the status pill -- e.g. a commission breakdown. Same slot as
281
+ * `ProjectDealCard`'s `asideFooter`; this package has no opinion on what
282
+ * goes here. Desktop only for now -- see module doc. */
283
+ asideFooter?: ReactNode;
265
284
  className?: string;
266
285
  }
267
- declare function ManualDealCard({ deal, onPreview, onEdit, onDelete, onOpenDocument, resolveImageUrl, className, }: ManualDealCardProps): react.JSX.Element;
286
+ declare function ManualDealCard({ deal, onPreview, onEdit, onDelete, onOpenDocument, resolveImageUrl, asideFooter, className, }: ManualDealCardProps): react.JSX.Element;
268
287
 
269
288
  interface ManualDealPreviewDialogProps {
270
289
  deal: ManualDeal | null;
@@ -355,10 +374,15 @@ declare function ManualDealPreviewDialog({ deal, open, onOpenChange, onEdit, onO
355
374
  * it always fell back to "?" for an owner with no photo. clientapp used
356
375
  * `"initials"`, which correctly derives initials from `name`. Kept
357
376
  * `"initials"`, same reasoning as `ManualDealCard`.
358
- * - Owner name abbreviation: nukleus-app abbreviated via a local
359
- * `getInitialFullName(name, null, true)` helper ("J. Smith"); clientapp
360
- * rendered the name as-is. Not part of this design system (display nicety,
361
- * not core behavior) — rendered verbatim, same call as `ManualDealCard`.
377
+ * - Owner name abbreviation: originally reconciled as "render verbatim"
378
+ * (clientapp's behavior when this file was first built). Revisited when
379
+ * clientapp's `ProjectDealCard.tsx` was found to have since grown its own
380
+ * `getInitialFullName(name, null, true)` abbreviation ("J. Smith") --
381
+ * matching what nukleus-app's (by-then-retired) local component already
382
+ * did. Both apps' real current behavior agrees, so this renders abbreviated
383
+ * via `@nukleus-sports/core`'s `abbreviatePersonName` (the `EntityAvatar`
384
+ * still gets the raw `owner_name` for initials -- only the visible text
385
+ * span is abbreviated, same split as both apps' originals).
362
386
  * - Owner-name empty fallback: nukleus-app used a literal `"--"`; clientapp
363
387
  * used `"—"` (em dash). `formatDealDate` (from `@nukleus-sports/core`)
364
388
  * already established "—" as this design system's missing-value sentinel,
@@ -397,6 +421,11 @@ declare function ManualDealPreviewDialog({ deal, open, onOpenChange, onEdit, onO
397
421
  * `<button>` calling it instead of an `<a href>` — nukleus-app's adapter
398
422
  * can wire its demo-mode toast through this; clientapp simply never passes
399
423
  * it and always gets a real link.
424
+ * - Commission line: clientapp renders a per-deal commission breakdown
425
+ * ("$X to you · Y% agency commission") in the aside column, after the
426
+ * status pill; nukleus-app has no equivalent at all. Rather than teach
427
+ * this package the concept of a commission, `asideFooter` is a generic
428
+ * slot rendered in that exact spot — nukleus-app simply never passes it.
400
429
  *
401
430
  * No icon needed inlining — `ArrowDownFormIcon`, `CheckRingRoundIcon`, and
402
431
  * `XsViewInvoiceIcon` are all already in `@nukleus-sports/icons`.
@@ -452,8 +481,13 @@ interface ProjectDealCardProps {
452
481
  onCollabClick?: (e: MouseEvent<HTMLButtonElement>) => void;
453
482
  /** Passed straight through to this card's `EntityAvatar` instances. */
454
483
  resolveImageUrl?: EntityImageResolver;
484
+ /** Rendered at the end of the amount/status column, after the status pill
485
+ * -- e.g. a commission breakdown. This package has no opinion on what
486
+ * goes here (clientapp's real cards render a commission line nukleus-app
487
+ * has no equivalent for at all); omit for nothing extra. */
488
+ asideFooter?: ReactNode;
455
489
  className?: string;
456
490
  }
457
- declare function ProjectDealCard({ deal, isCompleted, collabMembership, collabHref, onCollabClick, resolveImageUrl, className, }: ProjectDealCardProps): react.JSX.Element;
491
+ declare function ProjectDealCard({ deal, isCompleted, collabMembership, collabHref, onCollabClick, resolveImageUrl, asideFooter, className, }: ProjectDealCardProps): react.JSX.Element;
458
492
 
459
- 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 };
493
+ export { ContractDetailsCard, type ContractDetailsCardDeliverable, type ContractDetailsCardProps, type ContractDetailsCardWarning, DealEmptyState, type DealEmptyStateProps, type ManualDeal, ManualDealCard, type ManualDealCardProps, type ManualDealDocumentRef, type ManualDealMetadata, ManualDealPreviewDialog, type ManualDealPreviewDialogProps, type MarketingDealContractDetails, type ProjectCollabMembership, type ProjectDeal, ProjectDealCard, type ProjectDealCardProps, type RowAction, RowActionsDropdown, type RowActionsDropdownProps, resolveDealDocument };
@@ -1,70 +1,6 @@
1
1
  import * as react from 'react';
2
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;
3
+ import { EntityImageResolver } from './index.js';
68
4
 
69
5
  interface RowAction {
70
6
  /** Visible text. */
@@ -148,6 +84,61 @@ interface DealEmptyStateProps {
148
84
  */
149
85
  declare function DealEmptyState({ message, className, messageClassName }: DealEmptyStateProps): react.JSX.Element;
150
86
 
87
+ /**
88
+ * Reconciled from two near-identical implementations (clientapp's own file
89
+ * comment already said "Mirrors nukleus-app's ContractDetailsCard"):
90
+ * - nukleus-app's version had optional `title`/`caption` props (defaulting
91
+ * to "Contract Details", no caption) -- kept as a strict superset,
92
+ * clientapp's callers simply never pass them.
93
+ * - clientapp's due-date formatting was a local `date-fns`-based helper
94
+ * producing "MMM dd, yyyy" (zero-padded day); this uses `@nukleus-sports/
95
+ * core`'s existing `formatDealDate` ("MMM d, yyyy", no zero-padding)
96
+ * instead of introducing a second date formatter for one field -- the
97
+ * day-padding difference is cosmetic.
98
+ *
99
+ * Found missing from this package entirely while wiring the Marketing Deals
100
+ * Layer 5 retrofit into both apps: both apps' real `MarketingDealMetadata`
101
+ * already has an identical `contract_details` shape (read from an uploaded
102
+ * contract via each app's own AI extraction flow), and both apps' local
103
+ * `ManualDealPreviewDialog`s already rendered this card -- a genuine
104
+ * duplicate that simply hadn't been ported yet, not a single-app feature.
105
+ */
106
+ interface ContractDetailsCardDeliverable {
107
+ description: string;
108
+ due_date: string | null;
109
+ units: number | null;
110
+ }
111
+ interface ContractDetailsCardWarning {
112
+ issue: string;
113
+ detail: string | null;
114
+ }
115
+ interface MarketingDealContractDetails {
116
+ territory: string | null;
117
+ is_exclusive: boolean | null;
118
+ exclusivity: string | null;
119
+ payment_terms: string | null;
120
+ usage_after_term_days: number | null;
121
+ usage_after_term: string | null;
122
+ /** The talent's company that signed the contract (e.g. a loan-out LLC). */
123
+ contracting_entity: string | null;
124
+ deliverables: ContractDetailsCardDeliverable[];
125
+ /** Issues the extractor flagged in the document (e.g. dates that don't line up). */
126
+ warnings: ContractDetailsCardWarning[];
127
+ }
128
+ interface ContractDetailsCardProps {
129
+ details: MarketingDealContractDetails;
130
+ title?: string;
131
+ /** One-line note under the title (e.g. where the details came from). */
132
+ caption?: string;
133
+ className?: string;
134
+ }
135
+ /**
136
+ * Contract terms the deal form has no field for (territory, exclusivity,
137
+ * payment terms, usage rights, deliverables, warnings), read from the
138
+ * uploaded contract. Read-only; rows without a value are left out.
139
+ */
140
+ declare function ContractDetailsCard({ details, title, caption, className, }: ContractDetailsCardProps): react.JSX.Element;
141
+
151
142
  /**
152
143
  * Reconciled from two independent implementations:
153
144
  * - nukleus-app's `ManualDealCard.tsx` — superset: has Edit/Delete, a raw
@@ -193,6 +184,23 @@ declare function DealEmptyState({ message, className, messageClassName }: DealEm
193
184
  * a documented size step with a one-off pixel override is the smell here,
194
185
  * not the other way around. `className` is still exposed if 34px turns out
195
186
  * to be the intentional spec.
187
+ *
188
+ * Revisited after this component shipped: clientapp's real `ManualDealCard`
189
+ * has since converged onto the same aside/tracking-row/payment-footer shape
190
+ * `ProjectDealCard` already had (its `DealAside`/`DealDesktopCard` are shared
191
+ * between both of its card types), independently of this package. Ported
192
+ * into the desktop layout: a status pill (always literal "Complete" — a past
193
+ * deal has no Active/Upcoming state, so this isn't `ProjectDealCard`'s own
194
+ * `statusLabel()`), a Client/Agency/Third-Party-paid tracking row (always
195
+ * `done` — a past deal is definitionally fully settled, same as clientapp's
196
+ * `getPastDealPaymentProgress`'s synthetic fully-paid values), and a payment
197
+ * progress footer (always 100%, "Fully Paid"). `asideFooter` is the same
198
+ * generic slot `ProjectDealCard` has, for clientapp's per-deal commission
199
+ * line ("$X to you · Y% agency commission") — this package has no opinion on
200
+ * what goes there. Desktop only for now; the mobile layout's structure
201
+ * doesn't share clientapp's `DealMobileCard`/`DealCollectedSummary`
202
+ * abstraction the way the desktop one does, a separate, bigger gap left for
203
+ * its own decision later.
196
204
  */
197
205
  interface ManualDealDocumentRef {
198
206
  /** Resolved, directly-fetchable URL for the attached document — a signed/serve
@@ -228,6 +236,12 @@ interface ManualDealMetadata {
228
236
  name: string;
229
237
  url: string;
230
238
  } | null;
239
+ /** The current field for the preview dialog's "Contract Summary" section.
240
+ * `notes` is the legacy key for rows written before this field existed. */
241
+ summary?: string | null;
242
+ /** Terms read from the uploaded contract via each app's own AI extraction
243
+ * flow. Both apps' real data already has this identical shape. */
244
+ contract_details?: MarketingDealContractDetails | null;
231
245
  }
232
246
  interface ManualDeal {
233
247
  id?: string;
@@ -262,9 +276,14 @@ interface ManualDealCardProps {
262
276
  * `EntityImageResolver` for why this package can't resolve storage paths
263
277
  * itself. */
264
278
  resolveImageUrl?: EntityImageResolver;
279
+ /** Rendered at the end of the desktop layout's amount/status column,
280
+ * after the status pill -- e.g. a commission breakdown. Same slot as
281
+ * `ProjectDealCard`'s `asideFooter`; this package has no opinion on what
282
+ * goes here. Desktop only for now -- see module doc. */
283
+ asideFooter?: ReactNode;
265
284
  className?: string;
266
285
  }
267
- declare function ManualDealCard({ deal, onPreview, onEdit, onDelete, onOpenDocument, resolveImageUrl, className, }: ManualDealCardProps): react.JSX.Element;
286
+ declare function ManualDealCard({ deal, onPreview, onEdit, onDelete, onOpenDocument, resolveImageUrl, asideFooter, className, }: ManualDealCardProps): react.JSX.Element;
268
287
 
269
288
  interface ManualDealPreviewDialogProps {
270
289
  deal: ManualDeal | null;
@@ -355,10 +374,15 @@ declare function ManualDealPreviewDialog({ deal, open, onOpenChange, onEdit, onO
355
374
  * it always fell back to "?" for an owner with no photo. clientapp used
356
375
  * `"initials"`, which correctly derives initials from `name`. Kept
357
376
  * `"initials"`, same reasoning as `ManualDealCard`.
358
- * - Owner name abbreviation: nukleus-app abbreviated via a local
359
- * `getInitialFullName(name, null, true)` helper ("J. Smith"); clientapp
360
- * rendered the name as-is. Not part of this design system (display nicety,
361
- * not core behavior) — rendered verbatim, same call as `ManualDealCard`.
377
+ * - Owner name abbreviation: originally reconciled as "render verbatim"
378
+ * (clientapp's behavior when this file was first built). Revisited when
379
+ * clientapp's `ProjectDealCard.tsx` was found to have since grown its own
380
+ * `getInitialFullName(name, null, true)` abbreviation ("J. Smith") --
381
+ * matching what nukleus-app's (by-then-retired) local component already
382
+ * did. Both apps' real current behavior agrees, so this renders abbreviated
383
+ * via `@nukleus-sports/core`'s `abbreviatePersonName` (the `EntityAvatar`
384
+ * still gets the raw `owner_name` for initials -- only the visible text
385
+ * span is abbreviated, same split as both apps' originals).
362
386
  * - Owner-name empty fallback: nukleus-app used a literal `"--"`; clientapp
363
387
  * used `"—"` (em dash). `formatDealDate` (from `@nukleus-sports/core`)
364
388
  * already established "—" as this design system's missing-value sentinel,
@@ -397,6 +421,11 @@ declare function ManualDealPreviewDialog({ deal, open, onOpenChange, onEdit, onO
397
421
  * `<button>` calling it instead of an `<a href>` — nukleus-app's adapter
398
422
  * can wire its demo-mode toast through this; clientapp simply never passes
399
423
  * it and always gets a real link.
424
+ * - Commission line: clientapp renders a per-deal commission breakdown
425
+ * ("$X to you · Y% agency commission") in the aside column, after the
426
+ * status pill; nukleus-app has no equivalent at all. Rather than teach
427
+ * this package the concept of a commission, `asideFooter` is a generic
428
+ * slot rendered in that exact spot — nukleus-app simply never passes it.
400
429
  *
401
430
  * No icon needed inlining — `ArrowDownFormIcon`, `CheckRingRoundIcon`, and
402
431
  * `XsViewInvoiceIcon` are all already in `@nukleus-sports/icons`.
@@ -452,8 +481,13 @@ interface ProjectDealCardProps {
452
481
  onCollabClick?: (e: MouseEvent<HTMLButtonElement>) => void;
453
482
  /** Passed straight through to this card's `EntityAvatar` instances. */
454
483
  resolveImageUrl?: EntityImageResolver;
484
+ /** Rendered at the end of the amount/status column, after the status pill
485
+ * -- e.g. a commission breakdown. This package has no opinion on what
486
+ * goes here (clientapp's real cards render a commission line nukleus-app
487
+ * has no equivalent for at all); omit for nothing extra. */
488
+ asideFooter?: ReactNode;
455
489
  className?: string;
456
490
  }
457
- declare function ProjectDealCard({ deal, isCompleted, collabMembership, collabHref, onCollabClick, resolveImageUrl, className, }: ProjectDealCardProps): react.JSX.Element;
491
+ declare function ProjectDealCard({ deal, isCompleted, collabMembership, collabHref, onCollabClick, resolveImageUrl, asideFooter, className, }: ProjectDealCardProps): react.JSX.Element;
458
492
 
459
- 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 };
493
+ export { ContractDetailsCard, type ContractDetailsCardDeliverable, type ContractDetailsCardProps, type ContractDetailsCardWarning, DealEmptyState, type DealEmptyStateProps, type ManualDeal, ManualDealCard, type ManualDealCardProps, type ManualDealDocumentRef, type ManualDealMetadata, ManualDealPreviewDialog, type ManualDealPreviewDialogProps, type MarketingDealContractDetails, type ProjectCollabMembership, type ProjectDeal, ProjectDealCard, type ProjectDealCardProps, type RowAction, RowActionsDropdown, type RowActionsDropdownProps, resolveDealDocument };