@valpro-labs/ui 1.1.10 → 1.2.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,53 @@
1
+ interface MatchMultiKillCounts {
2
+ /** 2-kill rounds. */
3
+ k2: number;
4
+ /** 3-kill rounds. */
5
+ k3: number;
6
+ /** 4-kill rounds. */
7
+ k4: number;
8
+ /** Ace (5-kill) rounds. */
9
+ k5: number;
10
+ }
11
+ interface MatchMultiKillRow {
12
+ /** Stable id — used as React key. */
13
+ id: string;
14
+ /** Player display name. Truncated with `numberOfLines={1}`. */
15
+ name: string;
16
+ /** Agent display icon URL. Falls back to a muted placeholder square. */
17
+ agentIconUrl?: string;
18
+ /** Per-tier counts. Zero values render muted. */
19
+ counts: MatchMultiKillCounts;
20
+ }
21
+ interface MatchMultiKillColumnLabels {
22
+ player: string;
23
+ k2: string;
24
+ k3: string;
25
+ k4: string;
26
+ k5: string;
27
+ }
28
+ interface MatchMultiKillTableProps {
29
+ /** One row per player, in display order. */
30
+ rows: MatchMultiKillRow[];
31
+ /**
32
+ * Column header labels. Defaults to English / `NK` shorthand — override to
33
+ * localise or to match your app's existing copy.
34
+ */
35
+ columnLabels?: Partial<MatchMultiKillColumnLabels>;
36
+ /** Extra classes merged onto the outer card wrapper. */
37
+ className?: string;
38
+ }
39
+ /**
40
+ * Multi-kill tally table used on the match-detail screen — agent icon +
41
+ * name on the left, then fixed-width columns counting 2K / 3K / 4K / 5K
42
+ * rounds per player. Zero counts render muted so the rows with actual
43
+ * multi-kills read at a glance.
44
+ *
45
+ * Data-free: the consumer pre-computes the tier counts and the row order.
46
+ * Render two tables (ally / enemy) when the app needs the team split; this
47
+ * block is a single table. Pair with `<SectionTitle>` above for a header +
48
+ * team-filter slot.
49
+ */
50
+ declare function MatchMultiKillTable({ rows, columnLabels, className }: MatchMultiKillTableProps): import("react/jsx-runtime").JSX.Element | null;
51
+ export { MatchMultiKillTable };
52
+ export type { MatchMultiKillTableProps, MatchMultiKillRow, MatchMultiKillCounts, MatchMultiKillColumnLabels, };
53
+ //# sourceMappingURL=match-multi-kill-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match-multi-kill-table.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/match-multi-kill-table.tsx"],"names":[],"mappings":"AASA,UAAU,oBAAoB;IAC5B,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,iBAAiB;IACzB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,UAAU,0BAA0B;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,wBAAwB;IAChC,4CAA4C;IAC5C,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACnD,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD;;;;;;;;;;GAUG;AACH,iBAAS,mBAAmB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,wBAAwB,kDAgBvF;AAsDD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EACV,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,GAC3B,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View } from 'react-native';
3
+ import { Image } from '../../components/ui/image';
4
+ import { Separator } from '../../components/ui/separator';
5
+ import { Text } from '../../components/ui/text';
6
+ import { cn } from '../../lib/utils';
7
+ const DEFAULT_LABELS = {
8
+ player: 'PLAYER',
9
+ k2: '2K',
10
+ k3: '3K',
11
+ k4: '4K',
12
+ k5: '5K',
13
+ };
14
+ const TIER_KEYS = ['k2', 'k3', 'k4', 'k5'];
15
+ /**
16
+ * Multi-kill tally table used on the match-detail screen — agent icon +
17
+ * name on the left, then fixed-width columns counting 2K / 3K / 4K / 5K
18
+ * rounds per player. Zero counts render muted so the rows with actual
19
+ * multi-kills read at a glance.
20
+ *
21
+ * Data-free: the consumer pre-computes the tier counts and the row order.
22
+ * Render two tables (ally / enemy) when the app needs the team split; this
23
+ * block is a single table. Pair with `<SectionTitle>` above for a header +
24
+ * team-filter slot.
25
+ */
26
+ function MatchMultiKillTable({ rows, columnLabels, className }) {
27
+ if (rows.length === 0)
28
+ return null;
29
+ const labels = { ...DEFAULT_LABELS, ...columnLabels };
30
+ return (_jsxs(View, { className: cn('bg-card overflow-hidden rounded-2xl', className), children: [_jsx(MultiKillHeader, { labels: labels }), _jsx(Separator, { className: "bg-black/50! dark:bg-black/30!" }), rows.map((row, index) => (_jsxs(View, { children: [index > 0 && _jsx(Separator, { className: "bg-black/50! dark:bg-black/30!" }), _jsx(MultiKillRow, { row: row })] }, row.id)))] }));
31
+ }
32
+ function MultiKillHeader({ labels }) {
33
+ return (_jsxs(View, { className: "flex-row items-center px-3 py-2", children: [_jsx(Text, { variant: "muted", className: "flex-1 text-xs font-semibold tracking-wider", children: labels.player }), TIER_KEYS.map((key) => (_jsx(Text, { variant: "muted", className: "w-10 text-center text-xs font-semibold tracking-wider", children: labels[key] }, key)))] }));
34
+ }
35
+ function MultiKillRow({ row }) {
36
+ return (_jsxs(View, { className: "flex-row items-center px-3 py-2.5", children: [_jsxs(View, { className: "flex-1 flex-row items-center gap-x-2", children: [row.agentIconUrl ? (_jsx(Image, { source: row.agentIconUrl, style: { width: 28, height: 28, borderRadius: 4 }, contentFit: "cover" })) : (_jsx(View, { className: "bg-muted h-7 w-7 rounded" })), _jsx(Text, { className: "flex-1 text-sm font-medium", numberOfLines: 1, children: row.name })] }), TIER_KEYS.map((key) => {
37
+ const value = row.counts[key];
38
+ return (_jsx(Text, { className: cn('w-10 text-center text-sm tabular-nums', value === 0 && 'text-muted-foreground'), children: value }, key));
39
+ })] }));
40
+ }
41
+ export { MatchMultiKillTable };
42
+ //# sourceMappingURL=match-multi-kill-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match-multi-kill-table.js","sourceRoot":"","sources":["../../../src/components/blocks/match-multi-kill-table.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AA4CjC,MAAM,cAAc,GAA+B;IACjD,MAAM,EAAE,QAAQ;IAChB,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACT,CAAC;AAEF,MAAM,SAAS,GAAmC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,SAAS,mBAAmB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAA4B;IACtF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,MAAM,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,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AE,EACjD,UAAU,EAAC,OAAO,GAClB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,SAAS,EAAC,0BAA0B,GAAG,CAC9C,EACD,KAAC,IAAI,IAAC,SAAS,EAAC,4BAA4B,EAAC,aAAa,EAAE,CAAC,YAC1D,GAAG,CAAC,IAAI,GACJ,IACF,EACN,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACrB,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC9B,OAAO,CACL,KAAC,IAAI,IAEH,SAAS,EAAE,EAAE,CACX,uCAAuC,EACvC,KAAK,KAAK,CAAC,IAAI,uBAAuB,CACvC,YACA,KAAK,IALD,GAAG,CAMH,CACR,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valpro-labs/ui",
3
- "version": "1.1.10",
3
+ "version": "1.2.0",
4
4
  "description": "Cross-platform UI component library for Valpro Labs",
5
5
  "homepage": "https://github.com/valpro-labs/ui#readme",
6
6
  "bugs": {