3374eebfc6
- [critical] DOMPurify 적용 (FORBID_TAGS/ATTR, ALLOW_UNKNOWN_PROTOCOLS) - [high] $: → $derived 변환 (documents/[id]) - [high] 태그/소스 필터 구현 (filterTag, filterSource) - FormatIcon: docx/xlsx/pptx/odt/ods/odp/dwg/dxf 추가 - editTab 선언 순서 수정 - debounceTimer 미사용 변수 제거 - Toast role="status" aria-live 추가 - marked 옵션: mangle/headerIds false Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
42 lines
907 B
Svelte
42 lines
907 B
Svelte
<script>
|
|
import { FileText, File, Image, FileSpreadsheet, Presentation, Mail, FileCode, FileQuestion } from 'lucide-svelte';
|
|
|
|
let { format = '', size = 16 } = $props();
|
|
|
|
const ICON_MAP = {
|
|
pdf: FileText,
|
|
hwp: FileText,
|
|
hwpx: FileText,
|
|
md: FileCode,
|
|
txt: File,
|
|
csv: FileSpreadsheet,
|
|
json: FileCode,
|
|
xml: FileCode,
|
|
html: FileCode,
|
|
jpg: Image,
|
|
jpeg: Image,
|
|
png: Image,
|
|
gif: Image,
|
|
bmp: Image,
|
|
tiff: Image,
|
|
eml: Mail,
|
|
odoc: FileText,
|
|
osheet: FileSpreadsheet,
|
|
docx: FileText,
|
|
doc: FileText,
|
|
xlsx: FileSpreadsheet,
|
|
xls: FileSpreadsheet,
|
|
pptx: Presentation,
|
|
ppt: Presentation,
|
|
odt: FileText,
|
|
ods: FileSpreadsheet,
|
|
odp: Presentation,
|
|
dwg: FileCode,
|
|
dxf: FileCode,
|
|
};
|
|
|
|
let Icon = $derived(ICON_MAP[format?.toLowerCase()] || FileQuestion);
|
|
</script>
|
|
|
|
<svelte:component this={Icon} {size} />
|