diff --git a/package.json b/package.json index 26381ebb5da5bd061d261af953f1423f198d1057..52d08a17afb62ecdb1028a7ca17fcfce1d6bd2d6 100644 --- a/package.json +++ b/package.json @@ -25,16 +25,13 @@ "@sveltejs/kit": "^2.16.0", "@sveltejs/vite-plugin-svelte": "^5.0.0", "@tailwindcss/vite": "^4.0.0", - "@tanstack/table-core": "^8.20.5", "bits-ui": "^2.4.1", - "embla-carousel-svelte": "^8.6.0", "eslint": "^9.18.0", "eslint-config-prettier": "^10.0.1", "eslint-plugin-svelte": "^3.0.0", "globals": "^16.0.0", "layerchart": "2.0.0-next.10", "mode-watcher": "^1.0.6", - "paneforge": "^1.0.0-next.5", "prettier": "^3.4.2", "prettier-plugin-svelte": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.11", @@ -46,7 +43,6 @@ "tw-animate-css": "^1.3.3", "typescript": "^5.0.0", "typescript-eslint": "^8.20.0", - "vaul-svelte": "^1.0.0-next.7", "vite": "^6.2.6" }, "dependencies": { @@ -57,7 +53,6 @@ "feetech.js": "file:packages/feetech.js", "tailwind-merge": "^3.3.0", "three": "^0.177.0", - "threlte-postprocessing": "^0.0.9", "zod": "^3.25.42" } } diff --git a/src-python/src/main.py b/src-python/src/main.py index 8d5e1a9876f43df6cecccbd4d21a76c556adf4ac..68cb47c0e672d6594436d78d1d40acb5af1a96b9 100644 --- a/src-python/src/main.py +++ b/src-python/src/main.py @@ -120,6 +120,13 @@ if robot_assets_dir: return FileResponse(favicon_path) raise HTTPException(status_code=404, detail="Favicon not found") + @app.get("/favicon_1024.png") + async def get_favicon_1024(): + favicon_path = os.path.join(robot_assets_dir, "favicon_1024.png") + if os.path.exists(favicon_path): + return FileResponse(favicon_path) + raise HTTPException(status_code=404, detail="Favicon not found") + logger.info(f"🤖 Serving robot assets from: {robot_assets_dir}") else: logger.warning( diff --git a/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte b/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte deleted file mode 100644 index 815aab035809d33fc84782bb699bdbded6797036..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/lib/components/ui/aspect-ratio/index.ts b/src/lib/components/ui/aspect-ratio/index.ts deleted file mode 100644 index 985c75fdbff78e6728e9c36f0a79559bf06dd9d1..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/aspect-ratio/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Root from "./aspect-ratio.svelte"; - -export { Root, Root as AspectRatio }; diff --git a/src/lib/components/ui/avatar/avatar-fallback.svelte b/src/lib/components/ui/avatar/avatar-fallback.svelte deleted file mode 100644 index 249d4a4ab6f0e711936b28383cc4936d6fba098f..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/avatar/avatar-fallback.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/lib/components/ui/avatar/avatar-image.svelte b/src/lib/components/ui/avatar/avatar-image.svelte deleted file mode 100644 index 2bb9db4d845d9ed81e85646aa09ce1c563ee7868..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/avatar/avatar-image.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/lib/components/ui/avatar/avatar.svelte b/src/lib/components/ui/avatar/avatar.svelte deleted file mode 100644 index f093a97bf72915fc4f8e7b2e0c4be7ff16aee7ac..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/avatar/avatar.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/lib/components/ui/avatar/index.ts b/src/lib/components/ui/avatar/index.ts deleted file mode 100644 index b08c78030f7f72ffcfa6e81b2dd80acd5d59ca43..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/avatar/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import Root from "./avatar.svelte"; -import Image from "./avatar-image.svelte"; -import Fallback from "./avatar-fallback.svelte"; - -export { - Root, - Image, - Fallback, - // - Root as Avatar, - Image as AvatarImage, - Fallback as AvatarFallback -}; diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte deleted file mode 100644 index a178cf55f3a4e6edca1eb1152dc8c8821a82e8ca..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte deleted file mode 100644 index 1a84c4c458d06daae82514e6ee11602e16e64535..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
  • - {@render children?.()} -
  • diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte deleted file mode 100644 index 382b6ab2e703e6be4210f1ec31624c8ec71d7a21..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte +++ /dev/null @@ -1,31 +0,0 @@ - - -{#if child} - {@render child({ props: attrs })} -{:else} - - {@render children?.()} - -{/if} diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte deleted file mode 100644 index 1272a374fde56e21a83725b6920a70b9b4bca644..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - -
      - {@render children?.()} -
    diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte deleted file mode 100644 index 5fb697947403d2dfc1dd3797845e304076457ac8..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - - - {@render children?.()} - diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte deleted file mode 100644 index 84106a1ccbabc760c947c649d2bb0941df0a7d4d..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/src/lib/components/ui/breadcrumb/breadcrumb.svelte b/src/lib/components/ui/breadcrumb/breadcrumb.svelte deleted file mode 100644 index 8f8a3e643d7f0b3c54d7cd9cbcd5323509bc6504..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/breadcrumb.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/src/lib/components/ui/breadcrumb/index.ts b/src/lib/components/ui/breadcrumb/index.ts deleted file mode 100644 index 2651956758e4c1ce6377d48ff3e75b237ed7d46d..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/breadcrumb/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Root from "./breadcrumb.svelte"; -import Ellipsis from "./breadcrumb-ellipsis.svelte"; -import Item from "./breadcrumb-item.svelte"; -import Separator from "./breadcrumb-separator.svelte"; -import Link from "./breadcrumb-link.svelte"; -import List from "./breadcrumb-list.svelte"; -import Page from "./breadcrumb-page.svelte"; - -export { - Root, - Ellipsis, - Item, - Separator, - Link, - List, - Page, - // - Root as Breadcrumb, - Ellipsis as BreadcrumbEllipsis, - Item as BreadcrumbItem, - Separator as BreadcrumbSeparator, - Link as BreadcrumbLink, - List as BreadcrumbList, - Page as BreadcrumbPage -}; diff --git a/src/lib/components/ui/carousel/carousel-content.svelte b/src/lib/components/ui/carousel/carousel-content.svelte deleted file mode 100644 index e3150037382d400042c1eab61c5c5a5d9a6aed6c..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/carousel-content.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
    -
    - {@render children?.()} -
    -
    diff --git a/src/lib/components/ui/carousel/carousel-item.svelte b/src/lib/components/ui/carousel/carousel-item.svelte deleted file mode 100644 index 8352833807792649436a0473882f081b4f4fe7ae..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/carousel-item.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
    - {@render children?.()} -
    diff --git a/src/lib/components/ui/carousel/carousel-next.svelte b/src/lib/components/ui/carousel/carousel-next.svelte deleted file mode 100644 index 54409057cb7abd3aea79c5972d4adf22c552d6e1..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/carousel-next.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/lib/components/ui/carousel/carousel-previous.svelte b/src/lib/components/ui/carousel/carousel-previous.svelte deleted file mode 100644 index b94f4ac33b5fbe202672d2e9428f959e0f67fde6..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/carousel-previous.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/lib/components/ui/carousel/carousel.svelte b/src/lib/components/ui/carousel/carousel.svelte deleted file mode 100644 index c8f522eb08125e17b71867f345c4ce416acd651a..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/carousel.svelte +++ /dev/null @@ -1,100 +0,0 @@ - - -
    - {@render children?.()} -
    diff --git a/src/lib/components/ui/carousel/context.ts b/src/lib/components/ui/carousel/context.ts deleted file mode 100644 index 1268f9ebc291fb129ef2a8ec035a4365cb788e24..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/context.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { WithElementRef } from "$lib/utils.js"; -import type { EmblaCarouselSvelteType } from "embla-carousel-svelte"; -import type emblaCarouselSvelte from "embla-carousel-svelte"; -import { getContext, hasContext, setContext } from "svelte"; -import type { HTMLAttributes } from "svelte/elements"; - -export type CarouselAPI = - NonNullable["on:emblaInit"]> extends ( - evt: CustomEvent - ) => void - ? CarouselAPI - : never; - -type EmblaCarouselConfig = NonNullable[1]>; - -export type CarouselOptions = EmblaCarouselConfig["options"]; -export type CarouselPlugins = EmblaCarouselConfig["plugins"]; - -//// - -export type CarouselProps = { - opts?: CarouselOptions; - plugins?: CarouselPlugins; - setApi?: (api: CarouselAPI | undefined) => void; - orientation?: "horizontal" | "vertical"; -} & WithElementRef>; - -const EMBLA_CAROUSEL_CONTEXT = Symbol("EMBLA_CAROUSEL_CONTEXT"); - -export type EmblaContext = { - api: CarouselAPI | undefined; - orientation: "horizontal" | "vertical"; - scrollNext: () => void; - scrollPrev: () => void; - canScrollNext: boolean; - canScrollPrev: boolean; - handleKeyDown: (e: KeyboardEvent) => void; - options: CarouselOptions; - plugins: CarouselPlugins; - onInit: (e: CustomEvent) => void; - scrollTo: (index: number, jump?: boolean) => void; - scrollSnaps: number[]; - selectedIndex: number; -}; - -export function setEmblaContext(config: EmblaContext): EmblaContext { - setContext(EMBLA_CAROUSEL_CONTEXT, config); - return config; -} - -export function getEmblaContext(name = "This component") { - if (!hasContext(EMBLA_CAROUSEL_CONTEXT)) { - throw new Error(`${name} must be used within a component`); - } - return getContext>(EMBLA_CAROUSEL_CONTEXT); -} diff --git a/src/lib/components/ui/carousel/index.ts b/src/lib/components/ui/carousel/index.ts deleted file mode 100644 index 9aaf431a1a2ab39366025dfe5dafbc030f2f7cfd..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/carousel/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import Root from "./carousel.svelte"; -import Content from "./carousel-content.svelte"; -import Item from "./carousel-item.svelte"; -import Previous from "./carousel-previous.svelte"; -import Next from "./carousel-next.svelte"; - -export { - Root, - Content, - Item, - Previous, - Next, - // - Root as Carousel, - Content as CarouselContent, - Item as CarouselItem, - Previous as CarouselPrevious, - Next as CarouselNext -}; diff --git a/src/lib/components/ui/chart/chart-container.svelte b/src/lib/components/ui/chart/chart-container.svelte deleted file mode 100644 index d4edbd44e6d4686580874438fab40550f8166e08..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/chart/chart-container.svelte +++ /dev/null @@ -1,83 +0,0 @@ - - -
    - - {@render children?.()} -
    diff --git a/src/lib/components/ui/chart/chart-style.svelte b/src/lib/components/ui/chart/chart-style.svelte deleted file mode 100644 index 18376e8672ed06f25679f66d7558a9fa588c8606..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/chart/chart-style.svelte +++ /dev/null @@ -1,36 +0,0 @@ - - -{#if colorConfig && colorConfig.length} - {@const themeContents = Object.entries(THEMES) - .map( - ([theme, prefix]) => ` -${prefix} [data-chart=${id}] { -${colorConfig - .map(([key, itemConfig]) => { - const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color; - return color ? ` --color-${key}: ${color};` : null; - }) - .join("\n")} -} -` - ) - .join("\n")} - - {#key id} - - {@html `${styleOpen} - ${themeContents} - ${styleClose}`} - {/key} -{/if} diff --git a/src/lib/components/ui/chart/chart-tooltip.svelte b/src/lib/components/ui/chart/chart-tooltip.svelte deleted file mode 100644 index f15ff393e3a12f8f36be45bb7517ca8c37f84582..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/chart/chart-tooltip.svelte +++ /dev/null @@ -1,155 +0,0 @@ - - -{#snippet TooltipLabel()} - {#if formattedLabel} -
    - {#if typeof formattedLabel === "function"} - {@render formattedLabel()} - {:else} - {formattedLabel} - {/if} -
    - {/if} -{/snippet} - - -
    - {#if !nestLabel} - {@render TooltipLabel()} - {/if} -
    - {#each tooltipCtx.payload as item, i (item.key + i)} - {@const key = `${nameKey || item.key || item.name || "value"}`} - {@const itemConfig = getPayloadConfigFromPayload(chart.config, item, key)} - {@const indicatorColor = color || item.payload?.color || item.color} -
    svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5", - indicator === "dot" && "items-center" - )} - > - {#if formatter && item.value !== undefined && item.name} - {@render formatter({ - value: item.value, - name: item.name, - item, - index: i, - payload: tooltipCtx.payload - })} - {:else} - {#if itemConfig?.icon} - - {:else if !hideIndicator} -
    - {/if} -
    -
    - {#if nestLabel} - {@render TooltipLabel()} - {/if} - - {itemConfig?.label || item.name} - -
    - {#if item.value} - - {item.value.toLocaleString()} - - {/if} -
    - {/if} -
    - {/each} -
    -
    -
    diff --git a/src/lib/components/ui/chart/chart-utils.ts b/src/lib/components/ui/chart/chart-utils.ts deleted file mode 100644 index 50b0171046c8395b8fec5ffc9257a98dd29d02b6..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/chart/chart-utils.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Tooltip } from "layerchart"; -import { getContext, setContext, type Component, type ComponentProps, type Snippet } from "svelte"; - -export const THEMES = { light: "", dark: ".dark" } as const; - -export type ChartConfig = { - [k in string]: { - label?: string; - icon?: Component; - } & ( - | { color?: string; theme?: never } - | { color?: never; theme: Record } - ); -}; - -export type ExtractSnippetParams = T extends Snippet<[infer P]> ? P : never; - -export type TooltipPayload = ExtractSnippetParams< - ComponentProps["children"] ->["payload"][number]; - -// Helper to extract item config from a payload. -export function getPayloadConfigFromPayload( - config: ChartConfig, - payload: TooltipPayload, - key: string -) { - if (typeof payload !== "object" || payload === null) return undefined; - - const payloadPayload = - "payload" in payload && typeof payload.payload === "object" && payload.payload !== null - ? payload.payload - : undefined; - - let configLabelKey: string = key; - - if (payload.key === key) { - configLabelKey = payload.key; - } else if (payload.name === key) { - configLabelKey = payload.name; - } else if (key in payload && typeof payload[key as keyof typeof payload] === "string") { - configLabelKey = payload[key as keyof typeof payload] as string; - } else if ( - payloadPayload && - key in payloadPayload && - typeof payloadPayload[key as keyof typeof payloadPayload] === "string" - ) { - configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string; - } - - return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config]; -} - -type ChartContextValue = { - config: ChartConfig; -}; - -const chartContextKey = Symbol("chart-context"); - -export function setChartContext(value: ChartContextValue) { - return setContext(chartContextKey, value); -} - -export function useChart() { - return getContext(chartContextKey); -} diff --git a/src/lib/components/ui/chart/index.ts b/src/lib/components/ui/chart/index.ts deleted file mode 100644 index f22375e09f5b261b9de0d7bc4f3091d9c86e29e2..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/chart/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import ChartContainer from "./chart-container.svelte"; -import ChartTooltip from "./chart-tooltip.svelte"; - -export { getPayloadConfigFromPayload, type ChartConfig } from "./chart-utils.js"; - -export { ChartContainer, ChartTooltip, ChartContainer as Container, ChartTooltip as Tooltip }; diff --git a/src/lib/components/ui/data-table/data-table.svelte.ts b/src/lib/components/ui/data-table/data-table.svelte.ts deleted file mode 100644 index d2b6234145e1e8e72f434b0ee35c78eb503bbf8c..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/data-table/data-table.svelte.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { - type RowData, - type TableOptions, - type TableOptionsResolved, - type TableState, - createTable -} from "@tanstack/table-core"; - -/** - * Creates a reactive TanStack table object for Svelte. - * @param options Table options to create the table with. - * @returns A reactive table object. - * @example - * ```svelte - * - * - * - * - * {#each table.getHeaderGroups() as headerGroup} - * - * {#each headerGroup.headers as header} - * - * {/each} - * - * {/each} - * - * - *
    - * - *
    - * ``` - */ -export function createSvelteTable(options: TableOptions) { - const resolvedOptions: TableOptionsResolved = mergeObjects( - { - state: {}, - onStateChange() {}, - renderFallbackValue: null, - mergeOptions: ( - defaultOptions: TableOptions, - options: Partial> - ) => { - return mergeObjects(defaultOptions, options); - } - }, - options - ); - - const table = createTable(resolvedOptions); - let state = $state>(table.initialState); - - function updateOptions() { - table.setOptions((prev) => { - return mergeObjects(prev, options, { - state: mergeObjects(state, options.state || {}), - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onStateChange: (updater: any) => { - if (updater instanceof Function) state = updater(state); - else state = mergeObjects(state, updater); - - options.onStateChange?.(updater); - } - }); - }); - } - - updateOptions(); - - $effect.pre(() => { - updateOptions(); - }); - - return table; -} - -type MaybeThunk = T | (() => T | null | undefined); -type Intersection = (T extends [infer H, ...infer R] - ? H & Intersection - : unknown) & {}; - -/** - * Lazily merges several objects (or thunks) while preserving - * getter semantics from every source. - * - * Proxy-based to avoid known WebKit recursion issue. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function mergeObjects[]>( - ...sources: Sources -): Intersection<{ [K in keyof Sources]: Sources[K] }> { - const resolve = (src: MaybeThunk): T | undefined => - typeof src === "function" ? (src() ?? undefined) : src; - - const findSourceWithKey = (key: PropertyKey) => { - for (let i = sources.length - 1; i >= 0; i--) { - const obj = resolve(sources[i]); - if (obj && key in obj) return obj; - } - return undefined; - }; - - return new Proxy(Object.create(null), { - get(_, key) { - const src = findSourceWithKey(key); - - return src?.[key as never]; - }, - - has(_, key) { - return !!findSourceWithKey(key); - }, - - ownKeys(): (string | symbol)[] { - const all = new Set(); - for (const s of sources) { - const obj = resolve(s); - if (obj) { - for (const k of Reflect.ownKeys(obj) as (string | symbol)[]) { - all.add(k); - } - } - } - return [...all]; - }, - - getOwnPropertyDescriptor(_, key) { - const src = findSourceWithKey(key); - if (!src) return undefined; - return { - configurable: true, - enumerable: true, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: (src as any)[key], - writable: true - }; - } - }) as Intersection<{ [K in keyof Sources]: Sources[K] }>; -} diff --git a/src/lib/components/ui/data-table/flex-render.svelte b/src/lib/components/ui/data-table/flex-render.svelte deleted file mode 100644 index 12d2af10e3e971da80e6066dbbc3749fd273b66f..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/data-table/flex-render.svelte +++ /dev/null @@ -1,36 +0,0 @@ - - -{#if typeof content === "string"} - {content} -{:else if content instanceof Function} - - - {@const result = content(context as any)} - {#if result instanceof RenderComponentConfig} - {@const { component: Component, props } = result} - - {:else if result instanceof RenderSnippetConfig} - {@const { snippet, params } = result} - {@render snippet(params)} - {:else} - {result} - {/if} -{/if} diff --git a/src/lib/components/ui/data-table/index.ts b/src/lib/components/ui/data-table/index.ts deleted file mode 100644 index 5f4e77ea06f34b1ec26e02ea095ca9560e1c906b..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/data-table/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as FlexRender } from "./flex-render.svelte"; -export { renderComponent, renderSnippet } from "./render-helpers.js"; -export { createSvelteTable } from "./data-table.svelte.js"; diff --git a/src/lib/components/ui/data-table/render-helpers.ts b/src/lib/components/ui/data-table/render-helpers.ts deleted file mode 100644 index 08242356d2e3943ac262406ed8f817515af9169f..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/data-table/render-helpers.ts +++ /dev/null @@ -1,111 +0,0 @@ -import type { Component, ComponentProps, Snippet } from "svelte"; - -/** - * A helper class to make it easy to identify Svelte components in - * `columnDef.cell` and `columnDef.header` properties. - * - * > NOTE: This class should only be used internally by the adapter. If you're - * reading this and you don't know what this is for, you probably don't need it. - * - * @example - * ```svelte - * {@const result = content(context as any)} - * {#if result instanceof RenderComponentConfig} - * {@const { component: Component, props } = result} - * - * {/if} - * ``` - */ -export class RenderComponentConfig { - component: TComponent; - props: ComponentProps | Record; - constructor( - component: TComponent, - props: ComponentProps | Record = {} - ) { - this.component = component; - this.props = props; - } -} - -/** - * A helper class to make it easy to identify Svelte Snippets in `columnDef.cell` and `columnDef.header` properties. - * - * > NOTE: This class should only be used internally by the adapter. If you're - * reading this and you don't know what this is for, you probably don't need it. - * - * @example - * ```svelte - * {@const result = content(context as any)} - * {#if result instanceof RenderSnippetConfig} - * {@const { snippet, params } = result} - * {@render snippet(params)} - * {/if} - * ``` - */ -export class RenderSnippetConfig { - snippet: Snippet<[TProps]>; - params: TProps; - constructor(snippet: Snippet<[TProps]>, params: TProps) { - this.snippet = snippet; - this.params = params; - } -} - -/** - * A helper function to help create cells from Svelte components through ColumnDef's `cell` and `header` properties. - * - * This is only to be used with Svelte Components - use `renderSnippet` for Svelte Snippets. - * - * @param component A Svelte component - * @param props The props to pass to `component` - * @returns A `RenderComponentConfig` object that helps svelte-table know how to render the header/cell component. - * @example - * ```ts - * // +page.svelte - * const defaultColumns = [ - * columnHelper.accessor('name', { - * header: header => renderComponent(SortHeader, { label: 'Name', header }), - * }), - * columnHelper.accessor('state', { - * header: header => renderComponent(SortHeader, { label: 'State', header }), - * }), - * ] - * ``` - * @see {@link https://tanstack.com/table/latest/docs/guide/column-defs} - */ -export function renderComponent< - // eslint-disable-next-line @typescript-eslint/no-explicit-any - T extends Component, - Props extends ComponentProps ->(component: T, props: Props = {} as Props) { - return new RenderComponentConfig(component, props); -} - -/** - * A helper function to help create cells from Svelte Snippets through ColumnDef's `cell` and `header` properties. - * - * The snippet must only take one parameter. - * - * This is only to be used with Snippets - use `renderComponent` for Svelte Components. - * - * @param snippet - * @param params - * @returns - A `RenderSnippetConfig` object that helps svelte-table know how to render the header/cell snippet. - * @example - * ```ts - * // +page.svelte - * const defaultColumns = [ - * columnHelper.accessor('name', { - * cell: cell => renderSnippet(nameSnippet, { name: cell.row.name }), - * }), - * columnHelper.accessor('state', { - * cell: cell => renderSnippet(stateSnippet, { state: cell.row.state }), - * }), - * ] - * ``` - * @see {@link https://tanstack.com/table/latest/docs/guide/column-defs} - */ -export function renderSnippet(snippet: Snippet<[TProps]>, params: TProps = {} as TProps) { - return new RenderSnippetConfig(snippet, params); -} diff --git a/src/lib/components/ui/drawer/drawer-close.svelte b/src/lib/components/ui/drawer/drawer-close.svelte deleted file mode 100644 index 95c247963a2997644b7a03ad4ddc2c3f917cf0db..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-close.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer-content.svelte b/src/lib/components/ui/drawer/drawer-content.svelte deleted file mode 100644 index 15a5e58cec9a075a372c31afa3b2ae9a273c3a92..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-content.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - {@render children?.()} - - diff --git a/src/lib/components/ui/drawer/drawer-description.svelte b/src/lib/components/ui/drawer/drawer-description.svelte deleted file mode 100644 index 2763a1aa4236eba8d8d4dd8cdd09ef3c7dc0204d..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-description.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer-footer.svelte b/src/lib/components/ui/drawer/drawer-footer.svelte deleted file mode 100644 index f78768f5b0e517b26426364310a0d80afbd5f93e..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-footer.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
    - {@render children?.()} -
    diff --git a/src/lib/components/ui/drawer/drawer-header.svelte b/src/lib/components/ui/drawer/drawer-header.svelte deleted file mode 100644 index d02ad3bd529c3884d655b55fe23a9601f8b51f82..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-header.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
    - {@render children?.()} -
    diff --git a/src/lib/components/ui/drawer/drawer-nested.svelte b/src/lib/components/ui/drawer/drawer-nested.svelte deleted file mode 100644 index 834af9461301bdb3d5e709e006474ed0c03720a3..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-nested.svelte +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer-overlay.svelte b/src/lib/components/ui/drawer/drawer-overlay.svelte deleted file mode 100644 index 53f78a2ca9401737b8c78a73ce3986746898eee8..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-overlay.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer-title.svelte b/src/lib/components/ui/drawer/drawer-title.svelte deleted file mode 100644 index a2e5761d5a1a266e820c7b1c85dca601d4899eed..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-title.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer-trigger.svelte b/src/lib/components/ui/drawer/drawer-trigger.svelte deleted file mode 100644 index f1877d8e215d729ac1ca3bef3ae23ce7a27dfe3e..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer-trigger.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/drawer.svelte b/src/lib/components/ui/drawer/drawer.svelte deleted file mode 100644 index 0cb57ff99cd90955ec460cb0a50e6ecfb2fb5577..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/drawer.svelte +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/src/lib/components/ui/drawer/index.ts b/src/lib/components/ui/drawer/index.ts deleted file mode 100644 index 6dce95dedaa51580513cbe2a8454261d1994b5f0..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/drawer/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Drawer as DrawerPrimitive } from "vaul-svelte"; - -import Root from "./drawer.svelte"; -import Content from "./drawer-content.svelte"; -import Description from "./drawer-description.svelte"; -import Overlay from "./drawer-overlay.svelte"; -import Footer from "./drawer-footer.svelte"; -import Header from "./drawer-header.svelte"; -import Title from "./drawer-title.svelte"; -import NestedRoot from "./drawer-nested.svelte"; -import Close from "./drawer-close.svelte"; -import Trigger from "./drawer-trigger.svelte"; - -const Portal: typeof DrawerPrimitive.Portal = DrawerPrimitive.Portal; - -export { - Root, - NestedRoot, - Content, - Description, - Overlay, - Footer, - Header, - Title, - Trigger, - Portal, - Close, - - // - Root as Drawer, - NestedRoot as DrawerNestedRoot, - Content as DrawerContent, - Description as DrawerDescription, - Overlay as DrawerOverlay, - Footer as DrawerFooter, - Header as DrawerHeader, - Title as DrawerTitle, - Trigger as DrawerTrigger, - Portal as DrawerPortal, - Close as DrawerClose -}; diff --git a/src/lib/components/ui/input-otp/index.ts b/src/lib/components/ui/input-otp/index.ts deleted file mode 100644 index 8c88dcc658fec3cd987f15f4b9a82e7395361a93..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/input-otp/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Root from "./input-otp.svelte"; -import Group from "./input-otp-group.svelte"; -import Slot from "./input-otp-slot.svelte"; -import Separator from "./input-otp-separator.svelte"; - -export { - Root, - Group, - Slot, - Separator, - Root as InputOTP, - Group as InputOTPGroup, - Slot as InputOTPSlot, - Separator as InputOTPSeparator -}; diff --git a/src/lib/components/ui/input-otp/input-otp-group.svelte b/src/lib/components/ui/input-otp/input-otp-group.svelte deleted file mode 100644 index 9b311bc6ddf991d18038671b3afda9fc9dc1f09b..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/input-otp/input-otp-group.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
    - {@render children?.()} -
    diff --git a/src/lib/components/ui/input-otp/input-otp-separator.svelte b/src/lib/components/ui/input-otp/input-otp-separator.svelte deleted file mode 100644 index 32412959ce34f5c371fa461025d6e7ea65866b97..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/input-otp/input-otp-separator.svelte +++ /dev/null @@ -1,19 +0,0 @@ - - -
    - {#if children} - {@render children?.()} - {:else} - - {/if} -
    diff --git a/src/lib/components/ui/input-otp/input-otp-slot.svelte b/src/lib/components/ui/input-otp/input-otp-slot.svelte deleted file mode 100644 index 7ea4641ef64382da5ac8e867abdcd1017a9df733..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/input-otp/input-otp-slot.svelte +++ /dev/null @@ -1,31 +0,0 @@ - - - - {cell.char} - {#if cell.hasFakeCaret} -
    - -
    - {/if} -
    diff --git a/src/lib/components/ui/input-otp/input-otp.svelte b/src/lib/components/ui/input-otp/input-otp.svelte deleted file mode 100644 index a9de2c47d6b267976fea88929405ec31a8c94799..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/input-otp/input-otp.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/src/lib/components/ui/pagination/index.ts b/src/lib/components/ui/pagination/index.ts deleted file mode 100644 index a8fed4cc599dcf6986159bf0feda3f432d1e06da..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Root from "./pagination.svelte"; -import Content from "./pagination-content.svelte"; -import Item from "./pagination-item.svelte"; -import Link from "./pagination-link.svelte"; -import PrevButton from "./pagination-prev-button.svelte"; -import NextButton from "./pagination-next-button.svelte"; -import Ellipsis from "./pagination-ellipsis.svelte"; - -export { - Root, - Content, - Item, - Link, - PrevButton, - NextButton, - Ellipsis, - // - Root as Pagination, - Content as PaginationContent, - Item as PaginationItem, - Link as PaginationLink, - PrevButton as PaginationPrevButton, - NextButton as PaginationNextButton, - Ellipsis as PaginationEllipsis -}; diff --git a/src/lib/components/ui/pagination/pagination-content.svelte b/src/lib/components/ui/pagination/pagination-content.svelte deleted file mode 100644 index e1124fce197f5885c33f16689013f2ec29a6a54d..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-content.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
      - {@render children?.()} -
    diff --git a/src/lib/components/ui/pagination/pagination-ellipsis.svelte b/src/lib/components/ui/pagination/pagination-ellipsis.svelte deleted file mode 100644 index 3be94c9ca40898f7c462b9cdf662a1039812dc1f..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-ellipsis.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/src/lib/components/ui/pagination/pagination-item.svelte b/src/lib/components/ui/pagination/pagination-item.svelte deleted file mode 100644 index fd7ffc3a7c5130c9e881d96ffe0b6b3adfd41b48..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-item.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
  • - {@render children?.()} -
  • diff --git a/src/lib/components/ui/pagination/pagination-link.svelte b/src/lib/components/ui/pagination/pagination-link.svelte deleted file mode 100644 index eb75eaf3e17261fb4ee06f8dfc4bc3431751db74..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-link.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - -{#snippet Fallback()} - {page.value} -{/snippet} - - diff --git a/src/lib/components/ui/pagination/pagination-next-button.svelte b/src/lib/components/ui/pagination/pagination-next-button.svelte deleted file mode 100644 index 0c455f447c3428814fc13017026409cba0e6c9a1..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-next-button.svelte +++ /dev/null @@ -1,33 +0,0 @@ - - -{#snippet Fallback()} - Next - -{/snippet} - - diff --git a/src/lib/components/ui/pagination/pagination-prev-button.svelte b/src/lib/components/ui/pagination/pagination-prev-button.svelte deleted file mode 100644 index 8ffc42b68097b4b2a40e1a0789c7ba8a956be2e8..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination-prev-button.svelte +++ /dev/null @@ -1,33 +0,0 @@ - - -{#snippet Fallback()} - - Previous -{/snippet} - - diff --git a/src/lib/components/ui/pagination/pagination.svelte b/src/lib/components/ui/pagination/pagination.svelte deleted file mode 100644 index 60e3471b0c26ca03f6b1cf08380620cd9a00fcb6..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/pagination/pagination.svelte +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/src/lib/components/ui/resizable/index.ts b/src/lib/components/ui/resizable/index.ts deleted file mode 100644 index 19376b2b9bd338dc919dec82681887966c5428e1..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/resizable/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Pane } from "paneforge"; -import Handle from "./resizable-handle.svelte"; -import PaneGroup from "./resizable-pane-group.svelte"; - -export { - PaneGroup, - Pane, - Handle, - // - PaneGroup as ResizablePaneGroup, - Pane as ResizablePane, - Handle as ResizableHandle -}; diff --git a/src/lib/components/ui/resizable/resizable-handle.svelte b/src/lib/components/ui/resizable/resizable-handle.svelte deleted file mode 100644 index 961226c52b8b89fd3c8c3a7ba5372591b0c975d7..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/resizable/resizable-handle.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -div]:rotate-90", - className - )} - {...restProps} -> - {#if withHandle} -
    - -
    - {/if} -
    diff --git a/src/lib/components/ui/resizable/resizable-pane-group.svelte b/src/lib/components/ui/resizable/resizable-pane-group.svelte deleted file mode 100644 index a810d7ec941e1a3ca2cdc6af02adca3bf17612fe..0000000000000000000000000000000000000000 --- a/src/lib/components/ui/resizable/resizable-pane-group.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -