@tangle-network/sandbox-ui 3.0.0 → 3.0.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.
- package/dist/globals.css +86 -25
- package/dist/{index-D2_4ONCz.d.ts → index-DpzFSqjG.d.ts} +1 -7
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/report-viewer.js +114 -74
- package/dist/runtime-viewer/{AgentGraphCanvas-CcBWMidO-DIW8tof6.js → AgentGraphCanvas-DGq7_u8--WPFPgd72.js} +2178 -2205
- package/dist/runtime-viewer/latest-events-CRq9sGkK-YFXUh9qO.js +9586 -0
- package/dist/runtime-viewer/{sandbox-ui-CUj4Q1P_.css → sandbox-ui-BEziPi7D.css} +1 -1
- package/dist/styles.css +87 -26
- package/dist/tailwind.css +72 -13
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/{workspace--GvnZNpH.js → workspace-CAdAoNmW.js} +11 -17
- package/dist/workspace-viewer.js +9699 -10154
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +6 -6
- package/dist/runtime-viewer/latest-events-BfRc-7l9-QhJD89rn.js +0 -3808
|
@@ -1091,27 +1091,21 @@ function RuntimePane({ title = "Runtime", subtitle = "Session state, execution o
|
|
|
1091
1091
|
const MINUTE = 6e4;
|
|
1092
1092
|
const HOUR = 60 * MINUTE;
|
|
1093
1093
|
const DAY = 24 * HOUR;
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
*/
|
|
1094
|
+
const UNITS = [
|
|
1095
|
+
["y", 365 * DAY],
|
|
1096
|
+
["mo", 30 * DAY],
|
|
1097
|
+
["w", 7 * DAY],
|
|
1098
|
+
["d", DAY],
|
|
1099
|
+
["h", HOUR],
|
|
1100
|
+
["m", MINUTE]
|
|
1101
|
+
];
|
|
1102
|
+
/** Compact age without an ago suffix; invalid dates are empty and future dates read now. */
|
|
1104
1103
|
function formatRelativeAge(date, now = Date.now()) {
|
|
1105
1104
|
const timestamp = date instanceof Date ? date.getTime() : new Date(date).getTime();
|
|
1106
1105
|
if (Number.isNaN(timestamp)) return "";
|
|
1107
1106
|
const elapsed = Math.max(0, now - timestamp);
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
if (elapsed < DAY) return `${Math.floor(elapsed / HOUR)}h`;
|
|
1111
|
-
if (elapsed < WEEK) return `${Math.floor(elapsed / DAY)}d`;
|
|
1112
|
-
if (elapsed < MONTH) return `${Math.floor(elapsed / WEEK)}w`;
|
|
1113
|
-
if (elapsed < YEAR) return `${Math.floor(elapsed / MONTH)}mo`;
|
|
1114
|
-
return `${Math.floor(elapsed / YEAR)}y`;
|
|
1107
|
+
const unit = UNITS.find(([, duration]) => !(elapsed < duration));
|
|
1108
|
+
return unit ? `${Math.floor(elapsed / unit[1])}${unit[0]}` : "now";
|
|
1115
1109
|
}
|
|
1116
1110
|
// src/workspace/session-optimistic.ts
|
|
1117
1111
|
/**
|