fix(shared-ui): rename Tag type to TagType to avoid collision with Svelte internals

Tag import from @manacore/shared-icons (component) collided with Tag type
import from constants, causing "Identifier 'Tag' has already been declared"
in Svelte 5 builds. Renamed type to TagType.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-31 13:21:21 +02:00
parent 97798e5382
commit 8d071236f6

View file

@ -1,13 +1,13 @@
<script lang="ts">
import { PencilSimple, Tag as TagIcon, Trash } from '@manacore/shared-icons';
import { DEFAULT_TAG_COLOR } from './constants';
import type { Tag } from './constants';
import type { Tag as TagType } from './constants';
interface Props {
tags: Tag[];
onEdit?: (tag: Tag) => void;
onDelete?: (tag: Tag) => void;
onClick?: (tag: Tag) => void;
tags: TagType[];
onEdit?: (tag: TagType) => void;
onDelete?: (tag: TagType) => void;
onClick?: (tag: TagType) => void;
layout?: 'grid' | 'list';
emptyMessage?: string;
emptyDescription?: string;
@ -25,7 +25,7 @@
loading = false,
}: Props = $props();
function getTagColor(tag: Tag): string {
function getTagColor(tag: TagType): string {
return tag.color ?? tag.style?.color ?? DEFAULT_TAG_COLOR;
}