@optifye/dashboard-core 6.12.34 → 6.12.35
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.
- package/dist/index.css +3 -0
- package/dist/index.js +12 -7
- package/dist/index.mjs +12 -7
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -4473,6 +4473,9 @@ body {
|
|
|
4473
4473
|
--tw-numeric-spacing: tabular-nums;
|
|
4474
4474
|
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
|
|
4475
4475
|
}
|
|
4476
|
+
.leading-4 {
|
|
4477
|
+
line-height: 1rem;
|
|
4478
|
+
}
|
|
4476
4479
|
.leading-5 {
|
|
4477
4480
|
line-height: 1.25rem;
|
|
4478
4481
|
}
|
package/dist/index.js
CHANGED
|
@@ -59668,16 +59668,19 @@ var buildSnapshotRows = (entries, lines) => {
|
|
|
59668
59668
|
}));
|
|
59669
59669
|
};
|
|
59670
59670
|
var formatCrossedLineNames = (event) => {
|
|
59671
|
-
|
|
59672
|
-
|
|
59673
|
-
|
|
59674
|
-
return `${
|
|
59671
|
+
const names = event.crossedLines.map((line) => line.lineName).filter(Boolean);
|
|
59672
|
+
if (names.length === 0) return "another line";
|
|
59673
|
+
if (names.length === 1) return names[0];
|
|
59674
|
+
if (names.length === 2) return `${names[0]} and ${names[1]}`;
|
|
59675
|
+
return `${names[0]}, ${names[1]} +${names.length - 2} more`;
|
|
59675
59676
|
};
|
|
59676
59677
|
var getDirectionCopy = (direction, event) => {
|
|
59677
59678
|
const crossedNames = formatCrossedLineNames(event);
|
|
59678
59679
|
const rankChange = Math.abs(event.previousRank - event.currentRank);
|
|
59680
|
+
const movementLabel = direction === "up" ? "moved up" : "moved down";
|
|
59679
59681
|
return direction === "up" ? {
|
|
59680
|
-
title:
|
|
59682
|
+
title: `${event.crossingLineName} ${movementLabel}`,
|
|
59683
|
+
context: `You passed ${crossedNames}`,
|
|
59681
59684
|
accent: "border-l-emerald-500",
|
|
59682
59685
|
iconBg: "bg-emerald-100",
|
|
59683
59686
|
iconText: "text-emerald-600",
|
|
@@ -59685,7 +59688,8 @@ var getDirectionCopy = (direction, event) => {
|
|
|
59685
59688
|
action: "text-emerald-700 hover:text-emerald-800",
|
|
59686
59689
|
rankChange
|
|
59687
59690
|
} : {
|
|
59688
|
-
title: `${
|
|
59691
|
+
title: `${event.crossingLineName} ${movementLabel}`,
|
|
59692
|
+
context: `${crossedNames} crossed you`,
|
|
59689
59693
|
accent: "border-l-red-500",
|
|
59690
59694
|
iconBg: "bg-red-100",
|
|
59691
59695
|
iconText: "text-red-600",
|
|
@@ -59786,6 +59790,7 @@ var LineOvertakeNotificationPopup = ({
|
|
|
59786
59790
|
) }) }),
|
|
59787
59791
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
59788
59792
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-2 mb-2", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-sm text-gray-900 leading-5", children: directionCopy.title }) }),
|
|
59793
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs font-medium leading-4 text-slate-500", children: directionCopy.context }),
|
|
59789
59794
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
59790
59795
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[15px] font-semibold text-slate-500", children: "New rank:" }),
|
|
59791
59796
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center rounded-full border px-2.5 py-0.5 text-[15px] font-bold ${directionCopy.pill}`, children: [
|
|
@@ -59805,7 +59810,7 @@ var LineOvertakeNotificationPopup = ({
|
|
|
59805
59810
|
onClick: onOpenLeaderboard,
|
|
59806
59811
|
className: `inline-flex items-center gap-1.5 text-xs font-semibold transition-colors ${directionCopy.action}`,
|
|
59807
59812
|
children: [
|
|
59808
|
-
"
|
|
59813
|
+
"Open leaderboard",
|
|
59809
59814
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "w-3.5 h-3.5" })
|
|
59810
59815
|
]
|
|
59811
59816
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -59639,16 +59639,19 @@ var buildSnapshotRows = (entries, lines) => {
|
|
|
59639
59639
|
}));
|
|
59640
59640
|
};
|
|
59641
59641
|
var formatCrossedLineNames = (event) => {
|
|
59642
|
-
|
|
59643
|
-
|
|
59644
|
-
|
|
59645
|
-
return `${
|
|
59642
|
+
const names = event.crossedLines.map((line) => line.lineName).filter(Boolean);
|
|
59643
|
+
if (names.length === 0) return "another line";
|
|
59644
|
+
if (names.length === 1) return names[0];
|
|
59645
|
+
if (names.length === 2) return `${names[0]} and ${names[1]}`;
|
|
59646
|
+
return `${names[0]}, ${names[1]} +${names.length - 2} more`;
|
|
59646
59647
|
};
|
|
59647
59648
|
var getDirectionCopy = (direction, event) => {
|
|
59648
59649
|
const crossedNames = formatCrossedLineNames(event);
|
|
59649
59650
|
const rankChange = Math.abs(event.previousRank - event.currentRank);
|
|
59651
|
+
const movementLabel = direction === "up" ? "moved up" : "moved down";
|
|
59650
59652
|
return direction === "up" ? {
|
|
59651
|
-
title:
|
|
59653
|
+
title: `${event.crossingLineName} ${movementLabel}`,
|
|
59654
|
+
context: `You passed ${crossedNames}`,
|
|
59652
59655
|
accent: "border-l-emerald-500",
|
|
59653
59656
|
iconBg: "bg-emerald-100",
|
|
59654
59657
|
iconText: "text-emerald-600",
|
|
@@ -59656,7 +59659,8 @@ var getDirectionCopy = (direction, event) => {
|
|
|
59656
59659
|
action: "text-emerald-700 hover:text-emerald-800",
|
|
59657
59660
|
rankChange
|
|
59658
59661
|
} : {
|
|
59659
|
-
title: `${
|
|
59662
|
+
title: `${event.crossingLineName} ${movementLabel}`,
|
|
59663
|
+
context: `${crossedNames} crossed you`,
|
|
59660
59664
|
accent: "border-l-red-500",
|
|
59661
59665
|
iconBg: "bg-red-100",
|
|
59662
59666
|
iconText: "text-red-600",
|
|
@@ -59757,6 +59761,7 @@ var LineOvertakeNotificationPopup = ({
|
|
|
59757
59761
|
) }) }),
|
|
59758
59762
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
59759
59763
|
/* @__PURE__ */ jsx("div", { className: "flex items-start gap-2 mb-2", children: /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm text-gray-900 leading-5", children: directionCopy.title }) }),
|
|
59764
|
+
/* @__PURE__ */ jsx("p", { className: "mb-3 text-xs font-medium leading-4 text-slate-500", children: directionCopy.context }),
|
|
59760
59765
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
59761
59766
|
/* @__PURE__ */ jsx("span", { className: "text-[15px] font-semibold text-slate-500", children: "New rank:" }),
|
|
59762
59767
|
/* @__PURE__ */ jsxs("span", { className: `inline-flex items-center rounded-full border px-2.5 py-0.5 text-[15px] font-bold ${directionCopy.pill}`, children: [
|
|
@@ -59776,7 +59781,7 @@ var LineOvertakeNotificationPopup = ({
|
|
|
59776
59781
|
onClick: onOpenLeaderboard,
|
|
59777
59782
|
className: `inline-flex items-center gap-1.5 text-xs font-semibold transition-colors ${directionCopy.action}`,
|
|
59778
59783
|
children: [
|
|
59779
|
-
"
|
|
59784
|
+
"Open leaderboard",
|
|
59780
59785
|
/* @__PURE__ */ jsx(ArrowRight, { className: "w-3.5 h-3.5" })
|
|
59781
59786
|
]
|
|
59782
59787
|
}
|