fix: prettier tailwindcss classname sorting

This commit is contained in:
DIYgod
2025-10-21 16:49:19 +08:00
parent 5a90d145a0
commit 8757e5a2ef
387 changed files with 1529 additions and 1529 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ const AppSkeleton = () => {
return (
<div className="flex size-full">
<div
className="bg-sidebar h-full shrink-0"
className="h-full shrink-0 bg-sidebar"
style={{
width: `${feedColWidth}px`,
}}
@@ -99,7 +99,7 @@ export const FeedbackIssue = (_props: {
<p className="mt-8">
Still having this issue? Please give feedback in GitHub, thanks!
<a
className="text-accent hover:text-accent/90 ml-2 cursor-pointer duration-200"
className="ml-2 cursor-pointer text-accent duration-200 hover:text-accent/90"
href={getNewIssueUrl({
// error: error instanceof Error ? error : undefined,
// title: `Error: ${message}`,
@@ -52,7 +52,7 @@ export const NotFound = () => {
}
return (
<div className="prose center dark:prose-invert m-auto size-full flex-col">
<div className="prose center m-auto size-full flex-col dark:prose-invert">
<main className="flex grow flex-col items-center justify-center">
<div className="center mb-8 flex">
<Logo className="size-20" />
@@ -205,12 +205,12 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
return (
<div className="pointer-events-auto max-w-[400px] px-2">
<div className="mb-4 flex flex-col text-center">
<h3 className="text-text mb-2 mt-1 font-semibold">{t("share.title")}</h3>
<h3 className="mb-2 mt-1 font-semibold text-text">{t("share.title")}</h3>
{(() => {
const entry = getEntry(entryId)
const title = entry?.title
return title ? (
<p className="text-text-secondary mt-1 min-w-0 text-wrap text-left text-sm font-medium">
<p className="mt-1 min-w-0 text-wrap text-left text-sm font-medium text-text-secondary">
{title}
</p>
) : null
@@ -219,7 +219,7 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
<div className="mb-6">
<div className="mb-3">
<h4 className="text-text-secondary text-xs font-medium uppercase tracking-wide">
<h4 className="text-xs font-medium uppercase tracking-wide text-text-secondary">
{t("share.social_media")}
</h4>
</div>
@@ -241,7 +241,7 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
>
<i className={cn(option.icon, "size-5", option.color)} />
</div>
<span className="text-text-secondary text-xs font-medium">{option.label}</span>
<span className="text-xs font-medium text-text-secondary">{option.label}</span>
</button>
))}
</div>
@@ -249,7 +249,7 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
<div>
<div className="mb-3">
<h4 className="text-text-secondary text-xs font-medium uppercase tracking-wide">
<h4 className="text-xs font-medium uppercase tracking-wide text-text-secondary">
{t("share.actions")}
</h4>
</div>
@@ -259,7 +259,7 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
key={option.id}
type="button"
className={cn(
"cursor-button relative flex select-none items-center rounded-lg",
"relative flex cursor-button select-none items-center rounded-lg",
"text-sm outline-none transition-all duration-200",
"hover:bg-fill-secondary/80 active:bg-fill-secondary",
"group",
@@ -278,7 +278,7 @@ export const SharePanel = ({ entryId }: SharePanelProps) => {
className={cn(option.icon, "size-3.5", option.color || "text-text-secondary")}
/>
</div>
<span className="text-text text-xs font-medium">{option.label}</span>
<span className="text-xs font-medium text-text">{option.label}</span>
</div>
</button>
))}
@@ -15,7 +15,7 @@ const EntryNotFoundErrorFallback: FC<AppErrorFallbackProps> = ({ resetError, err
useResetErrorWhenRouteChange(resetError)
const navigate = useNavigate()
return (
<div className="bg-theme-background flex w-full flex-1 flex-col items-center justify-center rounded-md p-2">
<div className="flex w-full flex-1 flex-col items-center justify-center rounded-md bg-theme-background p-2">
<div className="center m-auto flex max-w-prose flex-col gap-4 text-center">
<div className="center mb-8 flex">
<Logo className="size-20" />
@@ -15,7 +15,7 @@ const FeedNotFoundErrorFallback: FC<AppErrorFallbackProps> = ({ resetError, erro
useResetErrorWhenRouteChange(resetError)
const navigate = useNavigate()
return (
<div className="bg-theme-background flex w-full flex-col items-center justify-center rounded-md p-2">
<div className="flex w-full flex-col items-center justify-center rounded-md bg-theme-background p-2">
<div className="center m-auto flex max-w-prose flex-col gap-4 text-center">
<div className="center mb-8 flex">
<Logo className="size-20" />
@@ -14,7 +14,7 @@ const ModalErrorFallback: FC<AppErrorFallbackProps> = (props) => {
const modal = useCurrentModal()
return (
<m.div
className="bg-theme-background flex flex-col items-center justify-center rounded-md p-2"
className="flex flex-col items-center justify-center rounded-md bg-theme-background p-2"
exit={{
opacity: 0,
scale: 0.9,
@@ -11,7 +11,7 @@ const PageErrorFallback: FC<AppErrorFallbackProps> = (props) => {
const { message, stack } = parseError(props.error)
useResetErrorWhenRouteChange(props.resetError)
return (
<div className="bg-theme-background pointer-events-auto flex w-full flex-col items-center justify-center rounded-md p-2">
<div className="pointer-events-auto flex w-full flex-col items-center justify-center rounded-md bg-theme-background p-2">
<div className="m-auto max-w-prose text-center">
<div className="mb-4">
<i className="i-mgc-bug-cute-re text-4xl text-red-500" />
@@ -34,16 +34,16 @@ interface AISummaryCardBaseProps {
const DefaultLoadingState = () => (
<div className="space-y-2">
<div className="bg-material-ultra-thick h-3 w-full animate-pulse rounded-lg" />
<div className="bg-material-ultra-thick h-3 w-[92%] animate-pulse rounded-lg" />
<div className="bg-material-ultra-thick h-3 w-[85%] animate-pulse rounded-lg" />
<div className="h-3 w-full animate-pulse rounded-lg bg-material-ultra-thick" />
<div className="h-3 w-[92%] animate-pulse rounded-lg bg-material-ultra-thick" />
<div className="h-3 w-[85%] animate-pulse rounded-lg bg-material-ultra-thick" />
</div>
)
const DefaultEmptyState = ({ message }: { message: string }) => (
<div className="py-4 text-center">
<i className="i-mingcute-document-line text-text-tertiary mb-2 text-2xl" />
<p className="text-text-secondary text-sm">{message}</p>
<i className="i-mingcute-document-line mb-2 text-2xl text-text-tertiary" />
<p className="text-sm text-text-secondary">{message}</p>
</div>
)
@@ -164,7 +164,7 @@ export const AISummaryCardBase: React.FC<AISummaryCardBaseProps> = ({
{isLoading ? (
loadingComponent || <DefaultLoadingState />
) : hasContent ? (
<Markdown className="prose-sm prose-p:m-0 max-w-none">{String(content)}</Markdown>
<Markdown className="prose-sm max-w-none prose-p:m-0">{String(content)}</Markdown>
) : (
emptyComponent || <DefaultEmptyState message={t("ai.summary_not_available")} />
)}
@@ -97,9 +97,9 @@ export const Autocomplete = ({
style={{ zIndex }}
onWheel={stopPropagation}
className={cn(
"bg-material-medium backdrop-blur-background text-text pointer-events-auto",
"pointer-events-auto bg-material-medium text-text backdrop-blur-background",
"shadow-context-menu min-w-32 overflow-hidden rounded-[6px] border p-1",
"motion-scale-in-75 motion-duration-150 text-body lg:animate-none",
"text-body motion-scale-in-75 motion-duration-150 lg:animate-none",
"w-[var(--input-width)] empty:invisible",
)}
>
@@ -66,7 +66,7 @@ export const HeaderActionButton = ({
onClick={onClick}
disabled={disabled || loading}
className={cn(
"no-drag-region group relative flex items-center gap-2 rounded-lg px-3 py-2",
"group no-drag-region relative flex items-center gap-2 rounded-lg px-3 py-2",
"text-sm font-medium transition-all duration-200",
...getVariantStyles(),
className,
@@ -77,7 +77,7 @@
&::after {
content: " +";
@apply text-green absolute left-0;
@apply absolute left-0 text-green;
}
}
@@ -90,7 +90,7 @@
&::after {
content: " -";
@apply text-red absolute left-0;
@apply absolute left-0 text-red;
}
}
@@ -384,10 +384,10 @@ export const AvatarUploadModal = ({
className="size-full"
>
<div className="flex flex-col items-center gap-2 p-8">
<i className="i-mgc-file-upload-cute-re text-text-secondary text-4xl" />
<i className="i-mgc-file-upload-cute-re text-4xl text-text-secondary" />
<div className="text-center">
<p className="text-sm font-medium">{t("profile.avatar.dropZoneText")}</p>
<p className="text-text-secondary text-xs">{t("profile.avatar.dropZoneSubtext")}</p>
<p className="text-xs text-text-secondary">{t("profile.avatar.dropZoneSubtext")}</p>
</div>
</div>
</DropZone>
@@ -427,33 +427,33 @@ export const AvatarUploadModal = ({
>
<div className="size-full cursor-move" onMouseDown={handleCropMouseDown}>
{/* Grid lines */}
<div className="bg-material-medium-light absolute left-1/3 top-0 h-full w-px" />
<div className="bg-material-medium-light absolute left-2/3 top-0 h-full w-px" />
<div className="bg-material-medium-light absolute left-0 top-1/3 h-px w-full" />
<div className="bg-material-medium-light absolute left-0 top-2/3 h-px w-full" />
<div className="absolute left-1/3 top-0 h-full w-px bg-material-medium-light" />
<div className="absolute left-2/3 top-0 h-full w-px bg-material-medium-light" />
<div className="absolute left-0 top-1/3 h-px w-full bg-material-medium-light" />
<div className="absolute left-0 top-2/3 h-px w-full bg-material-medium-light" />
{/* Resize handles */}
<div
className="bg-accent absolute -left-1 -top-1 size-3 cursor-nwse-resize rounded-full border-2 border-white"
className="absolute -left-1 -top-1 size-3 cursor-nwse-resize rounded-full border-2 border-white bg-accent"
onMouseDown={(e) => handleResizeMouseDown(e, "tl")}
/>
<div
className="bg-accent absolute -right-1 -top-1 size-3 cursor-nesw-resize rounded-full border-2 border-white"
className="absolute -right-1 -top-1 size-3 cursor-nesw-resize rounded-full border-2 border-white bg-accent"
onMouseDown={(e) => handleResizeMouseDown(e, "tr")}
/>
<div
className="bg-accent absolute -bottom-1 -left-1 size-3 cursor-nesw-resize rounded-full border-2 border-white"
className="absolute -bottom-1 -left-1 size-3 cursor-nesw-resize rounded-full border-2 border-white bg-accent"
onMouseDown={(e) => handleResizeMouseDown(e, "bl")}
/>
<div
className="bg-accent absolute -bottom-1 -right-1 size-3 cursor-nwse-resize rounded-full border-2 border-white"
className="absolute -bottom-1 -right-1 size-3 cursor-nwse-resize rounded-full border-2 border-white bg-accent"
onMouseDown={(e) => handleResizeMouseDown(e, "br")}
/>
</div>
</div>
</div>
<div className="text-text-secondary text-center text-sm">
<div className="text-center text-sm text-text-secondary">
{t("profile.avatar.cropInstructions")}
</div>
</div>
@@ -50,7 +50,7 @@ const DropdownMenuSubTrigger = ({
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
"cursor-menu focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[state=open]:bg-theme-selection-active data-[state=open]:text-theme-selection-foreground flex select-none items-center rounded-[5px] px-2.5 py-1.5 outline-none",
"flex cursor-menu select-none items-center rounded-[5px] px-2.5 py-1.5 outline-none focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[state=open]:bg-theme-selection-active data-[state=open]:text-theme-selection-foreground",
inset && "pl-8",
"center gap-2",
className,
@@ -75,7 +75,7 @@ const DropdownMenuSubContent = ({
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
"bg-material-medium backdrop-blur-background text-text text-body",
"bg-material-medium text-body text-text backdrop-blur-background",
"min-w-32 overflow-hidden",
"rounded-[6px] border p-1",
"shadow-context-menu",
@@ -102,8 +102,8 @@ const DropdownMenuContent = ({
ref={ref}
sideOffset={sideOffset}
className={cn(
"bg-material-medium backdrop-blur-background text-text shadow-context-menu z-[60] min-w-32 overflow-hidden rounded-[6px] border p-1",
"motion-scale-in-75 motion-duration-150 text-body lg:animate-none",
"shadow-context-menu z-[60] min-w-32 overflow-hidden rounded-[6px] border bg-material-medium p-1 text-text backdrop-blur-background",
"text-body motion-scale-in-75 motion-duration-150 lg:animate-none",
className,
)}
{...props}
@@ -134,11 +134,11 @@ const DropdownMenuItem = ({
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"cursor-menu relative flex select-none items-center rounded-[5px] px-2.5 py-1 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-menu select-none items-center rounded-[5px] px-2.5 py-1 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"focus-within:outline-transparent",
highlightColor === "accent"
? "data-[highlighted]:bg-theme-selection-hover focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[highlighted]:text-theme-selection-foreground"
: "data-[highlighted]:bg-theme-item-hover focus:bg-theme-item-active",
? "focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[highlighted]:bg-theme-selection-hover data-[highlighted]:text-theme-selection-foreground"
: "focus:bg-theme-item-active data-[highlighted]:bg-theme-item-hover",
"h-[28px]",
inset && "pl-8",
@@ -187,7 +187,7 @@ const DropdownMenuCheckboxItem = ({
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
"cursor-checkbox focus:bg-theme-selection-active focus:text-theme-selection-foreground relative flex select-none items-center rounded-[5px] px-8 py-1.5 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-checkbox select-none items-center rounded-[5px] px-8 py-1.5 outline-none focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"focus-within:outline-transparent",
"h-[28px]",
className,
@@ -215,7 +215,7 @@ const DropdownMenuLabel = ({
} & { ref?: React.Ref<React.ElementRef<typeof DropdownMenuPrimitive.Label> | null> }) => (
<DropdownMenuPrimitive.Label
ref={ref}
className={cn("text-text px-2 py-1.5 font-semibold", inset && "pl-8", className)}
className={cn("px-2 py-1.5 font-semibold text-text", inset && "pl-8", className)}
{...props}
/>
)
@@ -228,7 +228,7 @@ const DropdownMenuSeparator = ({
ref?: React.Ref<React.ElementRef<typeof DropdownMenuPrimitive.Separator> | null>
}) => (
<DropdownMenuPrimitive.Separator
className="backdrop-blur-background mx-2 my-1 h-px"
className="mx-2 my-1 h-px backdrop-blur-background"
asChild
ref={ref}
{...props}
@@ -50,13 +50,13 @@ export const FABBase: FC<
"mt-2 flex items-center justify-center",
"size-9 text-lg md:text-base",
"outline-accent hover:opacity-100 focus:opacity-100 focus:outline-none",
"hover:border-border bg-background relative rounded-xl border border-transparent",
"relative rounded-xl border border-transparent bg-background hover:border-border",
"group duration-200",
className,
)}
{...rest}
>
<div className="shadow-perfect border-border/50 pointer-events-none absolute inset-0 rounded-xl border shadow-xl duration-200 group-hover:opacity-0" />
<div className="shadow-perfect pointer-events-none absolute inset-0 rounded-xl border border-border/50 shadow-xl duration-200 group-hover:opacity-0" />
{children}
</m.button>
)}
@@ -58,7 +58,7 @@ export const EntryPreviewCard: React.FC<EntryPreviewCardProps> = ({
className={cn("overflow-hidden", className)}
>
{/* Header */}
<div className="bg-fill-tertiary border-border border-b p-3">
<div className="border-b border-border bg-fill-tertiary p-3">
<a
target="_blank"
rel="noopener noreferrer"
@@ -67,8 +67,8 @@ export const EntryPreviewCard: React.FC<EntryPreviewCardProps> = ({
>
<FeedIcon target={feed} size={16} />
<div className="min-w-0 flex-1">
<div className="text-text line-clamp-1 text-sm font-medium">{feed.title}</div>
<span className="text-text-tertiary line-clamp-1 text-xs">{feed.url}</span>
<div className="line-clamp-1 text-sm font-medium text-text">{feed.title}</div>
<span className="line-clamp-1 text-xs text-text-tertiary">{feed.url}</span>
</div>
</a>
</div>
@@ -86,18 +86,18 @@ export const EntryPreviewCard: React.FC<EntryPreviewCardProps> = ({
target="_blank"
rel="noopener noreferrer"
>
<h3 className="text-text line-clamp-2 text-sm font-semibold">{entry.title}</h3>
<h3 className="line-clamp-2 text-sm font-semibold text-text">{entry.title}</h3>
{entry.description && (
<p className="text-text-secondary line-clamp-3 text-xs">{entry.description}</p>
<p className="line-clamp-3 text-xs text-text-secondary">{entry.description}</p>
)}
</a>
<div className="flex items-center justify-between pt-2">
<div className="text-text-tertiary text-xs">
<div className="text-xs text-text-tertiary">
{entry.author && <span>by {entry.author}</span>}
</div>
<div className="text-text-tertiary shrink-0 self-start text-xs">
<div className="shrink-0 self-start text-xs text-text-tertiary">
<RelativeTime date={entry.publishedAt} />
</div>
</div>
@@ -43,7 +43,7 @@ export const FeedPreviewCard: React.FC<FeedPreviewCardProps> = ({
>
{/* Header */}
<a
className="bg-fill-tertiary border-border border-b p-4"
className="border-b border-border bg-fill-tertiary p-4"
href={feed.url ?? "#"}
onClick={(e) => {
e.preventDefault()
@@ -56,7 +56,7 @@ export const FeedPreviewCard: React.FC<FeedPreviewCardProps> = ({
<FeedIcon target={feed} size={40} className="shrink-0" />
<div className="min-w-0 flex-1">
<div className="flex items-center gap-2">
<h3 className="text-text line-clamp-1 text-sm font-semibold">{feed.title}</h3>
<h3 className="line-clamp-1 text-sm font-semibold text-text">{feed.title}</h3>
</div>
</div>
</div>
@@ -37,7 +37,7 @@ export const KeyRecorder: FC<KeyRecorderProps> = ({ onChange, onBlur }) => {
})
return (
<div
className="text-text-secondary relative flex size-full items-center justify-center px-1 text-xs"
className="relative flex size-full items-center justify-center px-1 text-xs text-text-secondary"
tabIndex={-1}
role="textbox"
ref={ref}
@@ -49,13 +49,13 @@ export const KeyRecorder: FC<KeyRecorderProps> = ({ onChange, onBlur }) => {
</KbdCombined>
</div>
) : (
<span className="text-text-secondary pr-4">{t("settings.shortcuts.press_to_record")}</span>
<span className="pr-4 text-text-secondary">{t("settings.shortcuts.press_to_record")}</span>
)}
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<button
type="button"
className="hover:text-text absolute inset-y-0 -right-1 z-[1] flex items-center justify-center px-1"
className="absolute inset-y-0 -right-1 z-[1] flex items-center justify-center px-1 hover:text-text"
onClick={(e) => {
e.stopPropagation()
if (currentKeys.length === 0) {
@@ -23,7 +23,7 @@ export const Markdown: Component<
<MarkdownRenderContainerRefContext value={refElement}>
<article
className={cn(
"prose dark:prose-invert prose-th:text-left relative cursor-auto select-text",
"prose relative cursor-auto select-text dark:prose-invert prose-th:text-left",
className,
)}
ref={setRefElement}
@@ -99,7 +99,7 @@ const TocContainer: React.FC<TocContainerProps> = ({
return (
<div
className={cn(
"scrollbar-none group relative overflow-auto opacity-60 duration-200 group-hover:opacity-100",
"group relative overflow-auto opacity-60 duration-200 scrollbar-none group-hover:opacity-100",
"flex flex-col",
className,
)}
@@ -130,12 +130,12 @@ const TocHoverCard: React.FC<TocHoverCardProps> = ({
const [hoverShow, setHoverShow] = useState(false)
return (
<div className="scrollbar-none flex grow flex-col scroll-smooth px-2">
<div className="flex grow flex-col scroll-smooth px-2 scrollbar-none">
<HoverCard.Root openDelay={100} open={hoverShow} onOpenChange={setHoverShow}>
<HoverCard.Trigger asChild>
<div
className={cn(
"scrollbar-none group overflow-auto opacity-60 duration-200 group-hover:opacity-100",
"group overflow-auto opacity-60 duration-200 scrollbar-none group-hover:opacity-100",
className,
)}
>
@@ -164,8 +164,8 @@ const TocHoverCard: React.FC<TocHoverCardProps> = ({
className={cn(
"relative z-10 -mt-1 rounded-xl border",
"px-3 py-1 text-xs",
"bg-material-ultra-thick backdrop-blur-background shadow-context-menu",
"scrollbar-none max-h-[calc(100svh-4rem)] overflow-auto",
"shadow-context-menu bg-material-ultra-thick backdrop-blur-background",
"max-h-[calc(100svh-4rem)] overflow-auto scrollbar-none",
)}
>
{toc.map((heading, index) => (
@@ -190,7 +190,7 @@ const TocHoverCard: React.FC<TocHoverCardProps> = ({
})
}}
>
<EllipsisHorizontalTextWithTooltip className="group-hover:text-accent/80 max-w-prose select-none truncate duration-200">
<EllipsisHorizontalTextWithTooltip className="max-w-prose select-none truncate duration-200 group-hover:text-accent/80">
{heading.title}
</EllipsisHorizontalTextWithTooltip>
@@ -6,7 +6,7 @@ export const BlockError = (props: { error: any; message: string }) => {
captureException(props.error)
}, [])
return (
<div className="center bg-red flex min-h-12 flex-col rounded py-4 text-sm text-white">
<div className="center flex min-h-12 flex-col rounded bg-red py-4 text-sm text-white">
{props.message}
<pre className="m-0 bg-transparent">{props.error?.message}</pre>
@@ -24,7 +24,7 @@ export const createHeadingRenderer =
{rest.children}
<span
className={cn(
"text-accent cursor-pointer select-none opacity-0 transition-opacity duration-200 group-hover:opacity-100",
"cursor-pointer select-none text-accent opacity-0 transition-opacity duration-200 group-hover:opacity-100",
"relative ml-2",
"@2xl:absolute @2xl:left-[-1.5em] @2xl:top-0 @2xl:opacity-0",
)}
@@ -51,7 +51,7 @@ export const MarkdownLink: Component<LinkProps> = (props) => {
<a
draggable="false"
className={cn(
"text-text follow-link--underline font-semibold no-underline",
"follow-link--underline font-semibold text-text no-underline",
props.className,
)}
href={populatedFullHref}
@@ -286,7 +286,7 @@ const MediaImpl: FC<MediaProps> = ({
className={cn(
"center",
!(finalWidth || finalHeight) && "size-full",
"cursor-card relative object-cover",
"relative cursor-card object-cover",
mediaContainerClassName,
)}
onClick={handleClick}
@@ -343,7 +343,7 @@ const MediaImpl: FC<MediaProps> = ({
>
<span
className={cn(
"bg-material-ultra-thick relative inline-block max-w-full",
"relative inline-block max-w-full bg-material-ultra-thick",
mediaContainerClassName,
)}
style={{
@@ -407,7 +407,7 @@ const MediaImpl: FC<MediaProps> = ({
{blurhash ? (
<Blurhash hash={blurhash} width="100%" height="100%" />
) : (
<div className="bg-border size-full" />
<div className="size-full bg-border" />
)}
</div>
<div className="absolute inset-0 flex items-center justify-center overflow-hidden rounded">
@@ -428,13 +428,13 @@ const FallbackMedia: FC<MediaProps> = ({ type, mediaContainerClassName, classNam
<div
className={cn(
"size-full",
"center bg-material-ultra-thick rounded",
"not-prose @container !flex max-h-full flex-col space-y-1 p-4",
"center rounded bg-material-ultra-thick",
"not-prose !flex max-h-full flex-col space-y-1 p-4 @container",
mediaContainerClassName,
)}
>
<div className="@sm:hidden @md:contents hidden">
<i className="i-mgc-close-cute-re text-red text-xl" />
<div className="hidden @sm:hidden @md:contents">
<i className="i-mgc-close-cute-re text-xl text-red" />
<p>Media loaded failed</p>
<div className="space-x-1 break-all px-4 text-sm">
Go to{" "}
@@ -165,7 +165,7 @@ const Wrapper: FC<{
animate={controls}
exit="exit"
custom={dragOffset}
className="bg-material-medium-dark flex size-full pt-[var(--fo-window-padding-top)] backdrop-blur"
className="flex size-full bg-material-medium-dark pt-[var(--fo-window-padding-top)] backdrop-blur"
drag={enableDragClose}
dragConstraints={{ top: 0, bottom: 300, left: -200, right: 200 }}
dragElastic={{ top: 0, bottom: 0.3, left: 0.2, right: 0.2 }}
@@ -186,7 +186,7 @@ const Wrapper: FC<{
</div>
{hasSideContent ? (
<div
className="bg-background box-border flex h-full w-[400px] min-w-0 shrink-0 flex-col px-2 pt-1"
className="box-border flex h-full w-[400px] min-w-0 shrink-0 flex-col bg-background px-2 pt-1"
onClick={stopPropagation}
>
{isArray ? renderedChildren[1] : null}
@@ -490,7 +490,7 @@ const FallbackableImage: FC<
)}
{currentState === "fallback" && (
<div className="bg-material-thick backdrop-blur-background text-text absolute bottom-8 left-1/2 mt-4 -translate-x-1/2 rounded-lg px-3 py-2 text-center text-xs opacity-70">
<div className="absolute bottom-8 left-1/2 mt-4 -translate-x-1/2 rounded-lg bg-material-thick px-3 py-2 text-center text-xs text-text opacity-70 backdrop-blur-background">
<span>
This image is preview in low quality, because the original image is not available.
</span>
@@ -501,7 +501,7 @@ const FallbackableImage: FC<
href={src}
target="_blank"
rel="noreferrer"
className="hover:text-accent underline duration-200"
className="underline duration-200 hover:text-accent"
>
visit the original image
</a>{" "}
@@ -100,7 +100,7 @@ export function SwipeMedia({
{emblaApi?.canScrollPrev() && (
<button
type="button"
className="center bg-material-medium border-border backdrop-blur-background absolute left-2 top-1/2 size-8 -translate-y-1/2 rounded-full border text-white opacity-0 duration-200 group-hover:opacity-100"
className="center absolute left-2 top-1/2 size-8 -translate-y-1/2 rounded-full border border-border bg-material-medium text-white opacity-0 backdrop-blur-background duration-200 group-hover:opacity-100"
onClick={scrollPrev}
onDoubleClick={stopPropagation}
>
@@ -110,7 +110,7 @@ export function SwipeMedia({
{emblaApi?.canScrollNext() && (
<button
type="button"
className="center bg-material-medium border-border backdrop-blur-background absolute right-2 top-1/2 size-8 -translate-y-1/2 rounded-full border text-white opacity-0 duration-200 group-hover:opacity-100"
className="center absolute right-2 top-1/2 size-8 -translate-y-1/2 rounded-full border border-border bg-material-medium text-white opacity-0 backdrop-blur-background duration-200 group-hover:opacity-100"
onClick={scrollNext}
onDoubleClick={stopPropagation}
>
@@ -139,7 +139,7 @@ export const VideoPlayer = ({
return (
<Focusable
className="center group relative size-full"
className="group center relative size-full"
ref={wrapperRef}
scope={HotkeyScope.VideoPlayer}
>
@@ -230,7 +230,7 @@ const ControlBar = memo(() => {
dragMomentum={false}
dragConstraints={{ current: document.documentElement }}
className={cn(
"bg-material-thick backdrop-blur-background border-border absolute inset-x-2 bottom-2 h-8 rounded-2xl border",
"absolute inset-x-2 bottom-2 h-8 rounded-2xl border border-border bg-material-thick backdrop-blur-background",
"flex items-center gap-3 px-3",
"mx-auto max-w-[80vw]",
)}
@@ -31,13 +31,13 @@ export const PeekModal = (props: PropsWithChildren<PeekModalProps>) => {
return (
<RootPortalContext value={rootRef as HTMLElement}>
<div
className="scrollbar-none relative mx-auto mt-[10vh] max-w-full overflow-hidden px-2 lg:max-w-[65rem] lg:p-0"
className="relative mx-auto mt-[10vh] max-w-full overflow-hidden px-2 scrollbar-none lg:max-w-[65rem] lg:p-0"
ref={setRootRef}
>
<m.div
exit={{ opacity: 0, y: 50 }}
transition={{ duration: 0.2 }}
className="motion-preset-slide-up motion-duration-200 motion-ease-spring-smooth scrollbar-none overflow-hidden"
className="motion-preset-slide-up overflow-hidden motion-duration-200 motion-ease-spring-smooth scrollbar-none"
>
<InPeekModal value={true}>{children}</InPeekModal>
</m.div>
@@ -46,7 +46,7 @@ export const PeekModal = (props: PropsWithChildren<PeekModalProps>) => {
exit={{
opacity: 0,
}}
className="safe-inset-top-4 fixed right-4 flex items-center gap-4"
className="fixed right-4 flex items-center gap-4 safe-inset-top-4"
>
{props.rightActions?.map((action) => (
<GlassButton
@@ -10,7 +10,7 @@ export const ModalClose = () => {
return (
<MotionButtonBase
aria-label={t("words.close")}
className="hover:bg-material-ultra-thick absolute right-6 top-6 flex size-8 items-center justify-center rounded-md duration-200"
className="absolute right-6 top-6 flex size-8 items-center justify-center rounded-md duration-200 hover:bg-material-ultra-thick"
onClick={dismiss}
>
<i className="i-mgc-close-cute-re block" />
@@ -22,7 +22,7 @@ export const SlideUpModal: ModalTemplateType = (props) => {
const winHeight = useState(() => window.innerHeight)[0]
const { dismiss } = useCurrentModal()
return (
<div className={"center container h-full"} onPointerDown={dismiss} onClick={stopPropagation}>
<div className={"container center h-full"} onPointerDown={dismiss} onClick={stopPropagation}>
<m.div
onPointerDown={stopPropagation}
tabIndex={-1}
@@ -36,7 +36,7 @@ export const SlideUpModal: ModalTemplateType = (props) => {
}
}}
className={cn(
"bg-theme-background relative flex flex-col items-center overflow-hidden rounded-xl border p-8 pb-0",
"relative flex flex-col items-center overflow-hidden rounded-xl border bg-theme-background p-8 pb-0",
"aspect-[7/9] w-[600px] max-w-full shadow lg:max-h-[calc(100vh-10rem)]",
"motion-preset-slide-up motion-duration-200 motion-ease-spring-smooth",
props.className,
@@ -95,9 +95,9 @@ export const DrawerModalLayout: FC<PropsWithChildren> = ({ children }) => {
exit="exit"
layout="size"
className={cn(
"bg-theme-background flex flex-col items-center overflow-hidden rounded-xl border p-8 pb-0",
"flex flex-col items-center overflow-hidden rounded-xl border bg-theme-background p-8 pb-0",
"shadow-drawer-to-left w-[60ch] max-w-full",
"safe-inset-top-4 fixed bottom-4 right-2",
"fixed bottom-4 right-2 safe-inset-top-4",
)}
>
{children}
@@ -110,7 +110,7 @@ export const ScaleModal: ModalTemplateType = (props) => {
const { dismiss } = useCurrentModal()
return (
<div className={"center container h-full"} onPointerDown={dismiss} onClick={stopPropagation}>
<div className={"container center h-full"} onPointerDown={dismiss} onClick={stopPropagation}>
<m.div
onPointerDown={stopPropagation}
transition={Spring.presets.snappy}
@@ -143,12 +143,12 @@ export const useDialog = (): DialogInstance => {
confirmClassName: "",
},
warning: {
icon: <i className="i-mingcute-warning-fill text-yellow size-5" />,
icon: <i className="i-mingcute-warning-fill size-5 text-yellow" />,
confirmVariant: "primary" as const,
confirmClassName: "bg-yellow-500",
},
danger: {
icon: <i className="i-mingcute-warning-fill text-red size-5" />,
icon: <i className="i-mingcute-warning-fill size-5 text-red" />,
confirmVariant: "primary" as const,
confirmClassName: "bg-red-500",
},
@@ -346,7 +346,7 @@ export const ModalInternal = memo(function Modal({
"bg-background",
"shadow-modal [transform-style:preserve-3d]",
max ? "h-[90vh] w-[90vw]" : "max-h-[90vh]",
"border-border border",
"border border-border",
modalClassName,
)}
tabIndex={-1}
@@ -371,10 +371,10 @@ export const ModalInternal = memo(function Modal({
defaultSize={resizeDefaultSize}
className="flex grow flex-col"
>
<div className={"bg-background relative z-10 flex flex-col"}>
<div className={"relative z-10 flex flex-col bg-background"}>
<div className={"flex items-center"}>
<Dialog.Title
className="text-text flex w-0 max-w-full grow items-center gap-2 px-2 pb-1 pt-2 text-base font-medium"
className="flex w-0 max-w-full grow items-center gap-2 px-2 pb-1 pt-2 text-base font-medium text-text"
onPointerDownCapture={handleDrag}
onPointerDown={relocateModal}
>
@@ -385,7 +385,7 @@ export const ModalInternal = memo(function Modal({
</Dialog.Title>
{canClose && (
<Dialog.DialogClose
className="center hover:bg-fill-quaternary text-text-secondary hover:text-text z-[2] -mr-1 rounded-lg p-2"
className="center z-[2] -mr-1 rounded-lg p-2 text-text-secondary hover:bg-fill-quaternary hover:text-text"
tabIndex={1}
onClick={close}
>
@@ -395,13 +395,13 @@ export const ModalInternal = memo(function Modal({
</div>
{(title || icon || canClose) && (
<div className="bg-border mx-1 mt-1 h-px shrink-0" />
<div className="mx-1 mt-1 h-px shrink-0 bg-border" />
)}
</div>
<div
className={cn(
"text-text -mx-2 min-h-0 shrink grow overflow-auto overflow-x-hidden px-4 pb-4 pt-3 text-sm",
"-mx-2 min-h-0 shrink grow overflow-auto overflow-x-hidden px-4 pb-4 pt-3 text-sm text-text",
modalContentClassName,
)}
>
@@ -20,7 +20,7 @@ export const ModalOverlay: FC<{
id="modal-overlay"
className={cn(
// NOTE: pointer-events-none is required, if remove this, when modal is closing, you can not click element behind the modal
"bg-material-ultra-thick !pointer-events-none fixed inset-0 rounded-[var(--fo-window-radius)]",
"!pointer-events-none fixed inset-0 rounded-[var(--fo-window-radius)] bg-material-ultra-thick",
blur && "backdrop-blur-sm",
className,
)}
@@ -6,9 +6,9 @@ export const Paper: Component<{
}> = ({ children, className, as: As = "main" }) => (
<As
className={cn(
"bg-background relative md:col-start-1 lg:col-auto",
"relative bg-background md:col-start-1 lg:col-auto",
"-m-4 p-[2rem_1rem] md:m-0 lg:p-[30px_45px]",
"border-border rounded-lg lg:border",
"rounded-lg border-border lg:border",
"shadow-perfect perfect-sm",
"min-w-0",
"print:!border-none print:!bg-transparent print:!shadow-none",
@@ -24,39 +24,39 @@ const PeekModalSkeleton = () => {
return (
<div className="animate-pulse p-5">
<div className="mb-6 space-y-3">
<div className="bg-fill h-8 w-3/4 rounded-lg" />
<div className="h-8 w-3/4 rounded-lg bg-fill" />
<div className="flex items-center space-x-4">
<div className="bg-fill-secondary h-4 w-20 rounded" />
<div className="bg-fill-secondary h-4 w-16 rounded" />
<div className="bg-fill-secondary h-4 w-24 rounded" />
<div className="h-4 w-20 rounded bg-fill-secondary" />
<div className="h-4 w-16 rounded bg-fill-secondary" />
<div className="h-4 w-24 rounded bg-fill-secondary" />
</div>
</div>
<div className="space-y-4">
<div className="space-y-3">
<div className="bg-fill-secondary h-4 w-full rounded" />
<div className="bg-fill-secondary h-4 w-5/6 rounded" />
<div className="bg-fill-secondary h-4 w-4/5 rounded" />
<div className="h-4 w-full rounded bg-fill-secondary" />
<div className="h-4 w-5/6 rounded bg-fill-secondary" />
<div className="h-4 w-4/5 rounded bg-fill-secondary" />
</div>
<div className="space-y-3">
<div className="bg-fill-secondary h-4 w-full rounded" />
<div className="bg-fill-secondary h-4 w-3/4 rounded" />
<div className="h-4 w-full rounded bg-fill-secondary" />
<div className="h-4 w-3/4 rounded bg-fill-secondary" />
</div>
<div className="bg-fill my-6 h-48 w-full rounded-lg" />
<div className="my-6 h-48 w-full rounded-lg bg-fill" />
<div className="space-y-3">
<div className="bg-fill-secondary h-4 w-full rounded" />
<div className="bg-fill-secondary h-4 w-5/6 rounded" />
<div className="bg-fill-secondary h-4 w-2/3 rounded" />
<div className="h-4 w-full rounded bg-fill-secondary" />
<div className="h-4 w-5/6 rounded bg-fill-secondary" />
<div className="h-4 w-2/3 rounded bg-fill-secondary" />
</div>
</div>
<div className="mt-8 flex items-center space-x-3">
<div className="bg-fill h-8 w-16 rounded" />
<div className="bg-fill h-8 w-20 rounded" />
<div className="bg-fill h-8 w-16 rounded" />
<div className="h-8 w-16 rounded bg-fill" />
<div className="h-8 w-20 rounded bg-fill" />
<div className="h-8 w-16 rounded bg-fill" />
</div>
</div>
)
@@ -82,7 +82,7 @@ export const EntryToastPreview = ({ entryId }: { entryId: string }) => {
exit="exit"
layout="size"
className={cn(
"shadow-perfect bg-theme-background relative flex flex-col items-center rounded-xl border p-8",
"shadow-perfect relative flex flex-col items-center rounded-xl border bg-theme-background p-8",
"mr-4 mt-4 max-h-[500px] w-[60ch] max-w-full overflow-auto",
)}
>
@@ -57,7 +57,7 @@ export const useDeleteSubscription = ({ onSuccess }: { onSuccess?: () => void }
label: (
<span className={"flex items-center gap-1 px-1"}>
{t("words.undo")}
<Kbd className="border-border inline-flex items-center border bg-transparent text-white">
<Kbd className="inline-flex items-center border border-border bg-transparent text-white">
$mod+Z
</Kbd>
</span>
@@ -88,7 +88,7 @@ const UnfollowInfo = ({ title, undo }: { title: string; undo: () => any }) => {
preventDefault: true,
})
return (
<span className="text-text font-medium">
<span className="font-medium text-text">
<Trans
ns="app"
i18nKey="notify.unfollow_feed"
@@ -195,7 +195,7 @@ export const AchievementModalContent: FC = () => {
<div className="mt-4 text-xl font-bold">{t("words.achievement")}</div>
<small className="text-text-secondary mt-1 gap-1">
<small className="mt-1 gap-1 text-text-secondary">
{t("achievement.description")}
<sup className="inline-block translate-y-1 text-xs">*</sup>
</small>
@@ -222,7 +222,7 @@ export const AchievementModalContent: FC = () => {
{copy.video && achievement.type === "received" && (
<MotionButtonBase
className="hover:text-accent p-1 duration-200"
className="p-1 duration-200 hover:text-accent"
onClick={() => {
presentBadgeVideo(achievement.actionId)
}}
@@ -231,7 +231,7 @@ export const AchievementModalContent: FC = () => {
</MotionButtonBase>
)}
</div>
<div className="text-text-secondary flex items-center text-sm">
<div className="flex items-center text-sm text-text-secondary">
{t(copy.description)}
</div>
</div>
@@ -260,7 +260,7 @@ export const AchievementModalContent: FC = () => {
className={styledButtonVariant({
variant: "outline",
className: [
"dark:text-text relative gap-1 border-green-200 !bg-green-100/50 text-green-800 dark:border-green-200/20 dark:!bg-green-100/5",
"relative gap-1 border-green-200 !bg-green-100/50 text-green-800 dark:border-green-200/20 dark:!bg-green-100/5 dark:text-text",
copy.video ? "cursor-button" : "cursor-default",
],
})}
@@ -281,7 +281,7 @@ export const AchievementModalContent: FC = () => {
className={styledButtonVariant({
variant: "outline",
className:
"dark:text-text relative cursor-not-allowed gap-1 border-zinc-200 !bg-zinc-100/50 text-zinc-800 dark:border-zinc-200/20 dark:!bg-zinc-100/5",
"relative cursor-not-allowed gap-1 border-zinc-200 !bg-zinc-100/50 text-zinc-800 dark:border-zinc-200/20 dark:!bg-zinc-100/5 dark:text-text",
})}
>
Validating...
@@ -303,7 +303,7 @@ export const AchievementModalContent: FC = () => {
</ul>
</ScrollArea>
<p className="text-text-tertiary mt-4 pb-4 text-xs">* {t("achievement.nft_coming_soon")}</p>
<p className="mt-4 pb-4 text-xs text-text-tertiary">* {t("achievement.nft_coming_soon")}</p>
</div>
)
}
@@ -415,19 +415,19 @@ const IncompleteButton: FC<{
<div className="center absolute z-[1] opacity-0 duration-200 group-hover:opacity-100">
<i
className={cn(
"i-mgc-refresh-2-cute-re text-accent size-5",
"i-mgc-refresh-2-cute-re size-5 text-accent",
checkPending && "animate-spin",
)}
/>
</div>
<div className="duration-200 group-hover:opacity-30">
<span className="center relative ml-2 inline-flex w-24 -translate-y-1 flex-col *:!m-0">
<small className="text-text shrink-0 text-xs leading-tight">
<small className="shrink-0 text-xs leading-tight text-text">
{achievement.progress} / {achievement.progressMax}
</small>
<span className="bg-accent/10 relative h-1 w-full overflow-hidden rounded-full">
<span className="relative h-1 w-full overflow-hidden rounded-full bg-accent/10">
<span
className="bg-accent absolute -left-3 top-0 inline-block h-1 rounded-full"
className="absolute -left-3 top-0 inline-block h-1 rounded-full bg-accent"
style={{
width: `calc(${Math.min(
(achievement.progress / achievement.progressMax) * 100,
@@ -37,15 +37,15 @@ const EmptyActionPlaceholder = () => {
<div className="relative flex min-h-96 w-full items-center justify-center">
<div className="flex flex-col items-center gap-6 text-center">
{/* Simple icon */}
<div className="bg-fill-quaternary flex size-16 items-center justify-center rounded-2xl">
<i className="i-mgc-magic-2-cute-re text-text-secondary size-8" />
<div className="flex size-16 items-center justify-center rounded-2xl bg-fill-quaternary">
<i className="i-mgc-magic-2-cute-re size-8 text-text-secondary" />
</div>
<div className="space-y-2">
<h2 className="text-text text-xl font-semibold">
<h2 className="text-xl font-semibold text-text">
{t("actions.action_card.empty.title")}
</h2>
<p className="text-text-secondary max-w-sm text-sm">
<p className="max-w-sm text-sm text-text-secondary">
{t("actions.action_card.empty.description")}
</p>
</div>
@@ -63,7 +63,7 @@ const EmptyActionPlaceholder = () => {
ease: "easeInOut",
}}
>
<div className="text-text-tertiary flex items-center gap-2">
<div className="flex items-center gap-2 text-text-tertiary">
<span className="text-sm font-medium">{t("actions.action_card.empty.start")}</span>
<i className="i-mgc-arrow-right-up-cute-re size-6" />
</div>
@@ -93,7 +93,7 @@ export const ActionSetting = () => {
<div className="flex w-full flex-col gap-6">
<ActionButtonGroup />
{hasActions ? (
<div className="@container flex flex-col gap-6">
<div className="flex flex-col gap-6 @container">
{actions.map((_, actionIdx) => {
return <RuleCard key={actionIdx} index={actionIdx} />
})}
@@ -237,10 +237,10 @@ const ActionButtonGroup = () => {
<div className="mb-6 flex w-full items-center justify-end p-4 lg:justify-between">
{/* Left side - Simple status */}
<div className="hidden lg:block">
<h3 className="text-text text-lg font-medium">
<h3 className="text-lg font-medium text-text">
{hasActions ? `${actionLength} Rules` : "No Rules"}
</h3>
<p className="text-text-secondary text-sm">
<p className="text-sm text-text-secondary">
{hasActions ? "Active automation rules" : "Create your first automation rule"}
</p>
</div>
@@ -11,9 +11,9 @@ import { WhenSection } from "./when-section"
export const RuleCard = ({ index }: { index: number }) => {
return (
<div className="bg-material-ultra-thin group/card-root relative flex flex-col gap-4 rounded-2xl border p-4 shadow-sm md:p-6">
<div className="group/card-root relative flex flex-col gap-4 rounded-2xl border bg-material-ultra-thin p-4 shadow-sm md:p-6">
<RuleCardToolbar index={index} />
<div className="@[800px]:grid-cols-2 grid grid-cols-1 gap-x-8 gap-y-6">
<div className="grid grid-cols-1 gap-x-8 gap-y-6 @[800px]:grid-cols-2">
<WhenSection index={index} />
<ThenSection index={index} />
</div>
@@ -50,7 +50,7 @@ const RuleCardToolbar = ({ index }: { index: number }) => {
/>
<div className="absolute right-0 top-0 opacity-0 transition-opacity duration-200 group-hover/card-root:opacity-100">
<button
className="bg-background center flex size-8 -translate-y-1/2 translate-x-1/2 rounded-full border"
className="center flex size-8 -translate-y-1/2 translate-x-1/2 rounded-full border bg-background"
type="button"
onClick={() => {
if (ruleCount === 1) {
@@ -88,7 +88,7 @@ export const ThenSection = ({ index }: { index: number }) => {
onChange={(e) => change("to", e.target.value)}
/>
</div>
<div className="text-text-secondary flex gap-1">
<div className="flex gap-1 text-text-secondary">
<ActionButton
disabled={disabled}
onClick={() => {
@@ -149,7 +149,7 @@ export const ThenSection = ({ index }: { index: number }) => {
})
}}
/>
<div className="text-text-secondary flex gap-1">
<div className="flex gap-1 text-text-secondary">
<ActionButton
disabled={disabled}
onClick={() => {
@@ -57,8 +57,8 @@ export const WhenSection = ({ index }: { index: number }) => {
{condition.map((orConditions, orConditionIdx) => {
return (
<Fragment key={orConditionIdx}>
<div className="@[500px]:p-4 group/or relative flex flex-col gap-2 rounded-lg border p-2 pl-6">
<div className="bg-border absolute left-3 top-9 h-[calc(100%-4.5rem)] w-px" />
<div className="group/or relative flex flex-col gap-2 rounded-lg border p-2 pl-6 @[500px]:p-4">
<div className="absolute left-3 top-9 h-[calc(100%-4.5rem)] w-px bg-border" />
{orConditions.map((condition, conditionIdx) => {
const actionConditionIndex = {
ruleIndex: index,
@@ -77,8 +77,8 @@ export const WhenSection = ({ index }: { index: number }) => {
return (
<div className="flex flex-col gap-2" key={conditionIdx}>
<div className="group/condition-item relative flex items-center gap-2">
<div className="bg-border absolute -left-3.5 top-1/2 h-px w-3 -translate-y-1/2" />
<div className="bg-background absolute -left-3.5 top-1/2 size-1.5 -translate-y-1/2 rounded-full border" />
<div className="absolute -left-3.5 top-1/2 h-px w-3 -translate-y-1/2 bg-border" />
<div className="absolute -left-3.5 top-1/2 size-1.5 -translate-y-1/2 rounded-full border bg-background" />
<ResponsiveSelect
placeholder="Select Field"
disabled={disabled}
@@ -140,8 +140,8 @@ export const WhenSection = ({ index }: { index: number }) => {
</div>
{orConditionIdx !== condition.length - 1 && (
<div className="relative flex h-8 w-full items-center justify-center">
<div className="bg-border absolute left-0 top-1/2 h-px w-full" />
<span className="text-muted-foreground bg-background z-[1] px-2 text-sm">
<div className="absolute left-0 top-1/2 h-px w-full bg-border" />
<span className="text-muted-foreground z-[1] bg-background px-2 text-sm">
{t("actions.action_card.or")}
</span>
</div>
@@ -114,7 +114,7 @@ export const MentionButton: Component = memo(() => {
ref={atButtonRef}
type="button"
onClick={handleAtButtonClick}
className="bg-material-medium hover:bg-material-thin border-border text-text-secondary hover:text-text-secondary flex size-7 items-center justify-center rounded-md border transition-colors"
className="flex size-7 items-center justify-center rounded-md border border-border bg-material-medium text-text-secondary transition-colors hover:bg-material-thin hover:text-text-secondary"
title="Add Context"
>
<i className="i-mgc-at-cute-re size-3.5" />
@@ -29,7 +29,7 @@ const BlockContainer: FC<{
<div
className={clsx(
"group relative flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-lg px-2.5",
"bg-fill-tertiary border-border border",
"border border-border bg-fill-tertiary",
disabled && "cursor-pointer border-dashed opacity-50",
)}
onClick={() => {
@@ -49,13 +49,13 @@ const BlockContainer: FC<{
<div className="flex min-w-0 flex-1 items-center gap-1.5">
<div className="flex items-center gap-1">
{icon && <i className={cn("size-3.5 flex-shrink-0", icon)} />}
{label && <span className="text-text-tertiary text-xs font-medium">{label}</span>}
{label && <span className="text-xs font-medium text-text-tertiary">{label}</span>}
</div>
{isStringContent ? (
<span className="text-text min-w-0 flex-1 truncate text-xs">{content}</span>
<span className="min-w-0 flex-1 truncate text-xs text-text">{content}</span>
) : (
<div className="text-text min-w-0 flex-1 truncate text-xs">{content}</div>
<div className="min-w-0 flex-1 truncate text-xs text-text">{content}</div>
)}
</div>
</div>
@@ -64,7 +64,7 @@ const BlockContainer: FC<{
<button
type="button"
onClick={onRemove}
className="text-text/90 cursor-button hover:text-text absolute inset-y-0 right-2 flex-shrink-0 opacity-0 transition-all ease-in group-hover:opacity-100"
className="absolute inset-y-0 right-2 flex-shrink-0 cursor-button text-text/90 opacity-0 transition-all ease-in hover:text-text group-hover:opacity-100"
>
<i className="i-mgc-close-cute-re size-3" />
</button>
@@ -31,7 +31,7 @@ export const ShortcutsMenuContent: FC<ShortcutsMenuContentProps> = ({
return (
<DropdownMenuContent align="start">
{enabledShortcuts.length === 0 ? (
<div className="text-text-tertiary p-3 text-center text-xs">{emptyMessage}</div>
<div className="p-3 text-center text-xs text-text-tertiary">{emptyMessage}</div>
) : (
enabledShortcuts.map((shortcut) => (
<DropdownMenuItem key={shortcut.id} onClick={() => onSendShortcut?.(shortcut.prompt)}>
@@ -62,7 +62,7 @@ export const AIChainOfThought: React.FC<AIChainOfThoughtProps> = React.memo(
return (
<div
className={cn(
"border-border w-[calc(var(--ai-chat-message-container-width,65ch))] min-w-0 text-left",
"w-[calc(var(--ai-chat-message-container-width,65ch))] min-w-0 border-border text-left",
className,
)}
>
@@ -110,7 +110,7 @@ export const AIChainOfThought: React.FC<AIChainOfThoughtProps> = React.memo(
contentClassName="pb-2 pt-1"
>
<div className="relative">
<div aria-hidden className="border-fill absolute inset-y-0 left-2 border-l" />
<div aria-hidden className="absolute inset-y-0 left-2 border-l border-fill" />
{groups.map((part, index) => {
const innerCollapseId = `${collapseId}-${index}`
if (isToolUIPart(part)) {
@@ -171,11 +171,11 @@ const AIInnerReasoningPart: React.FC<{
defaultOpen
title={
<div className="group/inner flex h-6 min-w-0 flex-1 items-center py-0">
<div className="text-text-secondary flex items-center gap-2 text-xs">
<div className="flex items-center gap-2 text-xs text-text-secondary">
{title ? (
<span className="truncate">
{"Reason: "}
<span className="text-text font-medium">{title}</span>
<span className="font-medium text-text">{title}</span>
</span>
) : (
<span>{groupStreaming ? "Reasoning..." : "Reasoning"}</span>
@@ -28,7 +28,7 @@ const SingleEntryCard = ({ entry }: { entry: SingleEntry }) => {
<button
type="button"
onClick={handleClick}
className="bg-material-thick/80 border-border hover:bg-theme-item-hover group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border p-4 backdrop-blur-sm transition-colors"
className="group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border border-border bg-material-thick/80 p-4 backdrop-blur-sm transition-colors hover:bg-theme-item-hover"
>
{/* Header */}
<div className="flex w-full items-start justify-between">
@@ -39,11 +39,11 @@ const SingleEntryCard = ({ entry }: { entry: SingleEntry }) => {
target={undefined}
siteUrl={entry.url ?? undefined}
/>
<h3 className="text-text line-clamp-2 flex-1 text-left font-semibold leading-tight">
<h3 className="line-clamp-2 flex-1 text-left font-semibold leading-tight text-text">
{entry.title || "Untitled Entry"}
</h3>
</div>
<i className="i-mgc-external-link-cute-re text-text-tertiary ml-2 shrink-0 opacity-60 transition-opacity group-hover:opacity-100" />
<i className="i-mgc-external-link-cute-re ml-2 shrink-0 text-text-tertiary opacity-60 transition-opacity group-hover:opacity-100" />
</div>
</button>
)
@@ -24,7 +24,7 @@ const AIDisplayFeedPartBase = ({
<button
type="button"
onClick={handleUrlClick}
className="bg-material-thick/80 border-border hover:bg-theme-item-hover group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border p-4 backdrop-blur-sm transition-colors"
className="group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border border-border bg-material-thick/80 p-4 backdrop-blur-sm transition-colors hover:bg-theme-item-hover"
>
{/* Header */}
<div className="flex w-full items-start justify-between">
@@ -40,16 +40,16 @@ const AIDisplayFeedPartBase = ({
}}
siteUrl={siteUrl!}
/>
<h3 className="text-text line-clamp-2 flex-1 text-left font-semibold leading-tight">
<h3 className="line-clamp-2 flex-1 text-left font-semibold leading-tight text-text">
{title || "Untitled Feed"}
</h3>
</div>
<i className="i-mgc-external-link-cute-re text-text-tertiary ml-2 shrink-0 opacity-60 transition-opacity group-hover:opacity-100" />
<i className="i-mgc-external-link-cute-re ml-2 shrink-0 text-text-tertiary opacity-60 transition-opacity group-hover:opacity-100" />
</div>
{/* Description */}
{description && (
<p className="text-text-secondary mt-2 line-clamp-3 text-sm leading-relaxed">
<p className="mt-2 line-clamp-3 text-sm leading-relaxed text-text-secondary">
{description}
</p>
)}
@@ -89,10 +89,10 @@ export const AIDisplayFlowPart = toolMemo(({ part }: { part: ToolWithState<any>
onClick={handleOpenModal}
className={cn(
"absolute right-2 top-2 flex items-center gap-1.5 rounded-lg px-2.5 py-1.5",
"bg-material-thick text-text-secondary text-sm font-medium",
"bg-material-thick text-sm font-medium text-text-secondary",
"opacity-0 transition-all duration-200 group-hover:opacity-100",
"hover:bg-material-medium hover:text-text focus:opacity-100",
"focus:ring-blue focus:outline-none focus:ring-2 focus:ring-offset-1",
"focus:outline-none focus:ring-2 focus:ring-blue focus:ring-offset-1",
)}
title="Open in full screen"
>
@@ -49,7 +49,7 @@ const Item = memo(
type="button"
key={feedId}
onClick={handleClick(sub)}
className="bg-material-thick/80 border-border hover:bg-theme-item-hover group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border p-4 text-left backdrop-blur-sm transition-colors"
className="group relative flex w-full flex-col items-start justify-start overflow-hidden rounded-lg border border-border bg-material-thick/80 p-4 text-left backdrop-blur-sm transition-colors hover:bg-theme-item-hover"
>
<div className="flex w-full items-start justify-between">
<div className="flex">
@@ -64,10 +64,10 @@ const Item = memo(
siteUrl={siteUrl!}
/>
<div className="flex min-w-0 flex-col">
<h3 className="text-text line-clamp-2 font-semibold leading-tight">
<h3 className="line-clamp-2 font-semibold leading-tight text-text">
{title || "Untitled Feed"}
</h3>
<div className="text-text-tertiary mt-1 flex items-center gap-2 text-xs">
<div className="mt-1 flex items-center gap-2 text-xs text-text-tertiary">
{category ? <span className="text-text-secondary">{category}</span> : null}
<span>Subscribed {dayjs(subscribedAt).format("MMM DD, YYYY")}</span>
{currentView.icon}
@@ -75,7 +75,7 @@ const Item = memo(
</div>
</div>
</div>
<i className="i-mgc-external-link-cute-re text-text-tertiary shrink-0 opacity-60 transition-opacity group-hover:opacity-100" />
<i className="i-mgc-external-link-cute-re shrink-0 text-text-tertiary opacity-60 transition-opacity group-hover:opacity-100" />
</div>
</button>
)
@@ -14,7 +14,7 @@ export const AIReasoningPart: React.FC<AIReasoningPartProps> = React.memo(({ tex
<div className={cn("min-w-0 max-w-full text-left", className)}>
<div className="w-[calc(var(--ai-chat-message-container-width,65ch))] max-w-full" />
<div className="text-xs">
<pre className="text-text-secondary bg-material-medium overflow-x-auto whitespace-pre-wrap rounded p-3 text-[11px] leading-relaxed">
<pre className="overflow-x-auto whitespace-pre-wrap rounded bg-material-medium p-3 text-[11px] leading-relaxed text-text-secondary">
{text}
</pre>
</div>
@@ -15,7 +15,7 @@ export const AnalyticsMetrics = ({ metrics, className }: AnalyticsMetricsProps)
{metrics.map((metric, index) => (
<li key={index} className="flex items-center justify-between">
<span className="text-text-tertiary">{metric.label}</span>
<span className="text-text font-medium">{metric.value}</span>
<span className="font-medium text-text">{metric.value}</span>
</li>
))}
</ul>
@@ -9,7 +9,7 @@ export interface CategoryTagProps {
export const CategoryTag = ({ category, variant = "default", className }: CategoryTagProps) => (
<span
className={cn(
"bg-fill-tertiary text-text-secondary rounded px-2 py-1 text-xs",
"rounded bg-fill-tertiary px-2 py-1 text-xs text-text-secondary",
variant === "small" && "px-1 py-0.5 text-xs",
className,
)}
@@ -10,7 +10,7 @@ export interface DisplayHeaderProps {
export const DisplayHeader = ({ title, emoji, description, children }: DisplayHeaderProps) => (
<CardHeader>
<CardTitle className="text-text flex items-center gap-2 text-xl font-semibold">
<CardTitle className="flex items-center gap-2 text-xl font-semibold text-text">
<span className="text-lg">{emoji}</span>
<span>{title}</span>
</CardTitle>
@@ -7,7 +7,7 @@ export interface EmptyStateProps {
}
export const EmptyState = ({ message, icon, className }: EmptyStateProps) => (
<div className={cn("text-text-secondary text-center text-sm", className)}>
<div className={cn("text-center text-sm text-text-secondary", className)}>
{icon && <span className="text-lg">{icon}</span>}
{message}
</div>
@@ -43,7 +43,7 @@ export const GroupedContent = <T,>({
<div className="space-y-6">
{sortedEntries.map(([groupName, groupData]) => (
<div key={groupName}>
<h3 className="text-text mb-4 text-lg font-semibold">{groupName}</h3>
<h3 className="mb-4 text-lg font-semibold text-text">{groupName}</h3>
{renderGroup(groupData, groupName)}
</div>
))}
@@ -16,13 +16,13 @@ export interface StatCardProps {
export const StatCard = ({ title, value, description, emoji }: StatCardProps) => (
<Card className="p-4">
<CardHeader className="p-2 pt-0">
<CardTitle className="text-text-secondary flex items-center gap-2 text-sm font-medium">
<CardTitle className="flex items-center gap-2 text-sm font-medium text-text-secondary">
{emoji && <span className="text-base">{emoji}</span>}
{title}
</CardTitle>
</CardHeader>
<CardContent className="px-2 py-0">
<div className="text-text text-2xl font-bold">{value}</div>
<div className="text-2xl font-bold text-text">{value}</div>
{description && <CardDescription className="mt-1 text-xs">{description}</CardDescription>}
</CardContent>
</Card>
@@ -83,7 +83,7 @@ export const GlobalFileDropZone: FC<GlobalFileDropZoneProps> = memo(({ children,
<m.div className="pointer-events-none absolute inset-0 z-50 flex items-center justify-center">
{/* Glass morphism backdrop */}
<m.div
className="bg-material-thin/80 absolute inset-0 backdrop-blur-xl"
className="absolute inset-0 bg-material-thin/80 backdrop-blur-xl"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
@@ -96,24 +96,24 @@ export const GlobalFileDropZone: FC<GlobalFileDropZoneProps> = memo(({ children,
animate={{ scale: 1, y: 0, opacity: 1 }}
exit={{ scale: 0.9, y: 20, opacity: 0 }}
transition={Spring.presets.snappy}
className="bg-background/95 border-accent/20 shadow-accent/10 relative flex max-w-md flex-col items-center gap-4 rounded-2xl border p-8 shadow-2xl"
className="relative flex max-w-md flex-col items-center gap-4 rounded-2xl border border-accent/20 bg-background/95 p-8 shadow-2xl shadow-accent/10"
>
{isProcessing ? (
<>
<div className="border-accent size-12 animate-spin rounded-full border-4 border-t-transparent" />
<div className="size-12 animate-spin rounded-full border-4 border-accent border-t-transparent" />
<div className="text-center">
<p className="text-text text-lg font-medium">Processing files...</p>
<p className="text-text-secondary text-sm">
<p className="text-lg font-medium text-text">Processing files...</p>
<p className="text-sm text-text-secondary">
Please wait while we process your files
</p>
</div>
</>
) : (
<>
<div className="text-accent relative">
<div className="relative text-accent">
<i className="i-mgc-file-upload-cute-re size-16" />
<m.div
className="text-accent absolute inset-0 blur-lg"
className="absolute inset-0 text-accent blur-lg"
animate={{
scale: [1, 1.1, 1],
opacity: [0.5, 1, 0.5],
@@ -128,8 +128,8 @@ export const GlobalFileDropZone: FC<GlobalFileDropZoneProps> = memo(({ children,
</m.div>
</div>
<div className="text-center">
<p className="text-text text-lg font-medium">Drop files to attach</p>
<p className="text-text-secondary text-sm">
<p className="text-lg font-medium text-text">Drop files to attach</p>
<p className="text-sm text-text-secondary">
Images, PDFs, text files, and audio files are supported
</p>
</div>
@@ -91,7 +91,7 @@ export const AIChatContextBar: Component = memo(({ className }) => {
<button
type="button"
onClick={handleAttachFile}
className="bg-material-medium hover:bg-material-thin border-border text-text-secondary hover:text-text-secondary flex size-7 items-center justify-center rounded-md border transition-colors"
className="flex size-7 items-center justify-center rounded-md border border-border bg-material-medium text-text-secondary transition-colors hover:bg-material-thin hover:text-text-secondary"
title="Upload Files"
>
<i className="i-mgc-attachment-cute-re size-3.5" />
@@ -41,9 +41,9 @@ const AIChatRootInner: FC<AIChatRootProps> = ({ children, chatId: externalChatId
if (!currentChatId) {
return (
<div className="bg-background flex size-full items-center justify-center">
<div className="flex size-full items-center justify-center bg-background">
<div className="flex items-center gap-2">
<i className="i-mgc-loading-3-cute-re text-text size-6 animate-spin" />
<i className="i-mgc-loading-3-cute-re size-6 animate-spin text-text" />
<span className="text-text-secondary">Initializing chat...</span>
</div>
</div>
@@ -10,35 +10,35 @@ export const AIErrorFallback: FallbackRender = (props) => {
const { message, stack } = parseError(props.error)
return (
<div className="bg-theme-background absolute inset-0 mx-auto flex max-w-2xl flex-col items-center justify-center rounded-lg p-8 shadow-sm">
<div className="absolute inset-0 mx-auto flex max-w-2xl flex-col items-center justify-center rounded-lg bg-theme-background p-8 shadow-sm">
<div className="text-center">
{/* AI-specific icon */}
<div className="mb-6">
<i className="i-mgc-ai-cute-re text-orange text-5xl" />
<i className="i-mgc-ai-cute-re text-5xl text-orange" />
</div>
{/* Error title */}
<h2 className="text-text mb-3 text-xl font-semibold">AI Chat Encountered an Error</h2>
<h2 className="mb-3 text-xl font-semibold text-text">AI Chat Encountered an Error</h2>
{/* Error message */}
<div className="text-text-secondary mb-6 text-sm leading-relaxed">
<div className="mb-6 text-sm leading-relaxed text-text-secondary">
{message || "An unexpected error occurred while processing your request."}
</div>
{/* Development stack trace */}
{import.meta.env.DEV && stack ? (
<details className="mb-6 text-left">
<summary className="text-text-tertiary hover:text-text-secondary mb-2 cursor-pointer text-xs">
<summary className="mb-2 cursor-pointer text-xs text-text-tertiary hover:text-text-secondary">
Show technical details
</summary>
<pre className="bg-fill text-text-secondary border-border/40 max-h-32 cursor-text select-text overflow-auto whitespace-pre-wrap rounded-md border p-3 font-mono text-xs">
<pre className="max-h-32 cursor-text select-text overflow-auto whitespace-pre-wrap rounded-md border border-border/40 bg-fill p-3 font-mono text-xs text-text-secondary">
{attachOpenInEditor(stack)}
</pre>
</details>
) : null}
{/* Error description */}
<p className="text-text-tertiary mb-8 text-sm leading-relaxed">
<p className="mb-8 text-sm leading-relaxed text-text-tertiary">
Don't worry! You can try again or reload the chat to continue your conversation.
</p>
@@ -54,7 +54,7 @@ export const AIErrorFallback: FallbackRender = (props) => {
</div>
{/* Feedback component */}
<div className="border-border/40 mt-8 border-t pt-6">
<div className="mt-8 border-t border-border/40 pt-6">
<FeedbackIssue message={message || "AI Chat Error"} stack={stack} error={props.error} />
</div>
</div>
@@ -66,19 +66,19 @@ export const AIModelIndicator = memo(({ className, onModelChange }: AIModelIndic
className={cn(
"inline-flex shrink-0 items-center rounded-xl border font-medium backdrop-blur-sm transition-colors",
hasMultipleModels
? "hover:bg-material-medium cursor-button"
? "cursor-button hover:bg-material-medium"
: "hover:bg-material-medium/50",
"duration-200",
"gap-1.5 p-1 text-xs",
hasMultipleModels && "px-2",
"bg-material-ultra-thin border-border/50",
"border-border/50 bg-material-ultra-thin",
"text-text-secondary",
className,
)}
>
<i className={cn("size-3", iconClass)} />
<span className="@md:inline hidden max-w-20 truncate">
<span className="hidden max-w-20 truncate @md:inline">
{AIModelNameMapping[modelName] || modelName}
</span>
{hasMultipleModels && <i className="i-mingcute-down-line size-3 opacity-60" />}
@@ -95,10 +95,10 @@ const AIAmbientSidebar: React.FC<{ onExpand: () => void }> = ({ onExpand }) => {
exit={{ opacity: 0, x: 20 }}
className="ai-prompt-container ai-prompt-visible fixed bottom-12 right-6 z-50 flex flex-col items-end gap-3"
>
<div className="bg-background/90 border-folo/30 rounded-2xl border px-4 py-3 backdrop-blur-xl">
<div className="rounded-2xl border border-folo/30 bg-background/90 px-4 py-3 backdrop-blur-xl">
<div className="text-right">
<p className="text-text text-sm font-medium">Ask AI anything</p>
<p className="text-text-secondary mt-1 text-xs">
<p className="text-sm font-medium text-text">Ask AI anything</p>
<p className="mt-1 text-xs text-text-secondary">
Get insights about this article
</p>
</div>
@@ -106,12 +106,12 @@ const AIAmbientSidebar: React.FC<{ onExpand: () => void }> = ({ onExpand }) => {
<button
type="button"
className="border-folo/40 from-folo/20 hover:from-folo/30 rounded-full border bg-gradient-to-r to-red-500/20 px-6 py-2 backdrop-blur-xl transition-all duration-300 hover:to-red-500/30"
className="rounded-full border border-folo/40 bg-gradient-to-r from-folo/20 to-red-500/20 px-6 py-2 backdrop-blur-xl transition-all duration-300 hover:from-folo/30 hover:to-red-500/30"
onClick={onExpand}
>
<div className="flex items-center gap-2">
<div className="from-folo ai-dot-pulse size-2 rounded-full bg-gradient-to-r to-red-500" />
<span className="text-text text-sm font-medium">Open AI Chat</span>
<div className="ai-dot-pulse size-2 rounded-full bg-gradient-to-r from-folo to-red-500" />
<span className="text-sm font-medium text-text">Open AI Chat</span>
<KbdCombined abbr="Open AI Chat" joint className="rounded-full px-2">
{toggleAIChatShortcut}
</KbdCombined>
@@ -63,7 +63,7 @@ const ChatHeaderLayout = ({
<div className="h-top-header">
{isFloating && (
<div
className="bg-background/70 backdrop-blur-background absolute inset-0"
className="absolute inset-0 bg-background/70 backdrop-blur-background"
style={{
maskImage: `linear-gradient(to bottom, black 0%, black 90%, transparent 100%)`,
}}
@@ -102,7 +102,7 @@ export const ChatHeader = () => {
renderActions={({ onNewChatClick }) => (
<>
<ActionButton tooltip={t("common.new_chat")} onClick={onNewChatClick}>
<i className="i-mgc-edit-cute-re text-text-secondary size-5" />
<i className="i-mgc-edit-cute-re size-5 text-text-secondary" />
</ActionButton>
<TaskReportDropdown />
@@ -110,16 +110,16 @@ export const ChatHeader = () => {
<ChatMoreDropdown
triggerElement={
<ActionButton tooltip="More">
<i className="i-mingcute-more-1-fill text-text-secondary size-5" />
<i className="i-mingcute-more-1-fill size-5 text-text-secondary" />
</ActionButton>
}
/>
{panelStyle === AIChatPanelStyle.Floating && (
<>
<div className="bg-border h-5 w-px" />
<div className="h-5 w-px bg-border" />
<ActionButton tooltip="Close" onClick={() => setAIPanelVisibility(false)}>
<i className="i-mgc-close-cute-re text-text-secondary size-5" />
<i className="i-mgc-close-cute-re size-5 text-text-secondary" />
</ActionButton>
</>
)}
@@ -137,17 +137,17 @@ export const ChatPageHeader = () => {
renderActions={({ onNewChatClick }) => (
<>
<ActionButton tooltip={t("common.new_chat")} onClick={onNewChatClick}>
<i className="i-mgc-edit-cute-re text-text-secondary size-5" />
<i className="i-mgc-edit-cute-re size-5 text-text-secondary" />
</ActionButton>
<TaskReportDropdown />
<div className="bg-border mx-2 h-5 w-px" />
<div className="mx-2 h-5 w-px bg-border" />
<ChatMoreDropdown
canToggleMode={false}
triggerElement={
<ActionButton tooltip="More">
<i className="i-mingcute-more-1-fill text-text-secondary size-5" />
<i className="i-mingcute-more-1-fill size-5 text-text-secondary" />
</ActionButton>
}
/>
@@ -85,7 +85,7 @@ export const ChatHistoryDropdown = ({
const defaultTrigger = (
<ActionButton tooltip="Chat History">
<i className="i-mgc-history-cute-re text-text-secondary size-5" />
<i className="i-mgc-history-cute-re size-5 text-text-secondary" />
</ActionButton>
)
@@ -97,12 +97,12 @@ export const ChatHistoryDropdown = ({
<DropdownMenuContent align="start" className="max-h-96 w-72 overflow-y-auto">
{loading ? (
<div className="flex items-center justify-center py-8">
<i className="i-mgc-loading-3-cute-re text-text-secondary size-5 animate-spin" />
<i className="i-mgc-loading-3-cute-re size-5 animate-spin text-text-secondary" />
</div>
) : sessions.length > 0 ? (
<>
<div className="mb-1.5 px-2 py-1">
<p className="text-text-secondary text-xs font-medium">Recent Chats</p>
<p className="text-xs font-medium text-text-secondary">Recent Chats</p>
</div>
{sessions.map((session) => (
<DropdownMenuItem
@@ -114,19 +114,19 @@ export const ChatHistoryDropdown = ({
<p className="truncate text-sm font-medium">
{session.title || t("common.new_chat")}
</p>
<p className="text-text-secondary group-data-[highlighted]:text-text-secondary-dark mt-0.5 text-xs">
<p className="mt-0.5 text-xs text-text-secondary group-data-[highlighted]:text-text-secondary-dark">
<span>{session.messageCount}</span>
<span> {session.messageCount === 1 ? "message" : "messages"}</span>
</p>
</div>
<div className="relative flex min-w-0 items-center">
<span className="text-text-secondary group-data-[highlighted]:text-text-secondary-dark ml-2 shrink-0 cursor-help text-xs">
<span className="ml-2 shrink-0 cursor-help text-xs text-text-secondary group-data-[highlighted]:text-text-secondary-dark">
<RelativeDay date={session.updatedAt} />
</span>
<button
type="button"
onClick={(e) => handleDeleteSession(session.chatId, e)}
className="bg-accent absolute inset-y-0 right-0 flex items-center px-2 py-1 text-white opacity-0 shadow-lg backdrop-blur-sm group-data-[highlighted]:text-white group-data-[highlighted]:opacity-100"
className="absolute inset-y-0 right-0 flex items-center bg-accent px-2 py-1 text-white opacity-0 shadow-lg backdrop-blur-sm group-data-[highlighted]:text-white group-data-[highlighted]:opacity-100"
disabled={deletingChatId === session.chatId}
>
{deletingChatId === session.chatId ? (
@@ -141,8 +141,8 @@ export const ChatHistoryDropdown = ({
</>
) : (
<div className="flex flex-col items-center py-8 text-center">
<i className="i-mgc-time-cute-re text-text-secondary mb-2 block size-8" />
<p className="text-text-secondary text-sm">No chat history yet</p>
<i className="i-mgc-time-cute-re mb-2 block size-8 text-text-secondary" />
<p className="text-sm text-text-secondary">No chat history yet</p>
</div>
)}
</DropdownMenuContent>
@@ -170,7 +170,7 @@ export const ChatInput = memo(({ onSend, variant, ref: forwardedRef }: ChatInput
{/* Context Bar - only shown in non-onboarding scene, positioned below the input area */}
{scene !== "onboarding" && (
<div className="border-border/20 relative z-10 border-t bg-transparent">
<div className="relative z-10 border-t border-border/20 bg-transparent">
<div className="flex items-center justify-between px-4 py-2.5">
<div className="min-w-0 flex-1 shrink">
<AIChatContextBar className="border-0 bg-transparent p-0" />
@@ -313,7 +313,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => {
const { handleScroll } = useAttachScrollBeyond()
return (
<GlobalFileDropZone className="@container flex size-full flex-col">
<GlobalFileDropZone className="flex size-full flex-col @container">
<div className="flex min-h-0 flex-1 flex-col" ref={scrollContainerParentRef}>
<AnimatePresence>
{!hasMessages && !isLoadingHistory ? (
@@ -340,7 +340,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => {
>
{isLoadingHistory ? (
<div className="flex min-h-96 items-center justify-center">
<i className="i-mgc-loading-3-cute-re text-text size-8 animate-spin" />
<i className="i-mgc-loading-3-cute-re size-8 animate-spin text-text" />
</div>
) : (
<div
@@ -372,7 +372,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => {
type="button"
onClick={() => resetScrollState()}
className={cn(
"center bg-mix-background/transparent-8/2 backdrop-blur-background group flex size-8 items-center gap-2 rounded-full border transition-all",
"group center flex size-8 items-center gap-2 rounded-full border backdrop-blur-background transition-all bg-mix-background/transparent-8/2",
"border-border",
"hover:border-border/60 active:scale-[0.98]",
)}
@@ -432,7 +432,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => {
/>
<div
className="from-background/20 to-background/0 pointer-events-none absolute inset-x-0 bottom-0 h-60 bg-gradient-to-b"
className="pointer-events-none absolute inset-x-0 bottom-0 h-60 bg-gradient-to-b from-background/20 to-background/0"
style={{
maskImage: "linear-gradient(to top, black 20%, transparent 70%)",
WebkitMaskImage: "linear-gradient(to top, black 20%, transparent 70%)",
@@ -29,16 +29,16 @@ export const AIHeaderTitle = ({
aria-label={ariaLabel}
className={cn(
"group/button flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md bg-transparent p-0 text-left",
"focus-visible:ring-border focus-visible:ring-offset-background outline-none transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2",
"outline-none transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:ring-border focus-visible:ring-offset-2 focus-visible:ring-offset-background",
className,
)}
>
<h1 className="text-text truncate font-bold">
<h1 className="truncate font-bold text-text">
<span className="animate-mask-left-to-right [--animation-duration:1s]">
{displayTitle}
</span>
</h1>
<i className="i-mingcute-down-line text-text-secondary group-data-[state=open]:text-text group-hover/button:text-text size-4 transition-all duration-200 group-data-[state=open]:rotate-180" />
<i className="i-mingcute-down-line size-4 text-text-secondary transition-all duration-200 group-hover/button:text-text group-data-[state=open]:rotate-180 group-data-[state=open]:text-text" />
</button>
</div>
)
@@ -154,7 +154,7 @@ export const CollapsibleError: React.FC<CollapsibleErrorProps> = ({
return (
<div
className={cn(
"animate-in slide-in-from-bottom-2 fade-in-0 group mb-3 duration-300",
"group mb-3 duration-300 animate-in fade-in-0 slide-in-from-bottom-2",
className,
)}
onMouseEnter={() => setIsExpanded(true)}
@@ -162,7 +162,7 @@ export const CollapsibleError: React.FC<CollapsibleErrorProps> = ({
>
<div
className={
"border-red/20 shadow-red/5 dark:shadow-red/10 backdrop-blur-background bg-mix-red-20 relative overflow-hidden rounded-xl transition-all duration-200"
"relative overflow-hidden rounded-xl border-red/20 shadow-red/5 backdrop-blur-background transition-all duration-200 bg-mix-red-20 dark:shadow-red/10"
}
>
{/* Collapsed Content */}
@@ -170,15 +170,15 @@ export const CollapsibleError: React.FC<CollapsibleErrorProps> = ({
className="relative z-10 flex items-center gap-3 p-3"
style={{ minHeight: collapsedHeight }}
>
<div className="bg-red/20 flex size-6 flex-shrink-0 items-center justify-center rounded-full transition-colors duration-200">
<i className={cn(icon, "text-red size-3")} />
<div className="flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-red/20 transition-colors duration-200">
<i className={cn(icon, "size-3 text-red")} />
</div>
<div className="min-w-0 flex-1">
<div className="text-red text-sm font-medium">{getErrorTitle()}</div>
<div className="text-sm font-medium text-red">{getErrorTitle()}</div>
</div>
<span
className={cn(
"text-text-tertiary text-xs",
"text-xs text-text-tertiary",
"transition-[opacity,transform] duration-150 ease-in-out",
"[@starting-style]:scale-100 [@starting-style]:opacity-100",
isExpanded ? "scale-95 opacity-0" : "scale-100 opacity-100",
@@ -200,12 +200,12 @@ export const CollapsibleError: React.FC<CollapsibleErrorProps> = ({
data-state={isExpanded ? "open" : "closed"}
>
<ScrollArea focusable={false} viewportProps={{ style: { maxHeight: expandedMaxHeight } }}>
<div className="border-red/20 bg-red/5 border-t px-3 pb-3">
<div className="text-red/80 bg-red/10 mt-2 cursor-text select-text break-all rounded-md p-3 text-xs leading-relaxed">
<div className="border-t border-red/20 bg-red/5 px-3 pb-3">
<div className="mt-2 cursor-text select-text break-all rounded-md bg-red/10 p-3 text-xs leading-relaxed text-red/80">
{displayMessage as string}
</div>
{contextualInfo && (
<div className="bg-red/5 border-red/10 mt-3 rounded-md border p-3">
<div className="mt-3 rounded-md border border-red/10 bg-red/5 p-3">
{contextualInfo}
</div>
)}
@@ -57,14 +57,14 @@ const SessionItem = ({ session, onClick, onDelete, isLoading }: SessionItemProps
<p className="mb-0.5 truncate font-medium">{session.title || "Untitled Chat"}</p>
</div>
<div className="relative flex min-w-0 items-center">
<p className="text-text-secondary ml-2 shrink-0 truncate text-xs">
<p className="ml-2 shrink-0 truncate text-xs text-text-secondary">
<RelativeDay date={new Date(session.updatedAt)} />
</p>
{onDelete && (
<button
type="button"
onClick={onDelete}
className="bg-accent absolute inset-y-0 right-0 flex items-center px-2 py-1 text-white opacity-0 shadow-lg backdrop-blur-sm group-data-[highlighted]:text-white group-data-[highlighted]:opacity-100"
className="absolute inset-y-0 right-0 flex items-center bg-accent px-2 py-1 text-white opacity-0 shadow-lg backdrop-blur-sm group-data-[highlighted]:text-white group-data-[highlighted]:opacity-100"
disabled={isLoading}
>
{isLoading ? (
@@ -83,8 +83,8 @@ const SessionItem = ({ session, onClick, onDelete, isLoading }: SessionItemProps
const EmptyState = () => {
return (
<div className="flex flex-col items-center py-8 text-center">
<i className="i-mgc-calendar-time-add-cute-re text-text-secondary mb-2 block size-8" />
<p className="text-text-secondary text-sm">No unread task reports</p>
<i className="i-mgc-calendar-time-add-cute-re mb-2 block size-8 text-text-secondary" />
<p className="text-sm text-text-secondary">No unread task reports</p>
</div>
)
}
@@ -192,10 +192,10 @@ export const TaskReportDropdown = ({ triggerElement, asChild = true }: TaskRepor
const defaultTrigger = (
<ActionButton tooltip="Task Reports" className="relative">
<i className="i-mgc-calendar-time-add-cute-re text-text-secondary size-5" />
<i className="i-mgc-calendar-time-add-cute-re size-5 text-text-secondary" />
{hasUnreadSessions && (
<span
className="bg-accent absolute right-1 top-1 block size-2 rounded-full shadow-[0_0_0_2px_var(--color-bg-default)] dark:shadow-[0_0_0_2px_var(--color-bg-default)]"
className="absolute right-1 top-1 block size-2 rounded-full bg-accent shadow-[0_0_0_2px_var(--color-bg-default)] dark:shadow-[0_0_0_2px_var(--color-bg-default)]"
aria-label="Unread task reports"
/>
)}
@@ -213,7 +213,7 @@ export const TaskReportDropdown = ({ triggerElement, asChild = true }: TaskRepor
{triggerElement || defaultTrigger}
{hasUnreadSessions && triggerElement && (
<span
className="bg-accent absolute right-1 top-1 block size-2 rounded-full shadow-[0_0_0_2px_var(--color-bg-default)] dark:shadow-[0_0_0_2px_var(--color-bg-default)]"
className="absolute right-1 top-1 block size-2 rounded-full bg-accent shadow-[0_0_0_2px_var(--color-bg-default)] dark:shadow-[0_0_0_2px_var(--color-bg-default)]"
aria-label="Unread task reports"
/>
)}
@@ -66,11 +66,11 @@ const DefaultWelcomeHeader = ({ description }: { description: string }) => (
<AISpline />
</div>
<div className="flex flex-col gap-2">
<h1 className="text-text flex items-center justify-center gap-2 text-2xl font-semibold">
<h1 className="flex items-center justify-center gap-2 text-2xl font-semibold text-text">
<Folo className="size-11" /> AI
</h1>
<p className="text-text-secondary text-balance text-sm">{description}</p>
<p className="text-balance text-sm text-text-secondary">{description}</p>
</div>
</m.div>
)
@@ -105,7 +105,7 @@ export const AIChatMessage: React.FC<AIChatMessageProps> = React.memo(
return (
<div onContextMenu={stopPropagation} className="group flex justify-start">
<div className="text-text relative flex max-w-full flex-col gap-2">
<div className="relative flex max-w-full flex-col gap-2 text-text">
{/* Normal message display */}
<div className="text-text">
<div className="flex cursor-text select-text flex-col gap-2 text-sm">
@@ -116,13 +116,13 @@ export const AIChatMessage: React.FC<AIChatMessageProps> = React.memo(
{/* Action buttons */}
{!!originalMessage.metadata?.finishTime && (
<div className="absolute -left-2 bottom-1 right-0 flex items-center gap-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100">
<span className="text-text-tertiary whitespace-nowrap px-2 py-1 text-[11px] leading-none">
<span className="whitespace-nowrap px-2 py-1 text-[11px] leading-none text-text-tertiary">
<RelativeTime date={originalMessage.createdAt} />
</span>
<button
type="button"
onClick={handleCopy}
className="text-text-secondary hover:bg-fill-tertiary flex items-center gap-1 rounded-md px-2 py-1 text-xs transition-colors"
className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary transition-colors hover:bg-fill-tertiary"
title="Copy message"
>
<i className="i-mgc-copy-2-cute-re size-3" />
@@ -133,7 +133,7 @@ export const AIChatMessage: React.FC<AIChatMessageProps> = React.memo(
<TokenUsagePill metadata={message.metadata}>
<button
type="button"
className="text-text-secondary hover:bg-fill-tertiary absolute right-0 flex items-center gap-1 rounded-md px-2 py-1 text-xs transition-colors"
className="absolute right-0 flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary transition-colors hover:bg-fill-tertiary"
>
<i className="i-mgc-information-cute-re size-3" />
</button>
@@ -157,7 +157,7 @@ export const AIChatWaitingIndicator: React.FC = () => {
transition={{ duration: 0.2, ease: [0.25, 0.46, 0.45, 0.94] }}
className="mb-4"
>
<div className="text-text-secondary flex items-center gap-2 rounded-full text-xs">
<div className="flex items-center gap-2 rounded-full text-xs text-text-secondary">
<i className="i-mgc-loading-3-cute-re size-3 animate-spin" />
<span className="font-medium">Thinking…</span>
</div>
@@ -143,11 +143,11 @@ export const AIMessageParts: React.FC<AIMessagePartsProps> = React.memo(
case "tool-displayFlowChart": {
const loadingElement = (
<div className="bg-material-medium my-2 flex aspect-[4/3] w-[calc(var(--ai-chat-message-container-width,65ch))] max-w-full items-center justify-center rounded">
<div className="my-2 flex aspect-[4/3] w-[calc(var(--ai-chat-message-container-width,65ch))] max-w-full items-center justify-center rounded bg-material-medium">
<div className="flex flex-col items-center gap-4">
<div className="flex items-center gap-2">
<i className="i-mgc-loading-3-cute-re text-text-secondary size-4 animate-spin" />
<span className="text-text-secondary text-sm font-medium">
<i className="i-mgc-loading-3-cute-re size-4 animate-spin text-text-secondary" />
<span className="text-sm font-medium text-text-secondary">
Generating Flow Chart...
</span>
</div>
@@ -115,7 +115,7 @@ export const EditableMessage = ({
return (
<div className={cn("relative", className)}>
{/* Edit input */}
<div className="bg-background/60 focus-within:ring-accent/20 focus-within:border-accent/80 border-border/80 relative overflow-hidden rounded-xl border backdrop-blur-xl duration-200 focus-within:ring-2">
<div className="relative overflow-hidden rounded-xl border border-border/80 bg-background/60 backdrop-blur-xl duration-200 focus-within:border-accent/80 focus-within:ring-2 focus-within:ring-accent/20">
<ScrollArea rootClassName="mr-20 flex-1 overflow-auto" viewportClassName="px-5 py-3.5">
<LexicalRichEditor
ref={editorRef}
@@ -134,7 +134,7 @@ export const EditableMessage = ({
type="button"
onClick={handleCancel}
disabled={isProcessing}
className="text-text-tertiary hover:text-text hover:bg-fill/50 flex size-8 items-center justify-center rounded-lg transition-colors disabled:opacity-50"
className="flex size-8 items-center justify-center rounded-lg text-text-tertiary transition-colors hover:bg-fill/50 hover:text-text disabled:opacity-50"
title="Cancel (Esc)"
>
<i className="i-mgc-close-cute-re size-4" />
@@ -143,7 +143,7 @@ export const EditableMessage = ({
type="button"
onClick={handleSave}
disabled={isProcessing || isEmpty}
className="text-accent hover:text-accent hover:bg-accent/10 flex size-8 items-center justify-center rounded-lg transition-colors disabled:opacity-50"
className="flex size-8 items-center justify-center rounded-lg text-accent transition-colors hover:bg-accent/10 hover:text-accent disabled:opacity-50"
title="Save (Enter)"
>
<i className="i-mgc-send-plane-cute-fi size-4" />
@@ -153,8 +153,8 @@ export const EditableMessage = ({
{/* Helper text */}
<div className="relative mt-2">
<div className="bg-background absolute -inset-x-2 -bottom-2 -top-8 z-[-1]" />
<div className="text-text-secondary relative z-[1] text-xs">
<div className="absolute -inset-x-2 -bottom-2 -top-8 z-[-1] bg-background" />
<div className="relative z-[1] text-xs text-text-secondary">
Press <Kbd abbr="Enter">Enter</Kbd> to save, <Kbd abbr="Esc">Esc</Kbd> to cancel
</div>
</div>
@@ -74,13 +74,13 @@ export const ImageThumbnail: React.FC<ImageThumbnailProps> = React.memo((props)
</HoverCard.Trigger>
<HoverCard.Portal>
<HoverCard.Content
className="bg-material-thick border-border w-fit rounded-md border shadow-lg"
className="w-fit rounded-md border border-border bg-material-thick shadow-lg"
sideOffset={8}
>
<div className="relative overflow-hidden rounded-md">
{contentImageError ? (
<div className="bg-fill-secondary border-border flex h-32 w-40 items-center justify-center rounded-md border">
<div className="text-text-tertiary flex flex-col items-center gap-2">
<div className="flex h-32 w-40 items-center justify-center rounded-md border border-border bg-fill-secondary">
<div className="flex flex-col items-center gap-2 text-text-tertiary">
<i className="i-mgc-photo-album-cute-fi size-6" />
<span className="text-xs">{computed.filename}</span>
</div>
@@ -125,11 +125,11 @@ const ImageThumbnailInner: React.FC<{ src: string; alt: string; className?: stri
return (
<div
className={cn(
"bg-fill-secondary border-border flex items-center justify-center border",
"flex items-center justify-center border border-border bg-fill-secondary",
className,
)}
>
<i className="i-mgc-photo-album-cute-re text-text-tertiary size-3" />
<i className="i-mgc-photo-album-cute-re size-3 text-text-tertiary" />
</div>
)
}
@@ -139,10 +139,10 @@ const ImageThumbnailInner: React.FC<{ src: string; alt: string; className?: stri
{!imageLoaded && (
<div
className={
"bg-fill-secondary border-border absolute inset-0 flex items-center justify-center border"
"absolute inset-0 flex items-center justify-center border border-border bg-fill-secondary"
}
>
<i className="i-mgc-loading-3-cute-re text-text-tertiary size-3 animate-spin" />
<i className="i-mgc-loading-3-cute-re size-3 animate-spin text-text-tertiary" />
</div>
)}
<m.img
@@ -35,18 +35,18 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
<TooltipPortal>
<TooltipContent side="top" className="p-2" align="center" sideOffset={8}>
<div className="mb-2 flex flex-col gap-2">
<div className="text-text text-xs">Model Info</div>
<div className="text-text-secondary font-mono text-xs">
<div className="text-xs text-text">Model Info</div>
<div className="font-mono text-xs text-text-secondary">
{metadata.modelUsed ?? "Unknown"}
</div>
</div>
<div className="space-y-2 text-xs">
<div className="text-text font-medium">Token Usage</div>
<div className="font-medium text-text">Token Usage</div>
<div className="grid grid-cols-2 gap-x-4 gap-y-1">
{metadata.totalTokens != null && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Total:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatTokenCountString(metadata.totalTokens)}
</span>
</div>
@@ -54,7 +54,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{metadata.billedTokens != null && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Billed:</span>
<span className="text-accent font-mono">
<span className="font-mono text-accent">
{formatTokenCountString(metadata.billedTokens)}
</span>
</div>
@@ -62,7 +62,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{metadata.contextTokens != null && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Context:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatTokenCountString(metadata.contextTokens)}
</span>
</div>
@@ -70,7 +70,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{metadata.outputTokens != null && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Output:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatTokenCountString(metadata.outputTokens)}
</span>
</div>
@@ -78,7 +78,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{hasReasoningTokens && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Reasoning:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatTokenCountString(metadata.reasoningTokens!)}
</span>
</div>
@@ -86,7 +86,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{hasCachedInputTokens && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Cached:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatTokenCountString(metadata.cachedInputTokens!)}
</span>
</div>
@@ -99,7 +99,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{hasDuration && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Duration:</span>
<span className="text-text font-mono">
<span className="font-mono text-text">
{formatDuration(metadata.duration!)}
</span>
</div>
@@ -107,7 +107,7 @@ export const TokenUsagePill: React.FC<TokenUsagePillProps> = ({ metadata, childr
{hasBillingMultiplier && (
<div className="flex justify-between gap-2">
<span className="text-text-secondary">Multiplier:</span>
<span className="text-text font-mono">{metadata.billingMultiplier!}×</span>
<span className="font-mono text-text">{metadata.billingMultiplier!}×</span>
</div>
)}
</div>
@@ -27,7 +27,7 @@ export const ToolInvocationComponent: React.FC<ToolInvocationComponentProps> = R
<div className={clsx("relative pl-8 last:pb-0", variant === "tight" ? "pb-0" : "pb-3")}>
<div
aria-hidden
className={`border-fill bg-fill-vibrant absolute left-2 top-2 size-2 -translate-x-1/2 rounded-full border ${hasError ? "text-red" : ""}`}
className={`absolute left-2 top-2 size-2 -translate-x-1/2 rounded-full border border-fill bg-fill-vibrant ${hasError ? "text-red" : ""}`}
>
<i className={`i-mgc-tool-cute-re absolute top-1/2 -translate-x-1/4 -translate-y-1/2`} />
</div>
@@ -39,7 +39,7 @@ export const ToolInvocationComponent: React.FC<ToolInvocationComponentProps> = R
className="group/collapse border-none"
title={
<div className="group/tool flex h-6 min-w-0 flex-1 items-center py-0">
<div className="text-text-secondary flex items-center gap-2 text-xs">
<div className="flex items-center gap-2 text-xs text-text-secondary">
<span>
{hasError ? "Tool Failed:" : isCalling ? "Tool Calling:" : "Tool Called:"}
</span>
@@ -58,9 +58,9 @@ export const ToolInvocationComponent: React.FC<ToolInvocationComponentProps> = R
{/* Show tool arguments if available */}
{hasArgs ? (
<div>
<div className="text-text-secondary mb-1 font-medium">Arguments:</div>
<div className="mb-1 font-medium text-text-secondary">Arguments:</div>
<JsonHighlighter
className="text-text-tertiary bg-fill-secondary overflow-x-auto rounded p-2 text-[11px]"
className="overflow-x-auto rounded bg-fill-secondary p-2 text-[11px] text-text-tertiary"
json={JSON.stringify(part.input, null, 2)}
/>
</div>
@@ -69,9 +69,9 @@ export const ToolInvocationComponent: React.FC<ToolInvocationComponentProps> = R
{/* Show tool result if available */}
{hasResult ? (
<div>
<div className="text-text-secondary mb-1 font-medium">Result:</div>
<div className="mb-1 font-medium text-text-secondary">Result:</div>
<JsonHighlighter
className="text-text-tertiary bg-fill-secondary overflow-x-auto rounded p-2 text-[11px]"
className="overflow-x-auto rounded bg-fill-secondary p-2 text-[11px] text-text-tertiary"
json={JSON.stringify(part.output, null, 2)}
/>
</div>
@@ -80,8 +80,8 @@ export const ToolInvocationComponent: React.FC<ToolInvocationComponentProps> = R
{/* Show error if available */}
{hasError && "errorText" in part ? (
<div>
<div className="text-red mb-1 font-medium">Error:</div>
<pre className="text-red bg-red/10 overflow-x-auto rounded p-2 text-[11px]">
<div className="mb-1 font-medium text-red">Error:</div>
<pre className="overflow-x-auto rounded bg-red/10 p-2 text-[11px] text-red">
{String(part.errorText)}
</pre>
</div>
@@ -139,8 +139,8 @@ export const UserChatMessage: React.FC<UserChatMessageProps> = React.memo(({ mes
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<div className="text-text relative flex max-w-[calc(100%-1rem)] flex-col gap-2">
<div className="text-text bg-fill rounded-2xl px-4 py-2.5">
<div className="relative flex max-w-[calc(100%-1rem)] flex-col gap-2 text-text">
<div className="rounded-2xl bg-fill px-4 py-2.5 text-text">
<div className="flex select-text flex-col gap-2 text-sm">
<UserMessageParts message={message} />
</div>
@@ -156,13 +156,13 @@ export const UserChatMessage: React.FC<UserChatMessageProps> = React.memo(({ mes
}}
transition={{ duration: 0.2, ease: "easeOut" }}
>
<span className="text-text-tertiary whitespace-nowrap px-2 py-1 text-[11px] leading-none">
<span className="whitespace-nowrap px-2 py-1 text-[11px] leading-none text-text-tertiary">
<RelativeTime date={message.createdAt} />
</span>
<button
type="button"
onClick={handleEdit}
className="text-text-secondary hover:bg-fill-secondary flex items-center gap-1 rounded-md px-2 py-1 text-xs transition-colors"
className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary transition-colors hover:bg-fill-secondary"
title="Edit message"
>
<i className="i-mgc-edit-cute-re size-3" />
@@ -171,7 +171,7 @@ export const UserChatMessage: React.FC<UserChatMessageProps> = React.memo(({ mes
<button
type="button"
onClick={handleRetry}
className="text-text-secondary hover:bg-fill-secondary flex items-center gap-1 rounded-md px-2 py-1 text-xs transition-colors"
className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary transition-colors hover:bg-fill-secondary"
title="Retry"
>
<i className="i-mgc-refresh-2-cute-re size-3" />
@@ -76,7 +76,7 @@ export const UserRichTextMessage: React.FC<UserRichTextMessageProps> = React.mem
}
}
return (
<div className={cn("text-text relative cursor-text text-sm", className)}>
<div className={cn("relative cursor-text text-sm text-text", className)}>
<LexicalComposer initialConfig={initialConfig}>
<RichTextPlugin
contentEditable={
@@ -75,7 +75,7 @@ const createAiMessageMarkdownElementsRender = (canAnimate: boolean) => {
}
}
return <pre className="text-text-secondary bg-material-medium">{children}</pre>
return <pre className="bg-material-medium text-text-secondary">{children}</pre>
},
a: ({ node, ...props }) => {
return React.createElement(RelatedEntryLink, { ...props } as any)
@@ -114,11 +114,11 @@ const createAiMessageMarkdownElementsRender = (canAnimate: boolean) => {
table: ({ children, ref, node, ...props }) => {
return (
<div className="border-border bg-material-thin overflow-x-auto rounded-lg border">
<div className="overflow-x-auto rounded-lg border border-border bg-material-thin">
<table
{...props}
style={ANIMATION_STYLE}
className="divide-border my-0 min-w-full divide-y text-sm"
className="my-0 min-w-full divide-y divide-border text-sm"
>
{children}
</table>
@@ -136,7 +136,7 @@ const createAiMessageMarkdownElementsRender = (canAnimate: boolean) => {
return (
<th
{...props}
className="text-text-secondary whitespace-nowrap px-4 py-3 text-left text-xs font-medium uppercase tracking-wider"
className="whitespace-nowrap px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary"
>
{children}
</th>
@@ -144,21 +144,21 @@ const createAiMessageMarkdownElementsRender = (canAnimate: boolean) => {
},
tbody: ({ children, ref, node, ...props }) => {
return (
<tbody {...props} className="bg-material-ultra-thin divide-border divide-y">
<tbody {...props} className="divide-y divide-border bg-material-ultra-thin">
{children}
</tbody>
)
},
tr: ({ children, ref, node, ...props }) => {
return (
<tr {...props} className="hover:bg-material-thin transition-colors duration-150">
<tr {...props} className="transition-colors duration-150 hover:bg-material-thin">
{textAnimator(children as any)}
</tr>
)
},
td: ({ children, ref, node, ...props }) => {
return (
<td {...props} className="text-text whitespace-nowrap px-4 py-3 text-sm">
<td {...props} className="whitespace-nowrap px-4 py-3 text-sm text-text">
{textAnimator(children as any)}
</td>
)
@@ -229,7 +229,7 @@ const InlineFoloReference: React.FC<
aria-label={type === "entry" ? `Open entry ${targetId}` : `Open feed ${targetId}`}
title={type === "entry" ? `Open entry ${targetId}` : `Open feed ${targetId}`}
className={cn(
"text-text-secondary hover:text-text mx-[0.15em] inline-flex cursor-pointer items-center align-middle opacity-80 transition-opacity hover:opacity-100",
"mx-[0.15em] inline-flex cursor-pointer items-center align-middle text-text-secondary opacity-80 transition-opacity hover:text-text hover:opacity-100",
"-translate-y-0.5",
className,
)}
@@ -270,7 +270,7 @@ const RelatedEntryLink = (props: LinkProps) => {
return (
<button
type="button"
className="follow-link--underline text-text cursor-pointer font-semibold no-underline"
className="follow-link--underline cursor-pointer font-semibold text-text no-underline"
onClick={() => {
peekModal(entryId, "modal")
}}
@@ -61,7 +61,7 @@ export function useContextBlockPresentation(block: AIChatContextBlock): ContextB
{uploadStatus === "error" && (
<div
className="bg-red/80 absolute inset-0 flex items-center justify-center rounded-md"
className="absolute inset-0 flex items-center justify-center rounded-md bg-red/80"
title={errorMessage}
>
<i className="i-mgc-close-cute-re size-3 text-white" />
@@ -75,11 +75,11 @@ export function useContextBlockPresentation(block: AIChatContextBlock): ContextB
</span>
{uploadStatus === "uploading" && uploadProgress !== undefined && (
<span className="text-text-tertiary text-xs">{Math.round(uploadProgress)}%</span>
<span className="text-xs text-text-tertiary">{Math.round(uploadProgress)}%</span>
)}
{uploadStatus === "error" && (
<span className="text-red text-xs" title={errorMessage}>
<span className="text-xs text-red" title={errorMessage}>
Upload failed
</span>
)}
@@ -102,12 +102,12 @@ export function useContextBlockPresentation(block: AIChatContextBlock): ContextB
strokeWidth={2}
variant="default"
/>
<span className="text-text-tertiary text-xs">{Math.round(uploadProgress)}%</span>
<span className="text-xs text-text-tertiary">{Math.round(uploadProgress)}%</span>
</div>
)}
{uploadStatus === "error" && (
<i className="i-mgc-close-cute-re text-red size-3" title={errorMessage} />
<i className="i-mgc-close-cute-re size-3 text-red" title={errorMessage} />
)}
</div>
)
@@ -7,14 +7,14 @@ interface ErrorStateProps {
}
export const LoadingState = ({ description = "Fetching data..." }: LoadingStateProps) => (
<div className="bg-material-medium text-text-tertiary flex h-32 animate-pulse items-center justify-center rounded-lg text-sm">
<div className="flex h-32 animate-pulse items-center justify-center rounded-lg bg-material-medium text-sm text-text-tertiary">
{description}
</div>
)
export const ErrorState = ({ error = "An error occurred. Please try again." }: ErrorStateProps) => {
return (
<div className="bg-mix-red/background-1/4 text-text-tertiary flex h-32 items-center justify-center rounded-lg text-sm">
<div className="flex h-32 items-center justify-center rounded-lg text-sm text-text-tertiary bg-mix-red/background-1/4">
{error}
</div>
)
@@ -37,7 +37,7 @@ export const UploadProgress: FC<UploadProgressProps> = memo(
{/* Progress Bar */}
<div
className={cn(
"bg-fill-secondary relative overflow-hidden rounded-full",
"relative overflow-hidden rounded-full bg-fill-secondary",
sizeClasses[size],
)}
>
@@ -55,7 +55,7 @@ export const UploadProgress: FC<UploadProgressProps> = memo(
{/* Percentage Text */}
{showPercentage && (
<div className="text-text-tertiary mt-1 text-center text-xs">
<div className="mt-1 text-center text-xs text-text-tertiary">
{Math.round(progressValue)}%
</div>
)}
@@ -142,7 +142,7 @@ export const CircularProgress: FC<CircularProgressProps> = memo(
{/* Percentage text */}
{showPercentage && (
<div className="text-text-tertiary absolute inset-0 flex items-center justify-center text-xs font-medium">
<div className="absolute inset-0 flex items-center justify-center text-xs font-medium text-text-tertiary">
{Math.round(progressValue)}%
</div>
)}
@@ -115,7 +115,7 @@ interface FileAttachmentComponentProps {
function FileAttachmentPill({ attachment }: { attachment: FileAttachment }) {
return (
<span
className="bg-fill border-border inline-flex items-center gap-1 rounded border px-2 py-1 text-xs"
className="inline-flex items-center gap-1 rounded border border-border bg-fill px-2 py-1 text-xs"
style={{
backgroundColor: "var(--fill)",
color: "var(--text)",
@@ -127,10 +127,10 @@ function FileAttachmentPill({ attachment }: { attachment: FileAttachment }) {
{attachment.name}
</span>
{attachment.uploadStatus === "uploading" && (
<i className="i-mgc-loading-3-cute-re text-accent animate-spin" />
<i className="i-mgc-loading-3-cute-re animate-spin text-accent" />
)}
{attachment.uploadStatus === "processing" && (
<i className="i-mgc-loading-3-cute-re text-accent animate-spin" />
<i className="i-mgc-loading-3-cute-re animate-spin text-accent" />
)}
{attachment.uploadStatus === "error" && <i className="i-mgc-close-cute-re text-red" />}
{attachment.uploadStatus === "completed" && <i className="i-mgc-check-cute-re text-green" />}
@@ -140,7 +140,7 @@ function FileAttachmentPill({ attachment }: { attachment: FileAttachment }) {
function MissingFilePill() {
return (
<span className="bg-fill border-border text-gray inline-flex items-center gap-1 rounded border px-2 py-1 text-xs">
<span className="inline-flex items-center gap-1 rounded border border-border bg-fill px-2 py-1 text-xs text-gray">
<i className="i-mgc-attachment-cute-re" />
<span className="max-w-32 truncate">File not found</span>
</span>
@@ -38,14 +38,14 @@ export const FileDropZone = memo(({ isVisible, isDragOver, className }: FileDrop
exit={{ scale: 0.9, y: 10 }}
transition={Spring.presets.snappy}
className={cn(
"bg-background/95 rounded-xl border-2 border-dashed p-6 text-center transition-all duration-200",
"rounded-xl border-2 border-dashed bg-background/95 p-6 text-center transition-all duration-200",
isDragOver
? "border-accent bg-accent/5 shadow-accent/20 shadow-lg"
? "border-accent bg-accent/5 shadow-lg shadow-accent/20"
: "border-border/50 shadow-sm",
)}
>
<m.div
className="text-accent mb-3 flex justify-center"
className="mb-3 flex justify-center text-accent"
animate={isDragOver ? { scale: [1, 1.1, 1] } : {}}
transition={{
duration: 0.6,
@@ -56,11 +56,11 @@ export const FileDropZone = memo(({ isVisible, isDragOver, className }: FileDrop
<i className="i-mgc-file-upload-cute-re size-8" />
</m.div>
<p className={cn("text-text font-medium", isDragOver && "text-accent")}>
<p className={cn("font-medium text-text", isDragOver && "text-accent")}>
{isDragOver ? "Drop files to upload" : "Drag files here to upload"}
</p>
<p className="text-text-secondary mt-1 text-sm">
<p className="mt-1 text-sm text-text-secondary">
Images, PDFs, and text files supported
</p>
</m.div>
@@ -67,7 +67,7 @@ const MentionTooltipContent = ({ mentionData }: { mentionData: MentionData }) =>
>
<MentionTypeIcon type={mentionData.type} value={mentionData.value} className="size-3" />
</div>
<span className="text-text text-sm">{displayValue}</span>
<span className="text-sm text-text">{displayValue}</span>
</div>
)
}
@@ -68,7 +68,7 @@ const MentionSuggestionItem = React.memo(
return (
<span
key={`${mention.id}-${index}`}
className={isMatch ? "text-text-vibrant font-semibold" : ""}
className={isMatch ? "font-semibold text-text-vibrant" : ""}
>
{part}
</span>
@@ -79,9 +79,9 @@ const MentionSuggestionItem = React.memo(
return (
<div
className={cn(
"cursor-menu relative flex select-none items-center rounded-[5px] px-2.5 py-1 outline-none",
"relative flex cursor-menu select-none items-center rounded-[5px] px-2.5 py-1 outline-none",
"focus-within:outline-transparent",
"data-[highlighted]:bg-theme-selection-hover focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[highlighted]:text-theme-selection-foreground",
"focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[highlighted]:bg-theme-selection-hover data-[highlighted]:text-theme-selection-foreground",
"h-[28px]",
isSelected && "bg-theme-selection-active text-theme-selection-foreground",
)}
@@ -138,7 +138,7 @@ const MentionGroupHeader = React.memo(({ type }: { type: MentionData["type"] })
}, [type, t])
return (
<div className="text-text-tertiary mb-1 mt-2 px-2.5 text-xs font-medium first:mt-0">
<div className="mb-1 mt-2 px-2.5 text-xs font-medium text-text-tertiary first:mt-0">
{label}
</div>
)
@@ -19,7 +19,7 @@ export const MentionLikePill = ({
ref={ref}
className={cn(
"relative inline-flex -translate-y-px select-none items-center rounded-md border-[0.5px] px-2 py-0.5 text-xs font-medium",
"bg-fill-secondary hover:bg-fill transition-colors",
"bg-fill-secondary transition-colors hover:bg-fill",
className,
)}
{...rest}
@@ -203,7 +203,7 @@ export function TypeaheadDropdown<TItem, TGroupKey = string>({
const content = useMemo(() => {
if (isLoading) {
return (
<div className="text-text-secondary flex items-center gap-2 px-2.5 py-1.5">
<div className="flex items-center gap-2 px-2.5 py-1.5 text-text-secondary">
<i className="i-mgc-loading-3-cute-re size-4 animate-spin" />
<span className="text-sm">{loadingMessage}</span>
</div>
@@ -213,9 +213,9 @@ export function TypeaheadDropdown<TItem, TGroupKey = string>({
const totalItems = isGrouped ? flatItems.length : items.length
if (totalItems === 0) {
return (
<div className="text-text-tertiary px-2.5 py-1.5 text-center">
<div className="px-2.5 py-1.5 text-center text-text-tertiary">
<span className="text-sm">{emptyMessage}</span>
{query && <div className="text-text-quaternary mt-1 text-xs">{emptyHint}</div>}
{query && <div className="mt-1 text-xs text-text-quaternary">{emptyHint}</div>}
</div>
)
}
@@ -295,7 +295,7 @@ export function TypeaheadDropdown<TItem, TGroupKey = string>({
<div
ref={dropdownRef}
className={cn(
"bg-material-medium backdrop-blur-background text-text shadow-context-menu",
"shadow-context-menu bg-material-medium text-text backdrop-blur-background",
"min-w-32 overflow-hidden rounded-[6px] border p-1",
"text-body",
)}
@@ -305,7 +305,7 @@ export function TypeaheadDropdown<TItem, TGroupKey = string>({
}}
>
{showSearchInput && onQueryChange && (
<div className="border-border/20 mb-1 border-b px-2 pb-1.5 pt-1">
<div className="mb-1 border-b border-border/20 px-2 pb-1.5 pt-1">
<input
type="text"
value={query}
@@ -321,7 +321,7 @@ export function TypeaheadDropdown<TItem, TGroupKey = string>({
}}
placeholder="Search for context..."
autoFocus
className="text-text placeholder:text-text-quaternary w-full bg-transparent text-sm outline-none"
className="w-full bg-transparent text-sm text-text outline-none placeholder:text-text-quaternary"
/>
</div>
)}
@@ -32,7 +32,7 @@ export const ShortcutComponent: React.FC<ShortcutComponentProps> = ({
<MentionLikePill
className={className}
icon={
<span className="text-blue bg-blue/10 inline-flex size-4 items-center justify-center rounded-full text-[11px] font-semibold leading-none">
<span className="inline-flex size-4 items-center justify-center rounded-full bg-blue/10 text-[11px] font-semibold leading-none text-blue">
#
</span>
}
@@ -45,10 +45,10 @@ export const ShortcutComponent: React.FC<ShortcutComponentProps> = ({
<TooltipPortal>
<TooltipContent side="top" className="max-w-[320px]">
<div className="flex flex-col gap-1 p-1">
<span className="text-text text-sm font-medium">{shortcutData.name}</span>
<span className="text-sm font-medium text-text">{shortcutData.name}</span>
{shortcutData.prompt ? (
<span className="text-text-tertiary line-clamp-3 text-xs leading-snug">
<span className="line-clamp-3 text-xs leading-snug text-text-tertiary">
{shortcutData.prompt}
</span>
) : null}
@@ -49,7 +49,7 @@ const ShortcutSuggestionItem = React.memo(
return (
<span
key={`${shortcut.id}-${index}`}
className={isMatch ? "text-text-vibrant font-semibold" : ""}
className={isMatch ? "font-semibold text-text-vibrant" : ""}
>
{part}
</span>
@@ -62,7 +62,7 @@ const ShortcutSuggestionItem = React.memo(
return (
<div
className={cn(
"cursor-menu relative flex select-none items-center rounded-[5px] px-2.5 py-1 outline-none",
"relative flex cursor-menu select-none items-center rounded-[5px] px-2.5 py-1 outline-none",
"focus-within:outline-transparent",
"focus:bg-theme-selection-active focus:text-theme-selection-foreground data-[highlighted]:bg-theme-selection-hover data-[highlighted]:text-theme-selection-foreground",
"h-[28px]",
@@ -73,8 +73,8 @@ const ShortcutSuggestionItem = React.memo(
aria-selected={isSelected}
{...props}
>
<span className="text-blue mr-1.5 inline-flex size-4 items-center justify-center">
<span className="bg-blue/10 inline-flex size-4 items-center justify-center rounded-full text-xs font-semibold leading-none">
<span className="mr-1.5 inline-flex size-4 items-center justify-center text-blue">
<span className="inline-flex size-4 items-center justify-center rounded-full bg-blue/10 text-xs font-semibold leading-none">
#
</span>
</span>
@@ -74,7 +74,7 @@ export const ItemActions = ({ actions, enabled, onToggle }: ItemActionsProps) =>
</div>
{/* Switch area */}
<div className="border-fill-tertiary flex items-center gap-2 border-l pl-3">
<div className="flex items-center gap-2 border-l border-fill-tertiary pl-3">
<Switch checked={enabled} onCheckedChange={onToggle} />
</div>
</div>
@@ -192,12 +192,12 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
{/* Task Basic Information Section */}
<div className="space-y-4">
<div className="flex items-center gap-2">
<i className="i-mgc-file-upload-cute-re text-text-secondary size-4" />
<h3 className="text-text text-sm font-medium">{t("tasks.section.info")}</h3>
<i className="i-mgc-file-upload-cute-re size-4 text-text-secondary" />
<h3 className="text-sm font-medium text-text">{t("tasks.section.info")}</h3>
</div>
<div className="space-y-2">
<Label className="text-text pl-2 text-sm font-medium">{t("tasks.name")}</Label>
<Label className="pl-2 text-sm font-medium text-text">{t("tasks.name")}</Label>
<FormField
control={form.control}
name="name"
@@ -216,8 +216,8 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
{/* Schedule Configuration Section */}
<div className="space-y-4">
<div className="flex items-center gap-2">
<i className="i-mgc-calendar-time-add-cute-re text-text-secondary size-4" />
<h3 className="text-text text-sm font-medium">{t("tasks.section.schedule")}</h3>
<i className="i-mgc-calendar-time-add-cute-re size-4 text-text-secondary" />
<h3 className="text-sm font-medium text-text">{t("tasks.section.schedule")}</h3>
</div>
<ScheduleConfig
@@ -230,12 +230,12 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
{/* AI Prompt Section */}
<div className="space-y-4">
<div className="flex items-center gap-2">
<i className="i-mgc-magic-2-cute-re text-text-secondary size-4" />
<h3 className="text-text text-sm font-medium">{t("tasks.section.instructions")}</h3>
<i className="i-mgc-magic-2-cute-re size-4 text-text-secondary" />
<h3 className="text-sm font-medium text-text">{t("tasks.section.instructions")}</h3>
</div>
<div className="space-y-2">
<Label className="text-text pl-2 text-sm font-medium">{t("tasks.prompt")}</Label>
<Label className="pl-2 text-sm font-medium text-text">{t("tasks.prompt")}</Label>
<LexicalRichEditorTextArea
initialValue={initialPromptRef.current}
ref={promptEditorRef}
@@ -248,15 +248,15 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
className="min-h-[120px] resize-none text-sm leading-relaxed"
/>
<div className="flex items-center justify-between">
<div className="text-text-tertiary text-xs">{t("tasks.prompt_helper")}</div>
<div className="text-xs text-text-tertiary">{t("tasks.prompt_helper")}</div>
{promptTextLength > MAX_PROMPT_LENGTH * 0.8 && (
<div className="text-text-secondary text-xs font-medium">
<div className="text-xs font-medium text-text-secondary">
{promptTextLength}/{MAX_PROMPT_LENGTH}
</div>
)}
</div>
{(form.formState.errors.prompt as GlobalError | undefined)?.message && (
<div className="text-red text-xs">
<div className="text-xs text-red">
{(form.formState.errors.prompt as GlobalError).message}
</div>
)}
@@ -266,8 +266,8 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
{/* Notification Channels Section */}
<div className="space-y-4">
<div className="flex items-center gap-2">
<i className="i-mgc-notification-cute-re text-text-secondary size-4" />
<h3 className="text-text text-sm font-medium">{t("tasks.section.notifications")}</h3>
<i className="i-mgc-notification-cute-re size-4 text-text-secondary" />
<h3 className="text-sm font-medium text-text">{t("tasks.section.notifications")}</h3>
</div>
<NotifyChannelsConfig
value={notifyChannelsValue}
@@ -282,7 +282,7 @@ export const AITaskModal = ({ task, prompt, showSettingsTip = false }: AITaskMod
<button
type="button"
onClick={() => settingModalPresent("ai")}
className="text-text-tertiary hover:text-text-secondary mr-auto flex items-center gap-1 text-xs underline-offset-2 hover:underline disabled:opacity-50"
className="mr-auto flex items-center gap-1 text-xs text-text-tertiary underline-offset-2 hover:text-text-secondary hover:underline disabled:opacity-50"
disabled={currentMutation.isPending}
>
<i className="i-mgc-settings-7-cute-re size-3" />
@@ -34,11 +34,11 @@ export const NotifyChannelsConfig = ({ value, onChange }: NotifyChannelsConfigPr
<div className="space-y-3">
<div className="flex items-center gap-3 rounded-md border p-3 text-sm">
<div className="flex flex-1 flex-col gap-1">
<div className="text-text flex items-center gap-1 font-medium">
<i className={cn("text-text-secondary size-4", EMAIL_CHANNEL.icon)} />
<div className="flex items-center gap-1 font-medium text-text">
<i className={cn("size-4 text-text-secondary", EMAIL_CHANNEL.icon)} />
{t(EMAIL_CHANNEL.labelKey)}
</div>
<div className="text-text-tertiary text-xs leading-relaxed">
<div className="text-xs leading-relaxed text-text-tertiary">
{t(EMAIL_CHANNEL.helperKey)}
</div>
</div>
@@ -173,7 +173,7 @@ const TimelinePreview = memo<{ schedule: ScheduleType }>(({ schedule }) => {
if (!nextExecution) {
return (
<div className="text-text-tertiary flex items-center gap-2 text-xs">
<div className="flex items-center gap-2 text-xs text-text-tertiary">
<div className="i-mgc-information-cute-re size-3" />
<span>{t("schedule.no_upcoming")}</span>
</div>
@@ -181,8 +181,8 @@ const TimelinePreview = memo<{ schedule: ScheduleType }>(({ schedule }) => {
}
return (
<div className="text-text-secondary flex items-center gap-2 text-xs">
<div className="i-mgc-time-cute-re text-accent size-3" />
<div className="flex items-center gap-2 text-xs text-text-secondary">
<div className="i-mgc-time-cute-re size-3 text-accent" />
<span>
{t("schedule.next_execution", {
time: nextExecution.format("MMM D, h:mm A"),
@@ -211,7 +211,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
<div className="space-y-4">
{/* Quick Presets */}
<div className="space-y-2">
<Label className="text-text pl-2 text-sm font-medium">
<Label className="pl-2 text-sm font-medium text-text">
{t("schedule.presets_title")}
</Label>
<div className="flex gap-2">
@@ -220,7 +220,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
key={preset.label}
type="button"
onClick={() => onChange(preset.value)}
className="bg-material-opaque hover:bg-fill-tertiary border-border/50 hover:border-border text-text-secondary hover:text-text flex-1 rounded-md border px-2 py-1.5 text-xs transition-all duration-200"
className="flex-1 rounded-md border border-border/50 bg-material-opaque px-2 py-1.5 text-xs text-text-secondary transition-all duration-200 hover:border-border hover:bg-fill-tertiary hover:text-text"
>
{t(preset.label)}
</button>
@@ -231,7 +231,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
{/* Frequency Selection */}
<div className="space-y-3">
<div className="flex items-center justify-between">
<Label className="text-text pl-2 text-sm font-medium">{t("schedule.title")}</Label>
<Label className="pl-2 text-sm font-medium text-text">{t("schedule.title")}</Label>
<TimelinePreview schedule={value} />
</div>
<div className="grid grid-cols-4 gap-2">
@@ -266,8 +266,8 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
className={cn(
"flex flex-col items-center gap-1.5 rounded-lg border p-3 text-xs font-medium transition-all duration-200",
scheduleType === option.value
? "bg-accent/20 border-accent/30 text-accent"
: "bg-background border-border hover:bg-material-opaque hover:border-border text-text-secondary hover:text-text",
? "border-accent/30 bg-accent/20 text-accent"
: "border-border bg-background text-text-secondary hover:border-border hover:bg-material-opaque hover:text-text",
)}
>
<div
@@ -281,13 +281,13 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
</button>
))}
</div>
{errors.type && <p className="text-red mt-2 text-sm">{errors.type.message}</p>}
{errors.type && <p className="mt-2 text-sm text-red">{errors.type.message}</p>}
</div>
{/* Time Configuration */}
{scheduleType === "once" && (
<div className="space-y-2">
<Label className="text-text pl-2 text-sm font-medium">
<Label className="pl-2 text-sm font-medium text-text">
{t("schedule.date_time_label")}
</Label>
<DateTimePicker
@@ -301,13 +301,13 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
}}
placeholder={t("schedule.date_time_placeholder")}
/>
{errors.date && <p className="text-red mt-2 text-sm">{errors.date.message}</p>}
{errors.date && <p className="mt-2 text-sm text-red">{errors.date.message}</p>}
</div>
)}
{scheduleType === "daily" && (
<div className="space-y-2 pl-2">
<Label className="text-text text-sm font-medium">{t("schedule.time_label")}</Label>
<Label className="text-sm font-medium text-text">{t("schedule.time_label")}</Label>
<TimeSelect
value={dayjs(value.timeOfDay).format("HH:mm")}
onChange={(time) => {
@@ -326,19 +326,19 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
}}
/>
{errors.timeOfDay && (
<p className="text-red mt-2 text-sm">{errors.timeOfDay.message}</p>
<p className="mt-2 text-sm text-red">{errors.timeOfDay.message}</p>
)}
</div>
)}
{scheduleType === "weekly" && (
<div className="space-y-2 pl-2">
<Label className="text-text text-sm font-medium">
<Label className="text-sm font-medium text-text">
{t("schedule.configuration_label")}
</Label>
<div className="grid grid-cols-2 gap-3">
<div className="space-y-1">
<Label className="text-text-secondary text-xs">{t("schedule.day_label")}</Label>
<Label className="text-xs text-text-secondary">{t("schedule.day_label")}</Label>
<Select
onValueChange={(dayOfWeek) =>
updateSchedule({
@@ -349,7 +349,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
}
value={value.dayOfWeek.toString()}
>
<SelectTrigger className="bg-material-opaque hover:bg-mix-accent/background-1/4 h-6 justify-between rounded-[4px] border-0 px-1.5 py-0 text-xs">
<SelectTrigger className="h-6 justify-between rounded-[4px] border-0 bg-material-opaque px-1.5 py-0 text-xs hover:bg-mix-accent/background-1/4">
<SelectValue placeholder={t("schedule.day_placeholder")} />
</SelectTrigger>
<SelectContent position="item-aligned">
@@ -360,10 +360,10 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
))}
</SelectContent>
</Select>
{errors.dayOfWeek && <p className="text-red text-sm">{errors.dayOfWeek.message}</p>}
{errors.dayOfWeek && <p className="text-sm text-red">{errors.dayOfWeek.message}</p>}
</div>
<div className="space-y-1">
<Label className="text-text-secondary text-xs">{t("schedule.time_label")}</Label>
<Label className="text-xs text-text-secondary">{t("schedule.time_label")}</Label>
<TimeSelect
value={dayjs(value.timeOfDay).format("HH:mm")}
onChange={(time) => {
@@ -382,7 +382,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
})
}}
/>
{errors.timeOfDay && <p className="text-red text-sm">{errors.timeOfDay.message}</p>}
{errors.timeOfDay && <p className="text-sm text-red">{errors.timeOfDay.message}</p>}
</div>
</div>
</div>
@@ -390,12 +390,12 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
{scheduleType === "monthly" && (
<div className="space-y-2 pl-2">
<Label className="text-text text-sm font-medium">
<Label className="text-sm font-medium text-text">
{t("schedule.configuration_label")}
</Label>
<div className="grid grid-cols-2 gap-3">
<div className="space-y-1">
<Label className="text-text-secondary text-xs">{t("schedule.day_label")}</Label>
<Label className="text-xs text-text-secondary">{t("schedule.day_label")}</Label>
<Select
onValueChange={(dayOfMonth) =>
updateSchedule({
@@ -406,7 +406,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
}
value={value.dayOfMonth.toString()}
>
<SelectTrigger className="bg-material-opaque hover:bg-mix-accent/background-1/4 h-6 justify-between rounded-[4px] border-0 px-1.5 py-0 text-xs">
<SelectTrigger className="h-6 justify-between rounded-[4px] border-0 bg-material-opaque px-1.5 py-0 text-xs hover:bg-mix-accent/background-1/4">
<SelectValue placeholder={t("schedule.day_placeholder")} />
</SelectTrigger>
<SelectContent position="item-aligned">
@@ -418,11 +418,11 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
</SelectContent>
</Select>
{errors.dayOfMonth && (
<p className="text-red text-sm">{errors.dayOfMonth.message}</p>
<p className="text-sm text-red">{errors.dayOfMonth.message}</p>
)}
</div>
<div className="space-y-1">
<Label className="text-text-secondary text-xs">{t("schedule.time_label")}</Label>
<Label className="text-xs text-text-secondary">{t("schedule.time_label")}</Label>
<TimeSelect
value={dayjs(value.timeOfDay).format("HH:mm")}
onChange={(time) => {
@@ -441,7 +441,7 @@ export const ScheduleConfig = memo<ScheduleConfigProps>(
})
}}
/>
{errors.timeOfDay && <p className="text-red text-sm">{errors.timeOfDay.message}</p>}
{errors.timeOfDay && <p className="text-sm text-red">{errors.timeOfDay.message}</p>}
</div>
</div>
</div>
@@ -220,11 +220,11 @@ export const TaskItem = memo(({ task }: { task: AITask }) => {
]
return (
<div className="hover:bg-material-medium border-border group -ml-3 rounded-lg border p-3 transition-colors">
<div className="group -ml-3 rounded-lg border border-border p-3 transition-colors hover:bg-material-medium">
<div className="flex items-start justify-between">
<div className="flex-1 space-y-2">
<div className="flex items-center gap-2">
<h4 className="text-text text-sm font-medium">{task.name}</h4>
<h4 className="text-sm font-medium text-text">{task.name}</h4>
<span
className={cn(
"inline-flex items-center rounded-full px-2 py-1 text-xs",
@@ -240,12 +240,12 @@ export const TaskItem = memo(({ task }: { task: AITask }) => {
</span>
</div>
<div className="space-y-1">
<p className="text-text-secondary text-xs">
<p className="text-xs text-text-secondary">
<span className="text-text-tertiary">{t("tasks.fields.schedule")}</span>{" "}
{formatScheduleText(task.schedule, t, i18n)}
</p>
{task.createdAt && (
<p className="text-text-secondary text-xs">
<p className="text-xs text-text-secondary">
<span className="text-text-tertiary">{t("tasks.fields.created")}</span>{" "}
{dayjs(task.createdAt).format("MMM D, YYYY h:mm A")}
</p>
@@ -20,11 +20,11 @@ export const AITaskList = memo<TaskListProps>(({ className }) => {
if (tasks.length === 0) {
return (
<div className="py-8 text-center">
<div className="bg-fill-secondary mx-auto mb-3 flex size-12 items-center justify-center rounded-full">
<i className="i-mgc-calendar-time-add-cute-re text-text size-6" />
<div className="mx-auto mb-3 flex size-12 items-center justify-center rounded-full bg-fill-secondary">
<i className="i-mgc-calendar-time-add-cute-re size-6 text-text" />
</div>
<h4 className="text-text mb-1 text-sm font-medium">{t("tasks.empty.title")}</h4>
<p className="text-text-secondary text-xs">{t("tasks.empty.desc")}</p>
<h4 className="mb-1 text-sm font-medium text-text">{t("tasks.empty.title")}</h4>
<p className="text-xs text-text-secondary">{t("tasks.empty.desc")}</p>
</div>
)
}
@@ -156,7 +156,7 @@ export function MainDestopLayout() {
<main
ref={setMainContainerElement}
className="bg-theme-background flex min-w-0 flex-1 pt-[calc(var(--fo-window-padding-top)_-10px)] !outline-none"
className="flex min-w-0 flex-1 bg-theme-background pt-[calc(var(--fo-window-padding-top)_-10px)] !outline-none"
// NOTE: tabIndex for main element can get by `document.activeElement`
tabIndex={-1}
>
@@ -201,7 +201,7 @@ const AIEnhancedTimelineLayoutImpl = () => {
animate={{ translateY: 0, opacity: 1, scale: 1 }}
exit={{ translateY: "50px", opacity: 0, scale: 0.98 }}
transition={Spring.smooth(0.3)}
className="bg-theme-background pointer-events-auto relative flex h-0 flex-1 flex-col"
className="pointer-events-auto relative flex h-0 flex-1 flex-col bg-theme-background"
>
<EntryContent entryId={realEntryId} className="h-full" />
</m.div>
@@ -228,7 +228,7 @@ const AIEnhancedTimelineLayoutImpl = () => {
/>
</div>
<div
className="bg-theme-background absolute inset-y-0 right-0 flex min-w-0 flex-1 flex-col overflow-hidden"
className="absolute inset-y-0 right-0 flex min-w-0 flex-1 flex-col overflow-hidden bg-theme-background"
style={{ left: timelineColumnWidth }}
>
{realEntryId ? (
@@ -237,7 +237,7 @@ const AIEnhancedTimelineLayoutImpl = () => {
<AIEntryHeader entryId={realEntryId} />
</div>
<div className="pointer-events-none absolute inset-0 z-[9] flex flex-col overflow-hidden">
<div className="bg-theme-background pointer-events-auto relative flex h-0 flex-1 flex-col">
<div className="pointer-events-auto relative flex h-0 flex-1 flex-col bg-theme-background">
<EntryContent entryId={realEntryId} className="h-full" />
</div>
</div>
@@ -325,8 +325,8 @@ const SubscriptionEntryListPlaneNode = () => {
return (
<m.div
className={cn(
"bg-sidebar backdrop-blur-background absolute left-0 top-12 z-[2] rounded-r-lg",
isVisible ? "w-feed-col bottom-0 flex flex-col" : "w-[40px]",
"absolute left-0 top-12 z-[2] rounded-r-lg bg-sidebar backdrop-blur-background",
isVisible ? "bottom-0 flex w-feed-col flex-col" : "w-[40px]",
)}
id="subscription-entry-list-plane-node"
initial={false}
@@ -344,7 +344,7 @@ const SubscriptionEntryListPlaneNode = () => {
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.1 }}
className="w-feed-col flex flex-1 flex-col whitespace-pre"
className="flex w-feed-col flex-1 flex-col whitespace-pre"
>
<EntrySubscriptionList scrollToEntryId={entryId} />
</m.div>
@@ -14,7 +14,7 @@ export const AIChatFixedPanel: FC<AIChatFixedPanelProps> = ({ className, ...prop
<Focusable
scope={HotkeyScope.AIChat}
data-hide-in-print
className={cn("bg-background relative flex h-full flex-col overflow-hidden", className)}
className={cn("relative flex h-full flex-col overflow-hidden bg-background", className)}
{...props}
>
<ChatHeader />

Some files were not shown because too many files have changed in this diff Show More