chore(client): remove all unused variables and imports

This commit is contained in:
ByteAtATime 2025-07-09 11:03:41 -07:00
parent 7517080d10
commit cfb5555edf
No known key found for this signature in database
13 changed files with 9 additions and 61 deletions

View file

@ -2,18 +2,13 @@
import { invoke } from '@tauri-apps/api/core';
import { onMount, tick, untrack } from 'svelte';
import { VList } from 'virtua/svelte';
import { Button } from '$lib/components/ui/button';
import { Pin, Trash, Loader2 } from '@lucide/svelte';
import { Loader2 } from '@lucide/svelte';
import ListItemBase from './nodes/shared/ListItemBase.svelte';
import { convertFileSrc } from '@tauri-apps/api/core';
import { writeText } from '@tauri-apps/plugin-clipboard-manager';
import { Kbd } from './ui/kbd';
import * as DropdownMenu from './ui/dropdown-menu';
import * as Select from './ui/select';
import ActionBar from './nodes/shared/ActionBar.svelte';
import ActionMenu from './nodes/shared/ActionMenu.svelte';
import BaseList from './BaseList.svelte';
import KeyboardShortcut from './KeyboardShortcut.svelte';
import HeaderInput from './HeaderInput.svelte';
import MainLayout from './layout/MainLayout.svelte';
import Header from './layout/Header.svelte';

View file

@ -1,26 +1,19 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { type Extension, ExtensionSchema } from '$lib/store';
import Icon from './Icon.svelte';
import { invoke } from '@tauri-apps/api/core';
import ExtensionListView from './extensions/ExtensionListView.svelte';
import ExtensionDetailView from './extensions/ExtensionDetailView.svelte';
import ImageLightbox from './extensions/ImageLightbox.svelte';
import CategoryFilter from './extensions/CategoryFilter.svelte';
import { extensionsStore } from './extensions/store.svelte';
import LoadingIndicator from './LoadingIndicator.svelte';
import type { VListHandle } from 'virtua/svelte';
import HeaderInput from './HeaderInput.svelte';
import { viewManager } from '$lib/viewManager.svelte';
import ExtensionInstallConfirm from './extensions/ExtensionInstallConfirm.svelte';
import { fetch } from '@tauri-apps/plugin-http';
import ActionBar from '$lib/components/nodes/shared/ActionBar.svelte';
import ActionMenu from '$lib/components/nodes/shared/ActionMenu.svelte';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import KeyboardShortcut from '$lib/components/KeyboardShortcut.svelte';
import { openUrl } from '@tauri-apps/plugin-opener';
import { writeText } from '@tauri-apps/plugin-clipboard-manager';
import { keyEventMatches, type KeyboardShortcut as Shortcut } from '$lib/props/actions';
import MainLayout from './layout/MainLayout.svelte';
import Header from './layout/Header.svelte';
import type { ActionDefinition } from './nodes/shared/actions';
@ -158,11 +151,6 @@
}
};
const openInBrowserShortcut: Shortcut = { modifiers: ['opt', 'ctrl'], key: 'o' };
const copyUrlShortcut: Shortcut = { modifiers: ['ctrl'], key: '.' };
const viewReadmeShortcut: Shortcut = { modifiers: ['opt', 'shift', 'ctrl'], key: 'r' };
const viewSourceShortcut: Shortcut = { modifiers: ['shift', 'ctrl'], key: 'o' };
function handleOpenInBrowser() {
if (!selectedListExtension) return;
const { author, name: slug } = selectedListExtension;

View file

@ -1,17 +1,12 @@
<script lang="ts">
import { invoke } from '@tauri-apps/api/core';
import { tick, untrack } from 'svelte';
import { Button } from '$lib/components/ui/button';
import { Trash, Loader2, Folder, File, Copy, ArrowUpRight, Eye } from '@lucide/svelte';
import { Loader2, Folder, File } from '@lucide/svelte';
import ListItemBase from './nodes/shared/ListItemBase.svelte';
import { writeText } from '@tauri-apps/plugin-clipboard-manager';
import { Kbd } from './ui/kbd';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import ActionBar from './nodes/shared/ActionBar.svelte';
import ActionMenu from './nodes/shared/ActionMenu.svelte';
import BaseList from './BaseList.svelte';
import { open } from '@tauri-apps/plugin-shell';
import KeyboardShortcut from './KeyboardShortcut.svelte';
import { focusManager } from '$lib/focus.svelte';
import HeaderInput from './HeaderInput.svelte';
import MainLayout from './layout/MainLayout.svelte';

View file

@ -1,15 +1,10 @@
<script lang="ts">
import { invoke } from '@tauri-apps/api/core';
import { onMount, tick, untrack } from 'svelte';
import { Button } from '$lib/components/ui/button';
import { Trash, Loader2 } from '@lucide/svelte';
import { onMount, untrack } from 'svelte';
import { Loader2 } from '@lucide/svelte';
import ListItemBase from './nodes/shared/ListItemBase.svelte';
import { Kbd } from './ui/kbd';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import ActionBar from './nodes/shared/ActionBar.svelte';
import ActionMenu from './nodes/shared/ActionMenu.svelte';
import BaseList from './BaseList.svelte';
import KeyboardShortcut from './KeyboardShortcut.svelte';
import HeaderInput from './HeaderInput.svelte';
import MainLayout from './layout/MainLayout.svelte';
import Header from './layout/Header.svelte';

View file

@ -1,14 +1,11 @@
<script lang="ts">
import type { Extension, Command as ExtensionCommand } from '$lib/store';
import { Button } from '$lib/components/ui/button';
import { ArrowUpRight } from '@lucide/svelte';
import Icon from '../Icon.svelte';
import { openUrl } from '@tauri-apps/plugin-opener';
import { Separator } from '../ui/separator';
import * as Carousel from '$lib/components/ui/carousel/index.js';
import ActionBar from '$lib/components/nodes/shared/ActionBar.svelte';
import ActionMenu from '../nodes/shared/ActionMenu.svelte';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import * as Popover from '$lib/components/ui/popover/index.js';
import * as Command from '$lib/components/ui/command/index.js';
import aiIcon from '$lib/assets/stars-square-1616x16@2x.png';

View file

@ -4,8 +4,6 @@
import { cn } from '$lib/utils';
import Icon from '../Icon.svelte';
import { mode } from 'mode-watcher';
import { currentMonitor } from '@tauri-apps/api/window';
import { TableOfContents } from '@lucide/svelte';
type Props = {
props: GridItemProps;

View file

@ -1,7 +1,7 @@
<script lang="ts">
import type { UINode } from '$lib/types';
import { useTypedNode } from '$lib/node.svelte';
import { tick, setContext, untrack, getContext } from 'svelte';
import { setContext, untrack, getContext } from 'svelte';
import { ChevronsUpDownIcon } from '@lucide/svelte';
import * as Command from '$lib/components/ui/command';
import * as Popover from '$lib/components/ui/popover';

View file

@ -7,7 +7,6 @@
type Props = {
nodeId: number;
uiTree: Map<number, UINode>;
onDispatch: (instanceId: number, handlerName: string, args: unknown[]) => void;
};
let { nodeId, uiTree }: Props = $props();

View file

@ -1,8 +1,8 @@
<script lang="ts">
import type { UINode } from '$lib/types';
import { useTypedNode } from '$lib/node.svelte';
import { tick, setContext } from 'svelte';
import { ChevronDown, ChevronsUpDown } from '@lucide/svelte';
import { setContext } from 'svelte';
import { ChevronDown } from '@lucide/svelte';
import * as Command from '$lib/components/ui/command';
import * as Popover from '$lib/components/ui/popover';
import { Button } from '$lib/components/ui/button';

View file

@ -1,7 +1,6 @@
<script lang="ts">
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import { Button } from '$lib/components/ui/button';
import { Kbd } from '$lib/components/ui/kbd';
import type { Snippet } from 'svelte';
import KeyboardShortcut from '$lib/components/KeyboardShortcut.svelte';
import { focusManager } from '$lib/focus.svelte';

View file

@ -2,19 +2,16 @@
import type { UINode } from '$lib/types';
import { useTypedNode } from '$lib/node.svelte';
import { getContext } from 'svelte';
import CheckIcon from '@lucide/svelte/icons/check';
import * as Command from '$lib/components/ui/command';
import Icon from '$lib/components/Icon.svelte';
import { cn } from '$lib/utils';
type Props = {
nodeId: number;
uiTree: Map<number, UINode>;
onDispatch: (instanceId: number, handlerName: string, args: unknown[]) => void;
selectedValue?: string;
};
let { nodeId, uiTree, onDispatch, selectedValue }: Props = $props();
let { nodeId, uiTree, onDispatch }: Props = $props();
const { props: componentProps } = $derived.by(
useTypedNode(() => ({
@ -28,12 +25,6 @@
onSelect: (value: string) => void;
displayValue: () => string | undefined;
}>('unified-dropdown');
const isSelected = $derived(
selectedValue
? selectedValue === componentProps?.value
: dropdownContext?.displayValue() === componentProps?.value
);
</script>
{#if componentProps && dropdownContext}

View file

@ -1,15 +1,7 @@
import type {
ActionCopyToClipboardProps,
ActionOpenInBrowserProps,
ActionProps,
componentSchemas,
ComponentType,
Schemas
} from '$lib/props';
import type { ActionCopyToClipboardProps, ActionOpenInBrowserProps, ActionProps } from '$lib/props';
import type { UINode } from '$lib/types';
import { writeText } from '@tauri-apps/plugin-clipboard-manager';
import { openUrl } from '@tauri-apps/plugin-opener';
import z from 'zod/v4';
export type ActionDefinition = ActionProps & { handler?: () => void; disabled?: boolean };

View file

@ -1,6 +1,5 @@
<script lang="ts">
import { Command as CommandPrimitive } from 'bits-ui';
import SearchIcon from '@lucide/svelte/icons/search';
import { cn } from '$lib/utils.js';
let {