@cryptiklemur/lattice 1.11.1 → 1.11.2
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.
|
@@ -8,29 +8,34 @@ export function useChartFullscreen(): number | false {
|
|
|
8
8
|
return useContext(ChartFullscreenContext);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function FullscreenChartArea(props: { children: ReactNode }) {
|
|
11
|
+
function FullscreenChartArea(props: { children: ReactNode; ready: boolean }) {
|
|
12
12
|
var containerRef = useRef<HTMLDivElement>(null);
|
|
13
|
-
var [height, setHeight] = useState(
|
|
13
|
+
var [height, setHeight] = useState(0);
|
|
14
14
|
|
|
15
15
|
useEffect(function () {
|
|
16
|
-
if (!containerRef.current) return;
|
|
16
|
+
if (!props.ready || !containerRef.current) return;
|
|
17
|
+
var h = containerRef.current.clientHeight;
|
|
18
|
+
if (h > 0) setHeight(h - 48);
|
|
19
|
+
|
|
17
20
|
var observer = new ResizeObserver(function (entries) {
|
|
18
21
|
for (var i = 0; i < entries.length; i++) {
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
22
|
+
var newH = entries[i].contentRect.height;
|
|
23
|
+
if (newH > 0) setHeight(newH - 48);
|
|
21
24
|
}
|
|
22
25
|
});
|
|
23
26
|
observer.observe(containerRef.current);
|
|
24
|
-
var h = containerRef.current.clientHeight;
|
|
25
|
-
if (h > 0) setHeight(h);
|
|
26
27
|
return function () { observer.disconnect(); };
|
|
27
|
-
}, []);
|
|
28
|
+
}, [props.ready]);
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<div ref={containerRef} className="flex-1 p-6 overflow-auto min-h-0">
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
|
|
32
|
+
{height > 0 ? (
|
|
33
|
+
<ChartFullscreenContext.Provider value={height}>
|
|
34
|
+
{props.children}
|
|
35
|
+
</ChartFullscreenContext.Provider>
|
|
36
|
+
) : (
|
|
37
|
+
<div className="flex items-center justify-center h-full text-base-content/20 font-mono text-[11px]">Expanding...</div>
|
|
38
|
+
)}
|
|
34
39
|
</div>
|
|
35
40
|
);
|
|
36
41
|
}
|
|
@@ -177,7 +182,7 @@ export function ChartCard(props: ChartCardProps) {
|
|
|
177
182
|
</button>
|
|
178
183
|
</div>
|
|
179
184
|
</div>
|
|
180
|
-
<FullscreenChartArea>
|
|
185
|
+
<FullscreenChartArea ready={!animating}>
|
|
181
186
|
{props.children}
|
|
182
187
|
</FullscreenChartArea>
|
|
183
188
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptiklemur/lattice",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "Multi-machine agentic dashboard for Claude Code. Monitor sessions, manage MCP servers and skills, orchestrate across mesh-networked nodes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aaron Scherer <me@aaronscherer.me>",
|