Initial Commit

This commit is contained in:
2026-10-03 20:07:49 +02:00
commit a1346c98b1
427 changed files with 59320 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
export function hexToRgbTuple(hex: string): [number, number, number] {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
if (!result) return [1, 1, 1]
return [Number.parseInt(result[1]!, 16) / 255, Number.parseInt(result[2]!, 16) / 255, Number.parseInt(result[3]!, 16) / 255]
}
/** Mischt zwei Hexfarben, t=0 → a, t=1 → b */
export function mixHex(a: string, b: string, t: number): string {
const ca = hexToRgbTuple(a)
const cb = hexToRgbTuple(b)
const r = Math.round((ca[0] + (cb[0] - ca[0]) * t) * 255)
const g = Math.round((ca[1] + (cb[1] - ca[1]) * t) * 255)
const bl = Math.round((ca[2] + (cb[2] - ca[2]) * t) * 255)
return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${bl.toString(16).padStart(2, '0')}`
}
/** Hellt (amount > 0) oder dunkelt (amount < 0) eine Hexfarbe ab */
export function shadeHex(hex: string, amount: number): string {
return amount >= 0 ? mixHex(hex, '#ffffff', amount) : mixHex(hex, '#000000', -amount)
}
+22
View File
@@ -0,0 +1,22 @@
import {
createFilteredRowModel,
createPaginatedRowModel,
createSortedRowModel,
globalFilteringFeature,
rowPaginationFeature,
rowSortingFeature,
tableFeatures,
} from '@tanstack/vue-table'
// Registrierte Features für die DataTable — globaler Filter, Sortierung, Pagination.
// Vor jedem Row-Model-Slot muss das zugehörige Feature stehen.
export const dataTableFeatures = tableFeatures({
globalFilteringFeature,
rowSortingFeature,
rowPaginationFeature,
filteredRowModel: createFilteredRowModel(),
sortedRowModel: createSortedRowModel(),
paginatedRowModel: createPaginatedRowModel(),
})
export type DataTableFeatures = typeof dataTableFeatures
+7
View File
@@ -0,0 +1,7 @@
import type { ClassValue } from "clsx"
import { clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}