@cosmicdrift/kumiko-renderer 0.164.0 → 0.165.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.165.0",
|
|
4
4
|
"description": "Platform-agnostic React renderer for Kumiko screens. Contains the shared logic — primitives-contract, hooks, KumikoScreen, navigation & SSE abstractions — that any platform-specific renderer (web, native) composes. No DOM, no EventSource, no react-dom.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
19
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
18
|
+
"@cosmicdrift/kumiko-framework": "0.165.0",
|
|
19
|
+
"@cosmicdrift/kumiko-headless": "0.165.0",
|
|
20
20
|
"react": "^19.2.6",
|
|
21
21
|
"temporal-polyfill": "^0.3.2"
|
|
22
22
|
},
|
package/src/format-when.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toInstant } from "@cosmicdrift/kumiko-headless";
|
|
2
2
|
|
|
3
3
|
// Shared timestamp formatter for operator screens (audit log, job runs) —
|
|
4
4
|
// falls back to the raw ISO string on an unparseable value instead of "Invalid Date".
|
|
5
5
|
export function formatWhen(value: string): string {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return toInstant(value).toLocaleString();
|
|
8
8
|
} catch {
|
|
9
|
-
|
|
10
|
-
// timestamps (still valid `new Date` input) throw here. Retry as a
|
|
11
|
-
// local wall-clock time before giving up and returning the raw string.
|
|
12
|
-
try {
|
|
13
|
-
return Temporal.PlainDateTime.from(value)
|
|
14
|
-
.toZonedDateTime(Temporal.Now.timeZoneId())
|
|
15
|
-
.toInstant()
|
|
16
|
-
.toLocaleString();
|
|
17
|
-
} catch {
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
9
|
+
return value;
|
|
20
10
|
}
|
|
21
11
|
}
|
|
@@ -108,9 +108,6 @@ export function useStreamHandler<TChunk = unknown>(
|
|
|
108
108
|
// skip: autoStart off — streams are usually user-triggered
|
|
109
109
|
if (!autoStart) return;
|
|
110
110
|
void start();
|
|
111
|
-
return () => {
|
|
112
|
-
activeCtrl.current?.abort();
|
|
113
|
-
};
|
|
114
111
|
}, [autoStart, start]);
|
|
115
112
|
|
|
116
113
|
useEffect(() => {
|