Skip to content

Commit f85d68a

Browse files
committed
chore: update dependencies and UI upgrades
1 parent 27da0fb commit f85d68a

18 files changed

+772
-297
lines changed

code/app/globals.css

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,22 @@
197197
}
198198
}
199199

200-
.transparent-square-background {
201-
background-color: #ffffff;
202-
background-size: 16px 16px;
203-
background-position:
204-
0 0,
205-
8px 8px;
206-
background-image:
207-
linear-gradient(
208-
45deg,
209-
#eee 25%,
210-
transparent 25%,
211-
transparent 75%,
212-
#eee 75%
213-
),
214-
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);
200+
.pulseOverlay {
201+
position: absolute;
202+
inset: 0;
203+
background: #000000;
204+
opacity: 0.25;
205+
animation: pulseOverlay 1.5s ease-in-out infinite;
206+
}
207+
208+
@keyframes pulseOverlay {
209+
0% {
210+
opacity: 0.25;
211+
}
212+
50% {
213+
opacity: 0.5;
214+
}
215+
100% {
216+
opacity: 0.25;
217+
}
215218
}

code/components/room-components/help/help-view.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
import { Eye, MousePointer } from "lucide-react";
5+
import { Eye, MapPinned, MousePointer } from "lucide-react";
66
import { SYSTEM_OS } from "@/lib/utils";
77
import { HelpShortcutElement } from "./help-shortcut-element";
88

@@ -18,6 +18,14 @@ export const HelpView = () => {
1818
[SYSTEM_OS.OTHER]: "Ctrl \\",
1919
}}
2020
/>
21+
<HelpShortcutElement
22+
icon={<MapPinned />}
23+
label="Show/Hide Minimap"
24+
shortcuts={{
25+
[SYSTEM_OS.MAC]: "N",
26+
[SYSTEM_OS.OTHER]: "N",
27+
}}
28+
/>
2129
</div>
2230
<div className="flex flex-col gap-3">
2331
<HelpShortcutElement

code/components/room-components/hooks/use-keyboard-handler.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export function useKeyboardHandler() {
5151
const setImagesLLMPopupVisible = useIACapabilities(
5252
(state) => state.setImagesLLMPopupVisible
5353
);
54+
const showMinimap = useCollaborationRoom((state) => state.ui.minimap);
55+
const setShowMinimap = useCollaborationRoom((state) => state.setShowMinimap);
5456

5557
const triggerTool = React.useCallback(
5658
(toolName: string) => {
@@ -515,4 +517,8 @@ export function useKeyboardHandler() {
515517
sidebarToggle(SIDEBAR_ELEMENTS.comments);
516518
}
517519
}, ["KeyH"]);
520+
521+
useKeyDown(() => {
522+
setShowMinimap(!showMinimap);
523+
}, ["KeyN"]);
518524
}

code/components/room-components/images-library/edit-image.image.tsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
"use client";
66

77
import React from "react";
8-
import { Badge } from "@/components/ui/badge";
8+
// import { Badge } from "@/components/ui/badge";
99
import { Image } from "lucide-react";
1010
import { useWeave } from "@inditextech/weave-react";
1111
import { useCollaborationRoom } from "@/store/store";
1212
import { SIDEBAR_ELEMENTS } from "@/lib/constants";
1313
import { ImageEntity } from "./types";
1414
import { useIACapabilities } from "@/store/ia";
1515
import { useIACapabilitiesV2 } from "@/store/ia-v2";
16+
import { cn } from "@/lib/utils";
1617

17-
export const EditImage = ({ image }: { image: ImageEntity }) => {
18+
type EditImageProps = { image: ImageEntity; selected: boolean };
19+
20+
export const EditImage = ({ image, selected }: Readonly<EditImageProps>) => {
1821
const instance = useWeave((state) => state.instance);
1922

2023
const sidebarLeftActive = useCollaborationRoom(
@@ -47,7 +50,13 @@ export const EditImage = ({ image }: { image: ImageEntity }) => {
4750
return (
4851
<div
4952
key={image.imageId}
50-
className="group block w-full bg-light-background-1 object-cover relative border border-zinc-200"
53+
className={cn(
54+
"group block w-full bg-light-background-1 object-cover relative border-0 border-zinc-200",
55+
{
56+
["after:content-[''] after:absolute after:inset-0 after:bg-black/40 after:opacity-100 after:transition-opacity"]:
57+
selected,
58+
}
59+
)}
5160
>
5261
{((image.removalJobId === null &&
5362
["created", "pending", "working", "failed"].includes(image.status)) ||
@@ -61,7 +70,7 @@ export const EditImage = ({ image }: { image: ImageEntity }) => {
6170
}}
6271
>
6372
{/* eslint-disable-next-line jsx-a11y/alt-text */}
64-
<Image strokeWidth={1} size={48} />
73+
<Image strokeWidth={1} size={32} stroke="#000000" fill="#ffffff" />
6574
</div>
6675
)}
6776
{["completed"].includes(image.status) && (
@@ -82,7 +91,13 @@ export const EditImage = ({ image }: { image: ImageEntity }) => {
8291
alt="An image"
8392
/>
8493
)}
85-
{image.removalJobId === null && ["pending"].includes(image.status) && (
94+
{(["pending", "working"].includes(image.status) ||
95+
(image.removalJobId !== null &&
96+
image.removalStatus !== null &&
97+
["pending", "working"].includes(image.removalStatus))) && (
98+
<div className="pulseOverlay"></div>
99+
)}
100+
{/* {image.removalJobId === null && ["pending"].includes(image.status) && (
86101
<div className="absolute top-0 left-0 right-0 bottom-0 bg-black/50 text-white flex flex-col gap-1 justify-center items-center">
87102
<Badge
88103
className="px-1 font-inter tabular-nums rounded font-inter text-[11px]"
@@ -113,7 +128,7 @@ export const EditImage = ({ image }: { image: ImageEntity }) => {
113128
REMOVING
114129
</Badge>
115130
</div>
116-
)}
131+
)} */}
117132
</div>
118133
);
119134
};

code/components/room-components/images-library/generated-image.image.tsx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@
55
"use client";
66

77
import React from "react";
8-
import { Badge } from "@/components/ui/badge";
8+
// import { Badge } from "@/components/ui/badge";
99
import { Image } from "lucide-react";
1010
import { useWeave } from "@inditextech/weave-react";
1111
import { useCollaborationRoom } from "@/store/store";
1212
import { SIDEBAR_ELEMENTS } from "@/lib/constants";
1313
import { ImageEntity } from "./types";
1414
import { useIACapabilities } from "@/store/ia";
1515
import { useIACapabilitiesV2 } from "@/store/ia-v2";
16+
import { cn } from "@/lib/utils";
1617

17-
export const GeneratedImage = ({ image }: { image: ImageEntity }) => {
18+
type GeneratedImageProps = { image: ImageEntity; selected: boolean };
19+
20+
export const GeneratedImage = ({
21+
image,
22+
selected,
23+
}: Readonly<GeneratedImageProps>) => {
1824
const instance = useWeave((state) => state.instance);
1925

2026
const sidebarLeftActive = useCollaborationRoom(
@@ -47,7 +53,7 @@ export const GeneratedImage = ({ image }: { image: ImageEntity }) => {
4753
return (
4854
<div
4955
key={image.imageId}
50-
className="group block w-full bg-light-background-1 object-cover relative border border-zinc-200"
56+
className="group block w-full bg-light-background-1 object-cover relative border-0 border-zinc-200"
5157
>
5258
{((image.removalJobId === null &&
5359
["created", "pending", "working", "failed"].includes(image.status)) ||
@@ -61,13 +67,16 @@ export const GeneratedImage = ({ image }: { image: ImageEntity }) => {
6167
}}
6268
>
6369
{/* eslint-disable-next-line jsx-a11y/alt-text */}
64-
<Image strokeWidth={1} size={48} />
70+
<Image strokeWidth={1} size={32} stroke="#000000" fill="#ffffff" />
6571
</div>
6672
)}
6773
{["completed"].includes(image.status) && (
6874
// eslint-disable-next-line @next/next/no-img-element
6975
<img
70-
className="w-full block object-cover"
76+
className={cn("w-full block object-cover", {
77+
[" after:content-[''] after:absolute after:inset-0 after:bg-black/40 after:opacity-0 hover:after:opacity-100 after:transition-opacity"]:
78+
selected,
79+
})}
7180
style={{
7281
aspectRatio: `${image.aspectRatio}`,
7382
}}
@@ -82,7 +91,13 @@ export const GeneratedImage = ({ image }: { image: ImageEntity }) => {
8291
alt="An image"
8392
/>
8493
)}
85-
{image.removalJobId === null && ["pending"].includes(image.status) && (
94+
{(["pending", "working"].includes(image.status) ||
95+
(image.removalJobId !== null &&
96+
image.removalStatus !== null &&
97+
["pending", "working"].includes(image.removalStatus))) && (
98+
<div className="pulseOverlay"></div>
99+
)}
100+
{/* {image.removalJobId === null && ["pending"].includes(image.status) && (
86101
<div className="absolute top-0 left-0 right-0 bottom-0 bg-black/50 text-white flex flex-col gap-1 justify-center items-center">
87102
<Badge
88103
className="px-1 font-inter tabular-nums rounded font-inter text-[11px]"
@@ -113,7 +128,7 @@ export const GeneratedImage = ({ image }: { image: ImageEntity }) => {
113128
REMOVING
114129
</Badge>
115130
</div>
116-
)}
131+
)} */}
117132
</div>
118133
);
119134
};

0 commit comments

Comments
 (0)