impr: restructure src/lib

This commit is contained in:
Xylight committed 2025-09-24 17:12:19 -07:00
1 parent d85b889409
commit 75f907743e
376 files changed
+1000 -1033

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<script lang="ts" module>
const wrapClass = {
wrap: '',
'no-wrap': 'overflow-hidden text-ellipsis whitespace-nowrap',
force: 'break-words',
}
</script>
<script lang="ts">
interface Props {
wrap?: keyof typeof wrapClass
class?: string
children?: import('svelte').Snippet
}
let { wrap = 'wrap', class: clazz = '', children }: Props = $props()
let classes = $derived(`${wrapClass[wrap]} ${clazz ?? ''}`)
</script>
<span class={classes}>
{@render children?.()}
</span>