@aiquants/directory-tree 3.1.4 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DirectoryTree.d.ts +24 -0
- package/dist/DirectoryTree.d.ts.map +1 -0
- package/dist/DirectoryTreeGrid.d.ts +67 -0
- package/dist/DirectoryTreeGrid.d.ts.map +1 -0
- package/dist/TreeLine.d.ts +9 -0
- package/dist/TreeLine.d.ts.map +1 -0
- package/dist/cli.server.d.ts +2 -0
- package/dist/cli.server.d.ts.map +1 -0
- package/dist/entryRendering.d.ts +55 -0
- package/dist/entryRendering.d.ts.map +1 -0
- package/dist/gridUtils.d.ts +47 -0
- package/dist/gridUtils.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +965 -900
- package/dist/logger.d.ts +98 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/scrollAnchor.d.ts +39 -0
- package/dist/scrollAnchor.d.ts.map +1 -0
- package/dist/src/DirectoryTree.d.ts.map +1 -1
- package/dist/src/types.d.ts +0 -9
- package/dist/src/types.d.ts.map +1 -1
- package/dist/styles/directory-tree.standalone.css +1 -1
- package/dist/types.d.ts +620 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/useDirectoryTreeState.d.ts +15 -0
- package/dist/useDirectoryTreeState.d.ts.map +1 -0
- package/dist/useEntryInteraction.d.ts +20 -0
- package/dist/useEntryInteraction.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/DirectoryTree.tsx +18 -6
- package/src/DirectoryTreeGrid.tsx +7 -4
- package/src/entryRendering.tsx +138 -18
- package/src/types.ts +24 -4
- package/dist/directory-tree.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEntryInteraction.d.ts","sourceRoot":"","sources":["../src/useEntryInteraction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAKzE,MAAM,MAAM,uBAAuB,GAAG;IAClC,KAAK,EAAE,cAAc,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;IAC7C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAA;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAA;IACtD,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0BAA0B,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,iJAAiJ,uBAAuB,SAWhM,UAAU,CAAC,cAAc,CAAC,SA+BrC,CAAA"}
|
package/package.json
CHANGED
package/src/DirectoryTree.tsx
CHANGED
|
@@ -332,6 +332,9 @@ const DirectoryEntryItem = memo<DirectoryEntryItemProps>(
|
|
|
332
332
|
showFileIcons = true,
|
|
333
333
|
useCanvasExpandIcons = false,
|
|
334
334
|
expandIconSize,
|
|
335
|
+
typeIconSize,
|
|
336
|
+
fontSize,
|
|
337
|
+
indentSize = INDENT_SIZE,
|
|
335
338
|
highlightStyles,
|
|
336
339
|
entryClassName,
|
|
337
340
|
entryStyle,
|
|
@@ -350,7 +353,7 @@ const DirectoryEntryItem = memo<DirectoryEntryItemProps>(
|
|
|
350
353
|
const isExpanded = isDirectory && isDirOpen(entry.absolutePath)
|
|
351
354
|
const isSelected = entry.absolutePath === selectedPath
|
|
352
355
|
const isItemSelected = !isDirectory && selectedItems?.has(entry.absolutePath)
|
|
353
|
-
const extension = isDirectory ? undefined : getFileExtension(entry.name)
|
|
356
|
+
const extension = isDirectory ? undefined : getFileExtension(entry.name) || getFileExtension(entry.relativePath) || getFileExtension(entry.absolutePath)
|
|
354
357
|
|
|
355
358
|
/**
|
|
356
359
|
* @effect Lazy Children Loading
|
|
@@ -387,7 +390,7 @@ const DirectoryEntryItem = memo<DirectoryEntryItemProps>(
|
|
|
387
390
|
const nameClasses = twMerge(directoryTreeClasses.name, nameClassName, isDirectory && directoryTreeClasses.nameDirectory, isDirectory && directoryNameClassName, !isDirectory && fileNameClassName, (isSelected || isItemSelected) && directoryTreeClasses.nameSelected)
|
|
388
391
|
|
|
389
392
|
const expandIconContent = resolveExpandIcon({ isDirectory, isExpanded, showExpandIcons, useCanvasExpandIcons, expandIconSize })
|
|
390
|
-
const resolvedIcon = (isDirectory ? showDirectoryIcons : showFileIcons) ? resolveEntryIcon({ entry, isDirectory, isExpanded, isSelected, isItemSelected: Boolean(isItemSelected), extension }, iconOverrides) : null
|
|
393
|
+
const resolvedIcon = (isDirectory ? showDirectoryIcons : showFileIcons) ? resolveEntryIcon({ entry, isDirectory, isExpanded, isSelected, isItemSelected: Boolean(isItemSelected), extension, mimeType: entry.mimeType }, iconOverrides) : null
|
|
391
394
|
|
|
392
395
|
const customHighlightStyle = {
|
|
393
396
|
...(isHovered ? highlightStyles?.hoverStyle : {}),
|
|
@@ -395,15 +398,19 @@ const DirectoryEntryItem = memo<DirectoryEntryItemProps>(
|
|
|
395
398
|
...(!isDirectory && (isSelected || isItemSelected) ? highlightStyles?.itemSelectedStyle : {}),
|
|
396
399
|
}
|
|
397
400
|
|
|
401
|
+
const typeIconStyle = typeIconSize ? { width: typeIconSize, height: typeIconSize } : undefined
|
|
402
|
+
const fontSizeStyle = fontSize ? { fontSize: typeof fontSize === "number" ? `${fontSize}px` : fontSize } : undefined
|
|
403
|
+
|
|
398
404
|
return (
|
|
399
405
|
<Fragment key={entry.absolutePath}>
|
|
400
406
|
<div
|
|
401
407
|
className={entryClasses}
|
|
402
408
|
style={{
|
|
403
|
-
paddingLeft: `${Math.max(0, indentLevel *
|
|
404
|
-
transform: indentLevel < 0 ? `translateX(${indentLevel *
|
|
405
|
-
width: indentLevel < 0 ? `calc(100% + ${Math.abs(indentLevel *
|
|
409
|
+
paddingLeft: `${Math.max(0, indentLevel * indentSize)}px`,
|
|
410
|
+
transform: indentLevel < 0 ? `translateX(${indentLevel * indentSize}px)` : undefined,
|
|
411
|
+
width: indentLevel < 0 ? `calc(100% + ${Math.abs(indentLevel * indentSize)}px)` : undefined,
|
|
406
412
|
height: `${rowHeight}px`,
|
|
413
|
+
...fontSizeStyle,
|
|
407
414
|
...customHighlightStyle,
|
|
408
415
|
...entryStyle,
|
|
409
416
|
...entry.style,
|
|
@@ -421,10 +428,15 @@ const DirectoryEntryItem = memo<DirectoryEntryItemProps>(
|
|
|
421
428
|
aria-expanded={isDirectory ? isExpanded : undefined}
|
|
422
429
|
aria-label={`${entry.name} (${isDirectory ? "directory" : "file"})`}>
|
|
423
430
|
{(showExpandIcons || useCanvasExpandIcons) && <span className={expandIconClasses}>{expandIconContent}</span>}
|
|
424
|
-
{(isDirectory ? showDirectoryIcons : showFileIcons) &&
|
|
431
|
+
{(isDirectory ? showDirectoryIcons : showFileIcons) && (
|
|
432
|
+
<span className={typeIconClasses} style={typeIconStyle}>
|
|
433
|
+
{resolvedIcon}
|
|
434
|
+
</span>
|
|
435
|
+
)}
|
|
425
436
|
<span
|
|
426
437
|
className={nameClasses}
|
|
427
438
|
style={{
|
|
439
|
+
...fontSizeStyle,
|
|
428
440
|
...nameStyle,
|
|
429
441
|
...(isDirectory ? directoryNameStyle : fileNameStyle),
|
|
430
442
|
}}
|
|
@@ -23,6 +23,9 @@ export type GridRowVisual = {
|
|
|
23
23
|
showFileIcons?: boolean
|
|
24
24
|
useCanvasExpandIcons?: boolean
|
|
25
25
|
expandIconSize?: number
|
|
26
|
+
typeIconSize?: number
|
|
27
|
+
fontSize?: number | string
|
|
28
|
+
indentSize?: number
|
|
26
29
|
highlightStyles?: HighlightStyles
|
|
27
30
|
}
|
|
28
31
|
|
|
@@ -81,7 +84,7 @@ export const DirectoryTreeGridRow = memo<DirectoryTreeGridRowProps>(
|
|
|
81
84
|
rowClassName,
|
|
82
85
|
selection: { onEntryClick, selectedPath, mode: selectionMode = "none", selectedItems, onSelectionChange },
|
|
83
86
|
expansion: { toggleDirectory, onToggleDirectoryRecursive },
|
|
84
|
-
visual: { iconOverrides, showExpandIcons = true, showDirectoryIcons = true, showFileIcons = true, useCanvasExpandIcons = false, expandIconSize, highlightStyles },
|
|
87
|
+
visual: { iconOverrides, showExpandIcons = true, showDirectoryIcons = true, showFileIcons = true, useCanvasExpandIcons = false, expandIconSize, indentSize = INDENT_SIZE, highlightStyles },
|
|
85
88
|
}) => {
|
|
86
89
|
const [isHovered, setIsHovered] = useState(false)
|
|
87
90
|
|
|
@@ -89,7 +92,7 @@ export const DirectoryTreeGridRow = memo<DirectoryTreeGridRowProps>(
|
|
|
89
92
|
const isExpanded = isDirectory && isDirOpen(entry.absolutePath)
|
|
90
93
|
const isSelected = entry.absolutePath === selectedPath
|
|
91
94
|
const isItemSelected = !isDirectory && Boolean(selectedItems?.has(entry.absolutePath))
|
|
92
|
-
const extension = isDirectory ? undefined : getFileExtension(entry.name)
|
|
95
|
+
const extension = isDirectory ? undefined : getFileExtension(entry.name) || getFileExtension(entry.relativePath) || getFileExtension(entry.absolutePath)
|
|
93
96
|
|
|
94
97
|
const handleInteraction = useEntryInteraction({ entry, isDirectory, isExpanded, isItemSelected, selectionMode, onSelectionChange, onEntryClick, toggleDirectory, onToggleDirectoryRecursive })
|
|
95
98
|
|
|
@@ -112,7 +115,7 @@ export const DirectoryTreeGridRow = memo<DirectoryTreeGridRowProps>(
|
|
|
112
115
|
const nameLabelClasses = twMerge("dt-grid-name-label ml-1", "text-gray-700 dark:text-gray-200", isDirectory && directoryTreeClasses.nameDirectory, (isSelected || isItemSelected) && directoryTreeClasses.nameSelected)
|
|
113
116
|
|
|
114
117
|
const expandIconContent = resolveExpandIcon({ isDirectory, isExpanded, showExpandIcons, useCanvasExpandIcons, expandIconSize })
|
|
115
|
-
const resolvedIcon = (isDirectory ? showDirectoryIcons : showFileIcons) ? resolveEntryIcon({ entry, isDirectory, isExpanded, isSelected, isItemSelected, extension }, iconOverrides) : null
|
|
118
|
+
const resolvedIcon = (isDirectory ? showDirectoryIcons : showFileIcons) ? resolveEntryIcon({ entry, isDirectory, isExpanded, isSelected, isItemSelected, extension, mimeType: entry.mimeType }, iconOverrides) : null
|
|
116
119
|
|
|
117
120
|
const ctx = { indentLevel, isDirectory, isExpanded }
|
|
118
121
|
const [nameColumn, ...numericColumns] = columns
|
|
@@ -141,7 +144,7 @@ export const DirectoryTreeGridRow = memo<DirectoryTreeGridRowProps>(
|
|
|
141
144
|
onKeyDown={(e) => e.key === "Enter" && handleInteraction(e as unknown as MouseEvent<HTMLDivElement>)}
|
|
142
145
|
tabIndex={0}>
|
|
143
146
|
{/* Frozen name/tree cell — indent applied here only. / 凍結名前セル(インデントはここだけ)。 */}
|
|
144
|
-
<div className={twMerge("dt-grid-name-cell", nameColumn?.className)} role="gridcell" style={{ width: nameWidth, paddingLeft: Math.max(0, indentLevel *
|
|
147
|
+
<div className={twMerge("dt-grid-name-cell", nameColumn?.className)} role="gridcell" style={{ width: nameWidth, paddingLeft: Math.max(0, indentLevel * indentSize) }}>
|
|
145
148
|
{(showExpandIcons || useCanvasExpandIcons) && <span className={expandIconClasses}>{expandIconContent}</span>}
|
|
146
149
|
{(isDirectory ? showDirectoryIcons : showFileIcons) && <span className={typeIconClasses}>{resolvedIcon}</span>}
|
|
147
150
|
<span className={nameLabelClasses}>{nameContent}</span>
|
package/src/entryRendering.tsx
CHANGED
|
@@ -6,28 +6,28 @@
|
|
|
6
6
|
* circular import.
|
|
7
7
|
* 従来行と TreeGrid 行が共有する定数・クラス・アイコン解決ヘルパ。循環 import 回避のため分離。
|
|
8
8
|
*/
|
|
9
|
-
import { ChevronDownIcon, ChevronRightIcon,
|
|
10
|
-
import { FileIcon } from "@phosphor-icons/react"
|
|
9
|
+
import { ChevronDownIcon, ChevronRightIcon, FolderIcon } from "@heroicons/react/24/solid"
|
|
10
|
+
import { FileAudio, FileCode, FileCsv, FileDoc, FileIcon, FileImage, FileMd, FilePdf, FilePpt, FileText, FileVideo, FileXls, FileZip } from "@phosphor-icons/react"
|
|
11
11
|
import type { ReactNode } from "react"
|
|
12
12
|
import { twMerge } from "tailwind-merge"
|
|
13
13
|
import type { DirectoryTreeIconOverrides, DirectoryTreeIconRenderContext, DirectoryTreeIconRenderer } from "./types.ts"
|
|
14
14
|
|
|
15
|
-
/** Default row height in px. / 各行の高さの既定値 (px)。 */
|
|
16
|
-
export const DEFAULT_ITEM_HEIGHT =
|
|
17
|
-
/** Indentation per depth level in px. / 1 階層あたりのインデント幅 (px)。 */
|
|
18
|
-
export const INDENT_SIZE =
|
|
19
|
-
/** Standard expand glyph size. /
|
|
20
|
-
export const EXPAND_GLYPH_SIZE =
|
|
15
|
+
/** Default row height in px. / 各行の高さの既定値 (px)。 FHD環境に最適化されたコンパクト設計 (18px) */
|
|
16
|
+
export const DEFAULT_ITEM_HEIGHT = 18
|
|
17
|
+
/** Indentation per depth level in px. / 1 階層あたりのインデント幅 (px)。 FHD環境に最適化されたコンパクト設計 (12px) */
|
|
18
|
+
export const INDENT_SIZE = 12
|
|
19
|
+
/** Standard expand glyph size. / 展開アイコンの標準サイズ (10px)。 */
|
|
20
|
+
export const EXPAND_GLYPH_SIZE = 10
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* TailwindCSS v4 class names for DirectoryTree component.
|
|
24
24
|
* DirectoryTreeコンポーネント用の TailwindCSS v4 クラス名。
|
|
25
25
|
*/
|
|
26
26
|
export const directoryTreeClasses = {
|
|
27
|
-
container: "directory-tree-container relative h-full transition-opacity duration-300 overflow-y-hidden pb-[
|
|
27
|
+
container: "directory-tree-container relative h-full transition-opacity duration-300 overflow-y-hidden pb-[3px] pr-[2px]",
|
|
28
28
|
containerPending: "opacity-70",
|
|
29
29
|
|
|
30
|
-
entry: "directory-tree-entry flex items-center cursor-pointer relative select-none",
|
|
30
|
+
entry: "directory-tree-entry flex items-center cursor-pointer relative select-none text-xs leading-tight py-0.5",
|
|
31
31
|
|
|
32
32
|
// ホバー時のスタイル(ライト/ダークモード対応)
|
|
33
33
|
entryHover: twMerge("directory-tree-entry--hover hover:bg-gray-400/15", "dark:hover:bg-gray-200/10"),
|
|
@@ -39,20 +39,20 @@ export const directoryTreeClasses = {
|
|
|
39
39
|
entryItemSelected: twMerge("directory-tree-entry--item-selected bg-blue-400/20 shadow-[0_0_0_1px_rgba(59,130,246,0.3)]", "dark:bg-blue-400/25 dark:shadow-[0_0_0_1px_rgba(96,165,250,0.4)]"),
|
|
40
40
|
|
|
41
41
|
// アイコンのスタイル
|
|
42
|
-
expandIcon: twMerge("directory-tree-expand-icon w-5 h-5 flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
|
|
42
|
+
expandIcon: twMerge("directory-tree-expand-icon w-3.5 h-3.5 flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
|
|
43
43
|
|
|
44
44
|
expandIconSelected: twMerge("directory-tree-expand-icon--selected text-blue-700", "dark:text-blue-400"),
|
|
45
45
|
|
|
46
|
-
typeIcon: twMerge("directory-tree-type-icon w-5 h-5 flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
|
|
46
|
+
typeIcon: twMerge("directory-tree-type-icon w-3.5 h-3.5 flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
|
|
47
47
|
|
|
48
48
|
typeIconSelected: twMerge("directory-tree-type-icon--selected text-blue-700", "dark:text-blue-400"),
|
|
49
49
|
|
|
50
50
|
// テキストのスタイル
|
|
51
|
-
name: twMerge("directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1", "text-gray-700", "dark:text-gray-200"),
|
|
51
|
+
name: twMerge("directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 text-xs font-normal", "text-gray-700", "dark:text-gray-200"),
|
|
52
52
|
|
|
53
|
-
nameDirectory: "directory-tree-name--directory",
|
|
53
|
+
nameDirectory: "directory-tree-name--directory font-medium",
|
|
54
54
|
|
|
55
|
-
nameSelected: twMerge("directory-tree-name--selected text-blue-800 font-
|
|
55
|
+
nameSelected: twMerge("directory-tree-name--selected text-blue-800 font-semibold", "dark:text-blue-300"),
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
@@ -60,7 +60,11 @@ export const directoryTreeClasses = {
|
|
|
60
60
|
* @description Extracts the extension from a filename. / ファイル名から拡張子を抽出する。
|
|
61
61
|
*/
|
|
62
62
|
export const getFileExtension = (filename: string): string => {
|
|
63
|
-
|
|
63
|
+
if (!filename) return ""
|
|
64
|
+
const cleanName = filename.split("?")[0].split("#")[0].split("/").pop() || filename
|
|
65
|
+
const lastDot = cleanName.lastIndexOf(".")
|
|
66
|
+
if (lastDot <= 0) return ""
|
|
67
|
+
return cleanName.slice(lastDot + 1).toLowerCase()
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
export type ExpandIconParams = {
|
|
@@ -113,18 +117,134 @@ const sanitizeIcon = (node: unknown, path: string): ReactNode | null => {
|
|
|
113
117
|
return node as ReactNode
|
|
114
118
|
}
|
|
115
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Resolves a file icon based on mimeType (primary) > extension (fallback).
|
|
122
|
+
* mimeType (最優先) > 拡張子 (フォールバック) の順序でファイルアイコンを解決する。
|
|
123
|
+
*/
|
|
124
|
+
export const getFileIconByMimeOrExtension = (mimeType?: string, extension?: string, filename?: string): ReactNode => {
|
|
125
|
+
const cleanExt = (extension || (filename ? getFileExtension(filename) : "")).toLowerCase()
|
|
126
|
+
const cleanMime = (mimeType || "").toLowerCase()
|
|
127
|
+
|
|
128
|
+
// 1. MimeType 判断 (最優先、汎用 octet-stream 以外)
|
|
129
|
+
if (cleanMime && cleanMime !== "application/octet-stream") {
|
|
130
|
+
// Markdown
|
|
131
|
+
if (cleanMime === "text/markdown" || cleanMime === "text/x-markdown") {
|
|
132
|
+
return <FileMd className="h-4 w-4 text-sky-500 dark:text-sky-400" />
|
|
133
|
+
}
|
|
134
|
+
// PDF
|
|
135
|
+
if (cleanMime === "application/pdf") {
|
|
136
|
+
return <FilePdf className="h-4 w-4 text-red-500 dark:text-red-400" />
|
|
137
|
+
}
|
|
138
|
+
// Excel / 表計算 / CSV / Google Sheets (google-apps.spreadsheet)
|
|
139
|
+
if (cleanMime.includes("excel") || cleanMime.includes("spreadsheet") || cleanMime.includes("google-apps.spreadsheet")) {
|
|
140
|
+
return <FileXls className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
|
|
141
|
+
}
|
|
142
|
+
if (cleanMime === "text/csv" || cleanMime === "text/tab-separated-values") {
|
|
143
|
+
return <FileCsv className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
|
|
144
|
+
}
|
|
145
|
+
// Word / ドキュメント / Google Docs (google-apps.document)
|
|
146
|
+
if (cleanMime.includes("word") || cleanMime.includes("msword") || cleanMime.includes("wordprocessingml") || cleanMime.includes("google-apps.document") || cleanMime === "application/rtf") {
|
|
147
|
+
return <FileDoc className="h-4 w-4 text-blue-600 dark:text-blue-400" />
|
|
148
|
+
}
|
|
149
|
+
// PowerPoint / プレゼンテーション / Google Slides (google-apps.presentation)
|
|
150
|
+
if (cleanMime.includes("powerpoint") || cleanMime.includes("presentation") || cleanMime.includes("google-apps.presentation")) {
|
|
151
|
+
return <FilePpt className="h-4 w-4 text-orange-500 dark:text-orange-400" />
|
|
152
|
+
}
|
|
153
|
+
// 画像
|
|
154
|
+
if (cleanMime.startsWith("image/")) {
|
|
155
|
+
return <FileImage className="h-4 w-4 text-teal-500 dark:text-teal-400" />
|
|
156
|
+
}
|
|
157
|
+
// 音声
|
|
158
|
+
if (cleanMime.startsWith("audio/")) {
|
|
159
|
+
return <FileAudio className="h-4 w-4 text-pink-500 dark:text-pink-400" />
|
|
160
|
+
}
|
|
161
|
+
// 動画
|
|
162
|
+
if (cleanMime.startsWith("video/")) {
|
|
163
|
+
return <FileVideo className="h-4 w-4 text-violet-500 dark:text-violet-400" />
|
|
164
|
+
}
|
|
165
|
+
// アーカイブ / 圧縮
|
|
166
|
+
if (cleanMime.includes("zip") || cleanMime.includes("tar") || cleanMime.includes("compressed") || cleanMime.includes("archive")) {
|
|
167
|
+
return <FileZip className="h-4 w-4 text-amber-500 dark:text-amber-400" />
|
|
168
|
+
}
|
|
169
|
+
// ソースコード / JSON / HTML / CSS
|
|
170
|
+
if (
|
|
171
|
+
cleanMime === "application/json" ||
|
|
172
|
+
cleanMime.includes("javascript") ||
|
|
173
|
+
cleanMime.includes("typescript") ||
|
|
174
|
+
cleanMime.includes("xml") ||
|
|
175
|
+
cleanMime.startsWith("text/html") ||
|
|
176
|
+
cleanMime.startsWith("text/css") ||
|
|
177
|
+
cleanMime.includes("x-python") ||
|
|
178
|
+
cleanMime.includes("x-sh") ||
|
|
179
|
+
cleanMime.includes("x-go") ||
|
|
180
|
+
cleanMime.includes("x-rust")
|
|
181
|
+
) {
|
|
182
|
+
return <FileCode className="h-4 w-4 text-purple-500 dark:text-purple-400" />
|
|
183
|
+
}
|
|
184
|
+
// テキスト
|
|
185
|
+
if (cleanMime.startsWith("text/")) {
|
|
186
|
+
return <FileText className="h-4 w-4 text-gray-500 dark:text-gray-400" />
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// 2. 拡張子判断 (MimeType が汎用または不在時のフォールバック)
|
|
191
|
+
if (cleanExt) {
|
|
192
|
+
if (cleanExt === "md" || cleanExt === "markdown" || cleanExt === "mdx") {
|
|
193
|
+
return <FileMd className="h-4 w-4 text-sky-500 dark:text-sky-400" />
|
|
194
|
+
}
|
|
195
|
+
if (cleanExt === "pdf") {
|
|
196
|
+
return <FilePdf className="h-4 w-4 text-red-500 dark:text-red-400" />
|
|
197
|
+
}
|
|
198
|
+
if (["xls", "xlsx", "xlsm", "xlsb", "ods"].includes(cleanExt)) {
|
|
199
|
+
return <FileXls className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
|
|
200
|
+
}
|
|
201
|
+
if (["csv", "tsv"].includes(cleanExt)) {
|
|
202
|
+
return <FileCsv className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
|
|
203
|
+
}
|
|
204
|
+
if (["doc", "docx", "rtf", "odt"].includes(cleanExt)) {
|
|
205
|
+
return <FileDoc className="h-4 w-4 text-blue-600 dark:text-blue-400" />
|
|
206
|
+
}
|
|
207
|
+
if (["ppt", "pptx", "odp"].includes(cleanExt)) {
|
|
208
|
+
return <FilePpt className="h-4 w-4 text-orange-500 dark:text-orange-400" />
|
|
209
|
+
}
|
|
210
|
+
if (["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp", "tiff", "avif"].includes(cleanExt)) {
|
|
211
|
+
return <FileImage className="h-4 w-4 text-teal-500 dark:text-teal-400" />
|
|
212
|
+
}
|
|
213
|
+
if (["js", "mjs", "cjs", "ts", "tsx", "jsx", "json", "html", "htm", "css", "scss", "py", "go", "rs", "c", "cpp", "h", "hpp", "sh", "bash", "yaml", "yml", "sql", "xml", "toml"].includes(cleanExt)) {
|
|
214
|
+
return <FileCode className="h-4 w-4 text-purple-500 dark:text-purple-400" />
|
|
215
|
+
}
|
|
216
|
+
if (["mp3", "wav", "ogg", "m4a", "flac", "aac", "wma"].includes(cleanExt)) {
|
|
217
|
+
return <FileAudio className="h-4 w-4 text-pink-500 dark:text-pink-400" />
|
|
218
|
+
}
|
|
219
|
+
if (["mp4", "webm", "mov", "avi", "mkv", "wmv", "flv"].includes(cleanExt)) {
|
|
220
|
+
return <FileVideo className="h-4 w-4 text-violet-500 dark:text-violet-400" />
|
|
221
|
+
}
|
|
222
|
+
if (["zip", "tar", "gz", "7z", "rar", "tgz", "bz2"].includes(cleanExt)) {
|
|
223
|
+
return <FileZip className="h-4 w-4 text-amber-500 dark:text-amber-400" />
|
|
224
|
+
}
|
|
225
|
+
if (["txt", "log"].includes(cleanExt)) {
|
|
226
|
+
return <FileText className="h-4 w-4 text-gray-500 dark:text-gray-400" />
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// 3. デフォルトファイルアイコン
|
|
231
|
+
return <FileIcon className="h-4 w-4 text-gray-400 dark:text-gray-400" />
|
|
232
|
+
}
|
|
233
|
+
|
|
116
234
|
/**
|
|
117
235
|
* Determines the icon to render for a directory entry.
|
|
118
236
|
* ディレクトリエントリに表示するアイコンを決定する関数。
|
|
119
237
|
*/
|
|
120
238
|
export const resolveEntryIcon = (ctx: DirectoryTreeIconRenderContext, overrides?: DirectoryTreeIconOverrides): ReactNode => {
|
|
121
|
-
const { entry, isDirectory, isExpanded, extension } = ctx
|
|
239
|
+
const { entry, isDirectory, isExpanded, extension, mimeType } = ctx
|
|
122
240
|
let target: ReactNode | DirectoryTreeIconRenderer | undefined
|
|
123
241
|
|
|
242
|
+
const effectiveMime = mimeType || entry.mimeType
|
|
243
|
+
|
|
124
244
|
if (entry.icon !== undefined) target = entry.icon
|
|
125
245
|
else if (isDirectory) target = (isExpanded && overrides?.directoryExpanded) || overrides?.directory || <FolderIcon className="h-4 w-4" />
|
|
126
246
|
else if (extension && overrides?.fileByExtension?.[extension]) target = overrides.fileByExtension[extension]
|
|
127
|
-
else target = overrides?.file || (extension
|
|
247
|
+
else target = overrides?.file || getFileIconByMimeOrExtension(effectiveMime, extension, entry.name)
|
|
128
248
|
|
|
129
249
|
if (typeof target === "function") return sanitizeIcon(target(ctx), entry.absolutePath)
|
|
130
250
|
return sanitizeIcon(target, entry.absolutePath)
|
package/src/types.ts
CHANGED
|
@@ -24,6 +24,7 @@ export type DirectoryEntry = {
|
|
|
24
24
|
type: "file" | "directory"
|
|
25
25
|
absolutePath: string
|
|
26
26
|
relativePath: string
|
|
27
|
+
mimeType?: string
|
|
27
28
|
children?: DirectoryEntry[]
|
|
28
29
|
icon?: DirectoryTreeIconRenderer
|
|
29
30
|
/**
|
|
@@ -72,6 +73,7 @@ export type DirectoryTreeIconRenderContext = {
|
|
|
72
73
|
isSelected: boolean
|
|
73
74
|
isItemSelected: boolean
|
|
74
75
|
extension?: string
|
|
76
|
+
mimeType?: string
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
/**
|
|
@@ -425,16 +427,31 @@ export type DirectoryTreeProps = {
|
|
|
425
427
|
*/
|
|
426
428
|
iconOverrides?: DirectoryTreeIconOverrides
|
|
427
429
|
/**
|
|
428
|
-
* Size of the expand icon.
|
|
429
|
-
*
|
|
430
|
+
* Size of the expand icon in px.
|
|
431
|
+
* 展開アイコンのサイズ (px)。
|
|
430
432
|
*/
|
|
431
433
|
expandIconSize?: number
|
|
432
434
|
/**
|
|
433
|
-
*
|
|
435
|
+
* Size of the file/directory type icon in px.
|
|
436
|
+
* ファイル/ディレクトリアイコンのサイズ (px)。
|
|
437
|
+
*/
|
|
438
|
+
typeIconSize?: number
|
|
439
|
+
/**
|
|
440
|
+
* Font size of entry labels in px or CSS string (e.g. 12 or "0.75rem").
|
|
441
|
+
* ラベル文字のフォントサイズ (px または CSS 文字列)。
|
|
442
|
+
*/
|
|
443
|
+
fontSize?: number | string
|
|
444
|
+
/**
|
|
445
|
+
* Indentation width per depth level in px.
|
|
446
|
+
* 1 階層あたりのインデント幅 (px)。
|
|
447
|
+
*/
|
|
448
|
+
indentSize?: number
|
|
449
|
+
/**
|
|
450
|
+
* Row height in px, or a function computing the height per entry. Default 20 (or 18 in compact mode).
|
|
434
451
|
* When a function is supplied, rows may have different heights and the tree
|
|
435
452
|
* connector lines follow each row's cumulative offset.
|
|
436
453
|
*
|
|
437
|
-
* 各行の高さ (px)、またはエントリごとに高さを算出する関数。既定 20。
|
|
454
|
+
* 各行の高さ (px)、またはエントリごとに高さを算出する関数。既定 20 (コンパクトモード時 18)。
|
|
438
455
|
* 関数を渡すと行ごとに高さを変えられ、ツリー接続線は各行の累積オフセットに追従する。
|
|
439
456
|
*/
|
|
440
457
|
itemHeight?: ItemHeight
|
|
@@ -533,6 +550,9 @@ export type DirectoryEntryItemProps = {
|
|
|
533
550
|
showFileIcons?: boolean
|
|
534
551
|
iconOverrides?: DirectoryTreeIconOverrides
|
|
535
552
|
expandIconSize?: number
|
|
553
|
+
typeIconSize?: number
|
|
554
|
+
fontSize?: number | string
|
|
555
|
+
indentSize?: number
|
|
536
556
|
useCanvasExpandIcons?: boolean
|
|
537
557
|
highlightStyles?: HighlightStyles
|
|
538
558
|
entryClassName?: string
|
package/dist/directory-tree.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--color-amber-100:oklch(96.2% .059 95.617);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-900:oklch(42.1% .095 57.708);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-900:oklch(37.8% .077 168.94);--color-cyan-400:oklch(78.9% .154 211.53);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer base;@layer components{@layer theme,base;@layer components.utilities{.aqvs-scroll-pane{display:flex;position:relative}.aqvs-scroll-pane-content{flex:1;height:100%;position:relative;overflow:hidden}.aqvs-tap-scroll-circle{touch-action:none;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;transition-property:transform;transition-duration:.1s;transition-timing-function:cubic-bezier(0,0,.2,1);display:flex;position:relative}.aqvs-tap-scroll-circle-visual-outer{border-radius:9999px;position:absolute;inset:0}.aqvs-tap-scroll-circle-gradient{background:linear-gradient(to bottom right,#1d4ed899,#60a5fa8c,#bfdbfe66);border-width:1px;border-color:#fff6;border-radius:9999px;position:absolute;inset:0;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.aqvs-tap-scroll-circle-inner{border-radius:9999px;position:absolute;inset:18%}.aqvs-sample-visual-rod{background-color:#ffffffd9;border-width:1px;border-color:#ffffff80;border-radius:9999px;position:absolute;top:50%;left:50%}.aqvs-sample-visual-pupil{background-color:#fffc;border-radius:9999px;position:absolute;top:50%;left:50%}.aqvs-sample-visual-highlight{background-color:#ffffff80;border-radius:9999px;position:absolute;top:50%;left:50%}.aqvs-scrollbar{z-index:50;cursor:default;-webkit-user-select:none;user-select:none;touch-action:none;background-color:#fff;position:relative}.aqvs-scrollbar-horizontal{flex-direction:row;align-items:stretch;display:flex}.aqvs-scrollbar-vertical{flex-direction:column;align-items:stretch;display:flex}.aqvs-scrollbar-tap-circle-wrapper{pointer-events:auto;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);position:absolute}.aqvs-scrollbar-arrow-button{color:#313131;background-color:#e0e0e0;justify-content:center;align-items:center;font-size:.75rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:flex}.aqvs-scrollbar-arrow-button:focus{outline-offset:2px;outline:2px solid #0000}.aqvs-scrollbar-arrow-button:focus-visible{outline-offset:1px;outline:2px solid #60a5fa}.aqvs-scrollbar-arrow-button:disabled{cursor:not-allowed;opacity:.5}.aqvs-scrollbar-arrow-button:enabled:hover{background-color:#d4d4d4}.aqvs-scrollbar-track{background-color:#f5f5f5;flex:1;position:relative}.aqvs-scrollbar-overlay{pointer-events:none;position:absolute;inset:0}.aqvs-scrollbar-thumb-wrapper{touch-action:none;position:absolute}.aqvs-scrollbar-thumb{transform-origin:50%;background-color:#7f7f7f;transition:transform 80ms ease-out;position:absolute}.aqvs-scrollbar-thumb[data-thumb-state=disabled]{transition:none;transform:none}.aqvs-scrollbar-thumb[data-thumb-state=hover]{background-color:#5f5f5f}.aqvs-scrollbar-thumb[data-thumb-state=dragging]{background-color:#4f4f4f;transition:transform 60ms ease-out}.aqvs-scrollbar-thumb-horizontal{inset:1.5px 0}.aqvs-scrollbar-thumb-horizontal[data-thumb-state=hover]{top:-.5px;bottom:-.5px;transform:scaleY(1.06)}.aqvs-scrollbar-thumb-horizontal[data-thumb-state=dragging]{top:-.5px;bottom:-.5px;transform:scaleY(1.12)}.aqvs-scrollbar-thumb-vertical{inset:0 1.5px}.aqvs-scrollbar-thumb-vertical[data-thumb-state=hover]{left:-.5px;right:-.5px;transform:scaleX(1.06)}.aqvs-scrollbar-thumb-vertical[data-thumb-state=dragging]{left:-.5px;right:-.5px;transform:scaleX(1.12)}.aqvs-scroll-to-edge-button{pointer-events:auto;color:#fff;text-transform:uppercase;letter-spacing:.05em;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:#1f2937cc;border-radius:9999px;padding:.25rem 3rem;font-size:10px;font-weight:500;transition-property:transform,background-color;transition-duration:.15s;transform:none;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.aqvs-scroll-to-edge-button:hover{background-color:#374151}.aqvs-scroll-to-edge-button:active{transform:scale(.95)}.aqvs-scroll-to-edge-overlay{pointer-events:none;z-index:10;transition-property:opacity;transition-duration:.5s;position:absolute;inset:0}.aqvs-scroll-to-edge-overlay[data-visible=true]{opacity:1}.aqvs-scroll-to-edge-overlay[data-visible=false]{opacity:0}.aqvs-scroll-to-edge-button-container{justify-content:center;display:flex;position:absolute;left:0;right:0}.aqvs-scroll-to-edge-button-container-top{top:.5rem}.aqvs-scroll-to-edge-button-container-bottom{bottom:.5rem}.aqvs-no-items-container{width:100%;position:absolute;top:0}.aqvs-no-items-text{text-align:center;color:#6b7280}.aqvs-item-container,.aqvs-bottom-inset,.aqvs-items-wrapper{width:100%;position:absolute}}@layer utilities{.dt-grid{flex-direction:column;display:flex;position:relative}.dt-grid-body{flex:1;min-height:0;position:relative}.dt-grid-header,.dt-grid-footer,.dt-grid-row,.dt-grid-hscrollbar-row{align-items:stretch;display:flex}.dt-grid-name-cell,.dt-grid-name-header,.dt-grid-name-footer{z-index:1;flex-shrink:0;align-items:center;display:flex;position:relative;overflow:hidden}.dt-grid-numeric-viewport{flex:1;position:relative;overflow:hidden}.dt-grid-numeric-track{transform:translate(calc(-1 * var(--dt-hscroll,0px)));will-change:transform;display:grid}.dt-grid-cell{white-space:nowrap;text-overflow:ellipsis;align-items:center;padding:0 8px;display:flex;overflow:hidden}.dt-grid-cell--right{text-align:right;justify-content:flex-end}.dt-grid-cell--center{text-align:center;justify-content:center}.dt-grid-name-label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dt-grid-scrollbar-spacer{flex-shrink:0}}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.left-0{left:calc(var(--spacing) * 0)}.z-0{z-index:0}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-96{height:calc(var(--spacing) * 96)}.h-full{height:100%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-y-hidden{overflow-y:hidden}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/10{background-color:color-mix(in oklab,var(--color-blue-400) 10%,transparent)}}.bg-blue-400\/20{background-color:#54a2ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/20{background-color:color-mix(in oklab,var(--color-blue-400) 20%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-yellow-50{background-color:var(--color-yellow-50)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.py-1{padding-block:calc(var(--spacing) * 1)}.pr-\[3px\]{padding-right:3px}.pb-\[5px\]{padding-bottom:5px}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-cyan-400{color:var(--color-cyan-400)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-slate-600{color:var(--color-slate-600)}.text-slate-800{color:var(--color-slate-800)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px_rgba\(59\,130\,246\,0\.3\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#3b82f64d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hover\:bg-gray-400\/15:hover{background-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gray-400\/15:hover{background-color:color-mix(in oklab,var(--color-gray-400) 15%,transparent)}}.hover\:bg-slate-100\/50:hover{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-100\/50:hover{background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}}@media(prefers-color-scheme:dark){.dark\:bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20{background-color:color-mix(in oklab,var(--color-amber-900) 20%,transparent)}}.dark\:bg-blue-400\/15{background-color:#54a2ff26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-400\/15{background-color:color-mix(in oklab,var(--color-blue-400) 15%,transparent)}}.dark\:bg-blue-400\/25{background-color:#54a2ff40}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-400\/25{background-color:color-mix(in oklab,var(--color-blue-400) 25%,transparent)}}.dark\:bg-emerald-900\/20{background-color:#004e3b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/20{background-color:color-mix(in oklab,var(--color-emerald-900) 20%,transparent)}}.dark\:bg-gray-900{background-color:var(--color-gray-900)}.dark\:bg-indigo-900\/20{background-color:#312c8533}@supports (color:color-mix(in lab,red,red)){.dark\:bg-indigo-900\/20{background-color:color-mix(in oklab,var(--color-indigo-900) 20%,transparent)}}.dark\:bg-yellow-900\/20{background-color:#733e0a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/20{background-color:color-mix(in oklab,var(--color-yellow-900) 20%,transparent)}}.dark\:text-blue-300{color:var(--color-blue-300)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-gray-200{color:var(--color-gray-200)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}.dark\:text-slate-100{color:var(--color-slate-100)}.dark\:text-slate-300{color:var(--color-slate-300)}.dark\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\:shadow-\[0_0_0_1px_rgba\(96\,165\,250\,0\.4\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#60a5fa66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.dark\:hover\:bg-gray-200\/10:hover{background-color:#e5e7eb1a}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-gray-200\/10:hover{background-color:color-mix(in oklab,var(--color-gray-200) 10%,transparent)}}}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}
|