> &
ComponentProps<'div'> & {
hideLabel?: boolean
hideIndicator?: boolean
@@ -175,14 +175,14 @@ function ChartTooltipContent({
return (
svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
indicator === 'dot' && 'items-center'
)}
>
{formatter && item?.value !== undefined && item.name ? (
- formatter(item.value, item.name, item, index, item.payload)
+ formatter(item.value as number, String(item.name), item, index, item.payload)
) : (
<>
{itemConfig?.icon ? (
@@ -246,7 +246,7 @@ function ChartLegendContent({
verticalAlign = 'bottom',
nameKey,
}: ComponentProps<'div'> &
- Pick & {
+ Pick & {
hideIcon?: boolean
nameKey?: string
}) {
diff --git a/src/components/ui/resizable.tsx b/src/components/ui/resizable.tsx
index dd29389..21e2d7c 100644
--- a/src/components/ui/resizable.tsx
+++ b/src/components/ui/resizable.tsx
@@ -7,9 +7,9 @@ import { cn } from '@/lib/utils'
function ResizablePanelGroup({
className,
...props
-}: ComponentProps) {
+}: ComponentProps) {
return (
- & {
+}: ComponentProps & {
withHandle?: boolean
}) {
return (
- div]:rotate-90',
@@ -42,7 +42,7 @@ function ResizableHandle({
)}
-
+
)
}
diff --git a/src/lib/tauri.ts b/src/lib/tauri.ts
deleted file mode 100644
index e5b1805..0000000
--- a/src/lib/tauri.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Tauri環境ユーティリティ
- * Tauriデスクトップアプリとして実行されているかどうかを検出し、
- * プラットフォーム固有の機能へのアクセスを提供します
- */
-
-/**
- * アプリがTauri環境で実行されているかどうかを判定
- */
-export function isTauri(): boolean {
- return typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window
-}
-
-/**
- * 現在のプラットフォームを取得
- * @returns 'web' | 'macos' | 'windows' | 'linux'
- */
-export async function getPlatform(): Promise {
- if (!isTauri()) {
- return 'web'
- }
-
- try {
- const { platform } = await import('@tauri-apps/plugin-os')
- return platform()
- } catch {
- return 'web'
- }
-}
-
-/**
- * Tauriコマンドを安全に呼び出すラッパー
- * Web環境では何もしない
- */
-export async function invokeTauriCommand(
- command: string,
- args?: Record
-): Promise {
- if (!isTauri()) {
- console.warn(`Tauri command "${command}" called in non-Tauri environment`)
- return null
- }
-
- try {
- const { invoke } = await import('@tauri-apps/api/core')
- return await invoke(command, args)
- } catch (error) {
- console.error(`Failed to invoke Tauri command "${command}":`, error)
- return null
- }
-}
-
-/**
- * システムのデフォルトブラウザでURLを開く
- * Web環境では通常のwindow.openを使用
- */
-export async function openExternal(url: string): Promise {
- if (!isTauri()) {
- window.open(url, '_blank')
- return
- }
-
- try {
- const { open } = await import('@tauri-apps/plugin-shell')
- await open(url)
- } catch (error) {
- console.error('Failed to open external URL:', error)
- // フォールバックとして通常のリンクを開く
- window.open(url, '_blank')
- }
-}