- Rename directory keep-notes -> memento-note with all code references - Prisma: SQLite -> PostgreSQL (both app and MCP server schemas) - Sync MCP schema with main app (add missing fields, relations, indexes) - Delete 17 SQLite migrations (clean slate for PostgreSQL) - Remove SQLite dependencies (@libsql/client, better-sqlite3, etc.) - Fix MCP server: hardcoded Windows DB paths -> DATABASE_URL env var - Fix MCP server: .dockerignore excluded index-sse.js (SSE mode broken) - MCP Dockerfile: node:20 -> node:22 - Docker Compose: add postgres service, remove SQLite volume - Generate favicon.ico, icon-192.png, icon-512.png, apple-icon.png - Update layout.tsx icons and manifest.json for PNG icons - Update all .env files for PostgreSQL - Rewrite README.md with updated sections - Remove mcp-server/node_modules and prisma/client-generated from git tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
function TooltipProvider({
|
|
delayDuration = 0,
|
|
...props
|
|
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
return (
|
|
<TooltipPrimitive.Provider
|
|
data-slot="tooltip-provider"
|
|
delayDuration={delayDuration}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function Tooltip({
|
|
...props
|
|
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
return (
|
|
<TooltipProvider>
|
|
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
</TooltipProvider>
|
|
)
|
|
}
|
|
|
|
function TooltipTrigger({
|
|
...props
|
|
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
}
|
|
|
|
function TooltipContent({
|
|
className,
|
|
sideOffset = 0,
|
|
children,
|
|
...props
|
|
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
return (
|
|
<TooltipPrimitive.Portal>
|
|
<TooltipPrimitive.Content
|
|
data-slot="tooltip-content"
|
|
sideOffset={sideOffset}
|
|
className={cn(
|
|
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
</TooltipPrimitive.Content>
|
|
</TooltipPrimitive.Portal>
|
|
)
|
|
}
|
|
|
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|