From 0686d83b21b3913dca5c1d03d5a6e31722beae50 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 18 Jun 2025 22:42:00 +0200 Subject: [PATCH 1/2] clan-app: 3d UI Remove unused files and exports --- pkgs/clan-app/ui/knip.json | 19 +++++++ pkgs/clan-app/ui/package.json | 4 +- pkgs/clan-app/ui/src/Form/base/index.tsx | 4 +- .../ui/src/Form/fields/FormSection.tsx | 2 +- pkgs/clan-app/ui/src/Form/fields/Select.tsx | 2 +- pkgs/clan-app/ui/src/Form/form/index.tsx | 14 ++--- pkgs/clan-app/ui/src/api/index.tsx | 18 +++---- pkgs/clan-app/ui/src/api/wifi.ts | 20 ------- .../ui/src/components/Button/Button.tsx | 2 +- .../ui/src/components/SelectInput.tsx | 54 ------------------- .../ui/src/components/Sidebar/index.tsx | 2 +- .../ui/src/components/TagList/TagList.tsx | 2 +- .../ui/src/components/Typography/index.tsx | 2 +- .../ui/src/components/group/index.tsx | 2 +- .../src/components/noiseThumbnail/index.tsx | 2 +- .../ui/src/components/toast/index.tsx | 4 +- pkgs/clan-app/ui/src/components/v2/index.css | 3 +- pkgs/clan-app/ui/src/floating/index.tsx | 4 +- pkgs/clan-app/ui/src/hooks/index.ts | 2 +- pkgs/clan-app/ui/src/index.css | 3 +- pkgs/clan-app/ui/src/queries/index.ts | 2 +- pkgs/clan-app/ui/src/routes/colors/view.tsx | 13 ----- pkgs/clan-app/ui/src/routes/deploy/index.tsx | 6 --- pkgs/clan-app/ui/src/routes/disk/view.tsx | 31 ----------- pkgs/clan-app/ui/src/routes/flash/view.tsx | 2 +- .../src/routes/machines/install/vars-step.tsx | 4 +- pkgs/clan-app/ui/src/routes/modules/add.tsx | 2 +- .../ui/src/routes/modules/details.tsx | 2 +- pkgs/clan-app/ui/src/stores/clan.tsx | 1 - 29 files changed, 60 insertions(+), 168 deletions(-) create mode 100644 pkgs/clan-app/ui/knip.json delete mode 100644 pkgs/clan-app/ui/src/api/wifi.ts delete mode 100644 pkgs/clan-app/ui/src/components/SelectInput.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/colors/view.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/deploy/index.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/disk/view.tsx diff --git a/pkgs/clan-app/ui/knip.json b/pkgs/clan-app/ui/knip.json new file mode 100644 index 000000000..1104209f2 --- /dev/null +++ b/pkgs/clan-app/ui/knip.json @@ -0,0 +1,19 @@ +{ + "ignore": [ + "gtk.webview.js", + "stylelint.config.js", + "util.ts", + "src/components/v2/**", + "api/**", + "tailwind/**" + ], + "ignoreDependencies": [ + "@babel/plugin-syntax-import-attributes", + "@storybook/addon-viewport", + "@typescript-eslint/parser", + "@vitest/coverage-v8", + "http-server", + "playwright", + "wait-on" + ] +} diff --git a/pkgs/clan-app/ui/package.json b/pkgs/clan-app/ui/package.json index 25ea99623..be1dd4531 100644 --- a/pkgs/clan-app/ui/package.json +++ b/pkgs/clan-app/ui/package.json @@ -12,6 +12,7 @@ "check": "tsc --noEmit --skipLibCheck && eslint ./src", "test": "vitest run --project unit --typecheck", "storybook": "storybook", + "knip": "knip", "storybook-build": "storybook build", "storybook-dev": "storybook dev -p 6006", "test-storybook": "vitest run --project storybook", @@ -43,6 +44,7 @@ "eslint-plugin-tailwindcss": "^3.17.0", "http-server": "^14.1.1", "jsdom": "^26.1.0", + "knip": "^5.61.2", "playwright": "~1.52.0", "postcss": "^8.4.38", "postcss-url": "^10.1.3", @@ -68,10 +70,8 @@ "@tanstack/eslint-plugin-query": "^5.51.12", "@tanstack/solid-query": "^5.76.0", "corvu": "^0.7.1", - "material-icons": "^1.13.12", "nanoid": "^5.0.7", "solid-js": "^1.9.7", - "solid-markdown": "^2.0.13", "solid-toast": "^0.5.0", "three": "^0.176.0" }, diff --git a/pkgs/clan-app/ui/src/Form/base/index.tsx b/pkgs/clan-app/ui/src/Form/base/index.tsx index ba62cd2c9..1d1a76095 100644 --- a/pkgs/clan-app/ui/src/Form/base/index.tsx +++ b/pkgs/clan-app/ui/src/Form/base/index.tsx @@ -6,7 +6,7 @@ import type { } from "@floating-ui/dom"; import { computePosition } from "@floating-ui/dom"; -export interface UseFloatingOptions< +interface UseFloatingOptions< R extends ReferenceElement, F extends HTMLElement, > extends Partial { @@ -23,7 +23,7 @@ interface UseFloatingState extends Omit { y?: number | null; } -export interface UseFloatingResult extends UseFloatingState { +interface UseFloatingResult extends UseFloatingState { update(): void; } diff --git a/pkgs/clan-app/ui/src/Form/fields/FormSection.tsx b/pkgs/clan-app/ui/src/Form/fields/FormSection.tsx index d3633f0b2..66a17717d 100644 --- a/pkgs/clan-app/ui/src/Form/fields/FormSection.tsx +++ b/pkgs/clan-app/ui/src/Form/fields/FormSection.tsx @@ -3,6 +3,6 @@ import { JSX } from "solid-js"; interface FormSectionProps { children: JSX.Element; } -export const FormSection = (props: FormSectionProps) => { +const FormSection = (props: FormSectionProps) => { return
{props.children}
; }; diff --git a/pkgs/clan-app/ui/src/Form/fields/Select.tsx b/pkgs/clan-app/ui/src/Form/fields/Select.tsx index 727f62f62..88522f8cf 100644 --- a/pkgs/clan-app/ui/src/Form/fields/Select.tsx +++ b/pkgs/clan-app/ui/src/Form/fields/Select.tsx @@ -21,7 +21,7 @@ import { FieldLayout } from "./layout"; import Icon from "@/src/components/icon"; import { useContext } from "corvu/dialog"; -export interface Option { +interface Option { value: string; label: string; disabled?: boolean; diff --git a/pkgs/clan-app/ui/src/Form/form/index.tsx b/pkgs/clan-app/ui/src/Form/form/index.tsx index f4e1b038c..031ca927d 100644 --- a/pkgs/clan-app/ui/src/Form/form/index.tsx +++ b/pkgs/clan-app/ui/src/Form/form/index.tsx @@ -139,7 +139,7 @@ interface SchemaFieldsProps { readonly: boolean; parent: JSONSchema7; } -export function SchemaFields( +function SchemaFields( props: SchemaFieldsProps, ) { return ( @@ -172,7 +172,7 @@ export function SchemaFields( ); } -export function StringField( +function StringField( props: SchemaFieldsProps, ) { if ( @@ -325,7 +325,7 @@ export function StringField( interface OptionSchemaProps { itemSpec: JSONSchema7Type; } -export function OptionSchema(props: OptionSchemaProps) { +function OptionSchema(props: OptionSchemaProps) { return ( Item spec unhandled} @@ -344,7 +344,7 @@ interface ValueDisplayProps idx: number; of: number; } -export function ListValueDisplay( +function ListValueDisplay( props: ValueDisplayProps, ) { const removeItem = (e: Event) => { @@ -446,7 +446,7 @@ const OnlyStringItems = (props: OnlyStringItems) => { ); }; -export function ArrayFields( +function ArrayFields( props: SchemaFieldsProps, ) { if (props.schema.type !== "array") { @@ -711,7 +711,7 @@ interface ObjectFieldPropertyLabelProps { schema: JSONSchema7; fallback: JSX.Element; } -export function ObjectFieldPropertyLabel(props: ObjectFieldPropertyLabelProps) { +function ObjectFieldPropertyLabel(props: ObjectFieldPropertyLabelProps) { return ( {/* @ts-expect-error: $exportedModuleInfo should exist since we export it */} @@ -722,7 +722,7 @@ export function ObjectFieldPropertyLabel(props: ObjectFieldPropertyLabelProps) { ); } -export function ObjectFields( +function ObjectFields( props: SchemaFieldsProps, ) { if (props.schema.type !== "object") { diff --git a/pkgs/clan-app/ui/src/api/index.tsx b/pkgs/clan-app/ui/src/api/index.tsx index 531448f53..a51fa07b8 100644 --- a/pkgs/clan-app/ui/src/api/index.tsx +++ b/pkgs/clan-app/ui/src/api/index.tsx @@ -7,11 +7,11 @@ import { ErrorToastComponent, CancelToastComponent, } from "@/src/components/toast"; -export type OperationNames = keyof API; +type OperationNames = keyof API; export type OperationArgs = API[T]["arguments"]; export type OperationResponse = API[T]["return"]; -export type ApiEnvelope = +type ApiEnvelope = | { status: "success"; data: T; @@ -19,9 +19,9 @@ export type ApiEnvelope = } | ApiError; -export type Services = NonNullable; -export type ServiceNames = keyof Services; -export type ClanService = Services[T]; +type Services = NonNullable; +type ServiceNames = keyof Services; +type ClanService = Services[T]; export type ClanServiceInstance = NonNullable< Services[T] >[string]; @@ -32,15 +32,15 @@ export type SuccessQuery = Extract< >; export type SuccessData = SuccessQuery["data"]; -export type ErrorQuery = Extract< +type ErrorQuery = Extract< OperationResponse, { status: "error" } >; -export type ErrorData = ErrorQuery["errors"]; +type ErrorData = ErrorQuery["errors"]; -export type ClanOperations = Record void>; +type ClanOperations = Record void>; -export interface GtkResponse { +interface GtkResponse { result: T; op_key: string; } diff --git a/pkgs/clan-app/ui/src/api/wifi.ts b/pkgs/clan-app/ui/src/api/wifi.ts deleted file mode 100644 index 8e84776e2..000000000 --- a/pkgs/clan-app/ui/src/api/wifi.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { callApi } from "."; -import { Schema as Inventory } from "@/api/Inventory"; - -export const instance_name = (machine_name: string) => - `${machine_name}_wifi_0` as const; - -export async function get_iwd_service(base_path: string, machine_name: string) { - const r = await callApi("get_inventory", { - flake: { identifier: base_path }, - }).promise; - if (r.status == "error") { - return null; - } - // @FIXME: Clean this up once we implement the feature - // @ts-expect-error: This doesn't check currently - const inventory: Inventory = r.data; - - const instance_key = instance_name(machine_name); - return inventory.services?.iwd?.[instance_key] || null; -} diff --git a/pkgs/clan-app/ui/src/components/Button/Button.tsx b/pkgs/clan-app/ui/src/components/Button/Button.tsx index 4d7e55e76..1895e2246 100644 --- a/pkgs/clan-app/ui/src/components/Button/Button.tsx +++ b/pkgs/clan-app/ui/src/components/Button/Button.tsx @@ -42,7 +42,7 @@ const sizeFont: Record = { s: cx("text-[0.75rem]"), }; -export interface ButtonProps +interface ButtonProps extends JSX.ButtonHTMLAttributes { variant?: Variants; size?: Size; diff --git a/pkgs/clan-app/ui/src/components/SelectInput.tsx b/pkgs/clan-app/ui/src/components/SelectInput.tsx deleted file mode 100644 index 9d8ea3d10..000000000 --- a/pkgs/clan-app/ui/src/components/SelectInput.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { FieldValues, FormStore, ResponseData } from "@modular-forms/solid"; -import { Show } from "solid-js"; -import { type JSX } from "solid-js"; -import cx from "classnames"; - -interface SelectInputProps { - formStore: FormStore; - value: string; - options: JSX.Element; - selectProps: JSX.HTMLAttributes; - label: JSX.Element; - error?: string; - required?: boolean; - topRightLabel?: JSX.Element; - class?: string; -} - -export function SelectInput( - props: SelectInputProps, -) { - return ( - - ); -} diff --git a/pkgs/clan-app/ui/src/components/Sidebar/index.tsx b/pkgs/clan-app/ui/src/components/Sidebar/index.tsx index f527e8847..8d062cf73 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/index.tsx +++ b/pkgs/clan-app/ui/src/components/Sidebar/index.tsx @@ -8,7 +8,7 @@ import "./css/sidebar.css"; import Icon, { IconVariant } from "../icon"; import { clanMetaQuery } from "@/src/queries/clan-meta"; -export const SidebarSection = (props: { +const SidebarSection = (props: { title: string; icon: IconVariant; children: JSX.Element; diff --git a/pkgs/clan-app/ui/src/components/TagList/TagList.tsx b/pkgs/clan-app/ui/src/components/TagList/TagList.tsx index ff039ceaa..78d6ea193 100644 --- a/pkgs/clan-app/ui/src/components/TagList/TagList.tsx +++ b/pkgs/clan-app/ui/src/components/TagList/TagList.tsx @@ -2,7 +2,7 @@ import { Component, For } from "solid-js"; import { Typography } from "@/src/components/Typography"; import "./TagList.css"; -export interface TagListProps { +interface TagListProps { values: string[]; } diff --git a/pkgs/clan-app/ui/src/components/Typography/index.tsx b/pkgs/clan-app/ui/src/components/Typography/index.tsx index 994ffd104..63c2f9e04 100644 --- a/pkgs/clan-app/ui/src/components/Typography/index.tsx +++ b/pkgs/clan-app/ui/src/components/Typography/index.tsx @@ -3,7 +3,7 @@ import { Dynamic } from "solid-js/web"; import cx from "classnames"; import "./css/typography.css"; -export type Hierarchy = "body" | "title" | "headline" | "label"; +type Hierarchy = "body" | "title" | "headline" | "label"; type Color = "primary" | "secondary" | "tertiary"; type Weight = "normal" | "medium" | "bold"; type Tag = "span" | "p" | "h1" | "h2" | "h3" | "h4" | "div"; diff --git a/pkgs/clan-app/ui/src/components/group/index.tsx b/pkgs/clan-app/ui/src/components/group/index.tsx index ff0437271..22297e340 100644 --- a/pkgs/clan-app/ui/src/components/group/index.tsx +++ b/pkgs/clan-app/ui/src/components/group/index.tsx @@ -12,7 +12,7 @@ export const Group = (props: GroupProps) => ( ); -export type SectionVariant = "attention" | "danger"; +type SectionVariant = "attention" | "danger"; interface SectionHeaderProps { variant: SectionVariant; diff --git a/pkgs/clan-app/ui/src/components/noiseThumbnail/index.tsx b/pkgs/clan-app/ui/src/components/noiseThumbnail/index.tsx index 66c122bea..e779c6b12 100644 --- a/pkgs/clan-app/ui/src/components/noiseThumbnail/index.tsx +++ b/pkgs/clan-app/ui/src/components/noiseThumbnail/index.tsx @@ -108,7 +108,7 @@ export const RndThumbnail = (props: RndThumbnailProps) => { return {props.name}; }; -export const RndThumbnailShow = () => { +const RndThumbnailShow = () => { const names = ["hsjobeki", "mic92", "lassulus", "D", "A", "D", "B", "C"]; return ( diff --git a/pkgs/clan-app/ui/src/components/toast/index.tsx b/pkgs/clan-app/ui/src/components/toast/index.tsx index 4a2b66154..ef1729f9f 100644 --- a/pkgs/clan-app/ui/src/components/toast/index.tsx +++ b/pkgs/clan-app/ui/src/components/toast/index.tsx @@ -68,7 +68,7 @@ const WarningIcon: Component = () => ( // --- Base Props and Styles --- -export interface BaseToastProps { +interface BaseToastProps { t: Toast; message: string; onCancel?: () => void; // Optional custom function on X click @@ -254,7 +254,7 @@ export const CancelToastComponent: Component = (props) => { }; // Warning Toast -export const WarningToastComponent: Component = (props) => { +const WarningToastComponent: Component = (props) => { let timeoutId: number | undefined; const [clicked, setClicked] = createSignal(false); const [exiting, setExiting] = createSignal(false); diff --git a/pkgs/clan-app/ui/src/components/v2/index.css b/pkgs/clan-app/ui/src/components/v2/index.css index 35bb1af02..c1e6f9ddc 100644 --- a/pkgs/clan-app/ui/src/components/v2/index.css +++ b/pkgs/clan-app/ui/src/components/v2/index.css @@ -1,5 +1,4 @@ -@import "material-icons/iconfont/filled.css"; -/* List of icons: https://marella.me/material-icons/demo/ */ +/* Material icons removed - using custom icons */ /* @import url(./components/Typography/css/typography.css); */ @tailwind base; diff --git a/pkgs/clan-app/ui/src/floating/index.tsx b/pkgs/clan-app/ui/src/floating/index.tsx index ba62cd2c9..1d1a76095 100644 --- a/pkgs/clan-app/ui/src/floating/index.tsx +++ b/pkgs/clan-app/ui/src/floating/index.tsx @@ -6,7 +6,7 @@ import type { } from "@floating-ui/dom"; import { computePosition } from "@floating-ui/dom"; -export interface UseFloatingOptions< +interface UseFloatingOptions< R extends ReferenceElement, F extends HTMLElement, > extends Partial { @@ -23,7 +23,7 @@ interface UseFloatingState extends Omit { y?: number | null; } -export interface UseFloatingResult extends UseFloatingState { +interface UseFloatingResult extends UseFloatingState { update(): void; } diff --git a/pkgs/clan-app/ui/src/hooks/index.ts b/pkgs/clan-app/ui/src/hooks/index.ts index 6a7735e68..b197821fd 100644 --- a/pkgs/clan-app/ui/src/hooks/index.ts +++ b/pkgs/clan-app/ui/src/hooks/index.ts @@ -23,7 +23,7 @@ export const registerClan = async () => { * Opens the custom file dialog * Returns a native FileList to allow interaction with the native input type="file" */ -export const selectSshKeys = async (): Promise => { +const selectSshKeys = async (): Promise => { const dataTransfer = new DataTransfer(); const response = await callApi("open_file", { diff --git a/pkgs/clan-app/ui/src/index.css b/pkgs/clan-app/ui/src/index.css index e645ad29d..4c68000e8 100644 --- a/pkgs/clan-app/ui/src/index.css +++ b/pkgs/clan-app/ui/src/index.css @@ -1,5 +1,4 @@ -@import "material-icons/iconfont/filled.css"; -/* List of icons: https://marella.me/material-icons/demo/ */ +/* Material icons removed - using custom icons */ /* @import url(./components/Typography/css/typography.css); */ @tailwind base; diff --git a/pkgs/clan-app/ui/src/queries/index.ts b/pkgs/clan-app/ui/src/queries/index.ts index 85cabd5de..7c442999d 100644 --- a/pkgs/clan-app/ui/src/queries/index.ts +++ b/pkgs/clan-app/ui/src/queries/index.ts @@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/solid-query"; import { callApi } from "../api"; import toast from "solid-toast"; -export interface ModulesFilter { +interface ModulesFilter { features: string[]; } export const createModulesQuery = ( diff --git a/pkgs/clan-app/ui/src/routes/colors/view.tsx b/pkgs/clan-app/ui/src/routes/colors/view.tsx deleted file mode 100644 index 465c18563..000000000 --- a/pkgs/clan-app/ui/src/routes/colors/view.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export const colors = () => { - return ( -
-
red
-
green
-
blue
-
yellow
-
purple
-
cyan
-
pink
-
- ); -}; diff --git a/pkgs/clan-app/ui/src/routes/deploy/index.tsx b/pkgs/clan-app/ui/src/routes/deploy/index.tsx deleted file mode 100644 index dc19d723c..000000000 --- a/pkgs/clan-app/ui/src/routes/deploy/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { callApi } from "@/src/api"; -import { createQuery } from "@tanstack/solid-query"; - -export const Deploy = () => { - return
Deloy view
; -}; diff --git a/pkgs/clan-app/ui/src/routes/disk/view.tsx b/pkgs/clan-app/ui/src/routes/disk/view.tsx deleted file mode 100644 index 7d02b2aa3..000000000 --- a/pkgs/clan-app/ui/src/routes/disk/view.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { callApi } from "@/src/api"; -import { useQuery } from "@tanstack/solid-query"; -import { useClanContext } from "@/src/contexts/clan"; - -export function DiskView() { - const { activeClanURI } = useClanContext(); - - const query = useQuery(() => ({ - queryKey: ["disk", activeClanURI()], - queryFn: async () => { - const currUri = activeClanURI(); - if (currUri) { - // Example of calling an API - const result = await callApi("get_inventory", { - flake: { identifier: currUri }, - }).promise; - if (result.status === "error") throw new Error("Failed to fetch data"); - return result.data; - } - }, - })); - return ( -
-

Configure Disk

-

- Select machine then configure the disk. Required before installing for - the first time. -

-
- ); -} diff --git a/pkgs/clan-app/ui/src/routes/flash/view.tsx b/pkgs/clan-app/ui/src/routes/flash/view.tsx index a7b0c226d..d33e37e95 100644 --- a/pkgs/clan-app/ui/src/routes/flash/view.tsx +++ b/pkgs/clan-app/ui/src/routes/flash/view.tsx @@ -34,7 +34,7 @@ interface Wifi extends FieldValues { password: string; } -export interface FlashFormValues extends FieldValues { +interface FlashFormValues extends FieldValues { machine: { devicePath: string; flake: string; diff --git a/pkgs/clan-app/ui/src/routes/machines/install/vars-step.tsx b/pkgs/clan-app/ui/src/routes/machines/install/vars-step.tsx index 887852cb1..6045bfb78 100644 --- a/pkgs/clan-app/ui/src/routes/machines/install/vars-step.tsx +++ b/pkgs/clan-app/ui/src/routes/machines/install/vars-step.tsx @@ -19,7 +19,7 @@ import { useClanContext } from "@/src/contexts/clan"; export type VarsValues = FieldValues & Record>; -export interface VarsFormProps { +interface VarsFormProps { machine_id: string; dir: string; handleSubmit: SubmitHandler; @@ -27,7 +27,7 @@ export interface VarsFormProps { footer: JSX.Element; } -export const VarsForm = (props: VarsFormProps) => { +const VarsForm = (props: VarsFormProps) => { const [formStore, { Form, Field }] = createForm({}); const handleSubmit: SubmitHandler = async (values, event) => { diff --git a/pkgs/clan-app/ui/src/routes/modules/add.tsx b/pkgs/clan-app/ui/src/routes/modules/add.tsx index c11f045e0..d732312ee 100644 --- a/pkgs/clan-app/ui/src/routes/modules/add.tsx +++ b/pkgs/clan-app/ui/src/routes/modules/add.tsx @@ -32,7 +32,7 @@ interface AddModuleProps { id: string; } -export const AddModule = (props: AddModuleProps) => { +const AddModule = (props: AddModuleProps) => { const { activeClanURI } = useClanContext(); const tags = tagsQuery(activeClanURI()); const machines = machinesQuery(activeClanURI()); diff --git a/pkgs/clan-app/ui/src/routes/modules/details.tsx b/pkgs/clan-app/ui/src/routes/modules/details.tsx index f2fa04aa5..de8b35f9f 100644 --- a/pkgs/clan-app/ui/src/routes/modules/details.tsx +++ b/pkgs/clan-app/ui/src/routes/modules/details.tsx @@ -140,7 +140,7 @@ interface SchemaFormProps { path: string[]; } -export const ModuleForm = (props: { id: string }) => { +const ModuleForm = (props: { id: string }) => { // TODO: Fetch the synced schema for all the modules at runtime // We use static schema file at build time for now. (Different versions might have different schema at runtime) const schemaQuery = createQuery(() => ({ diff --git a/pkgs/clan-app/ui/src/stores/clan.tsx b/pkgs/clan-app/ui/src/stores/clan.tsx index 43c545ae8..0cb0747df 100644 --- a/pkgs/clan-app/ui/src/stores/clan.tsx +++ b/pkgs/clan-app/ui/src/stores/clan.tsx @@ -80,7 +80,6 @@ const removeClanURI = (uri: string) => { export { store, - setStore, activeClanURI, setActiveClanURI, clanURIs, From 109f7c40cd5719c8a3b51b131aac7a989a6acb19 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Thu, 19 Jun 2025 15:14:08 +0200 Subject: [PATCH 2/2] clan-app: Add unused import checker and autofixer. Remove unused files. --- pkgs/clan-app/ui/eslint.config.mjs | 5 + pkgs/clan-app/ui/package-lock.json | 1211 +---------------- pkgs/clan-app/ui/package.json | 8 +- pkgs/clan-app/ui/src/Form/base/index.tsx | 127 -- pkgs/clan-app/ui/src/Form/base/label.tsx | 15 - pkgs/clan-app/ui/src/Form/fields/Select.tsx | 274 ---- .../clan-app/ui/src/Form/fields/TextInput.tsx | 1 - pkgs/clan-app/ui/src/Form/fieldset/index.tsx | 32 - pkgs/clan-app/ui/src/Form/form/index.tsx | 928 ------------- pkgs/clan-app/ui/src/api/index.tsx | 10 +- pkgs/clan-app/ui/src/api_test.tsx | 8 +- .../ui/src/components/Button/Button.tsx | 3 +- pkgs/clan-app/ui/src/components/FileInput.tsx | 100 -- pkgs/clan-app/ui/src/components/Menu.tsx | 84 -- .../ui/src/components/TagList/TagList.css | 7 - .../ui/src/components/TagList/TagList.tsx | 21 - .../ui/src/components/accordion/accordion.css | 10 - .../ui/src/components/accordion/index.tsx | 45 - .../ui/src/components/badge/index.tsx | 39 - .../ui/src/components/fileSelect/index.tsx | 194 --- .../ui/src/components/group/index.tsx | 60 - .../ui/src/components/inputBase/index.tsx | 3 +- .../machine-list-item/css/index.css | 76 -- .../components/machine-list-item/index.tsx | 180 --- .../ui/src/components/modal/index.tsx | 134 -- .../src/components/noiseThumbnail/index.tsx | 119 -- pkgs/clan-app/ui/src/contexts/clan.tsx | 1 - pkgs/clan-app/ui/src/floating/index.tsx | 6 +- pkgs/clan-app/ui/src/index.tsx | 78 +- pkgs/clan-app/ui/src/queries/index.ts | 76 -- pkgs/clan-app/ui/src/routes/clans/details.tsx | 17 +- pkgs/clan-app/ui/src/routes/flash/view.tsx | 438 ------ .../ui/src/routes/machines/avatar.tsx | 22 - .../ui/src/routes/machines/create.tsx | 192 --- .../ui/src/routes/machines/details.tsx | 804 ----------- pkgs/clan-app/ui/src/routes/machines/index.ts | 3 - .../src/routes/machines/install/disk-step.tsx | 130 -- .../routes/machines/install/hardware-step.tsx | 261 ---- .../routes/machines/install/summary-step.tsx | 108 -- .../src/routes/machines/install/vars-step.tsx | 251 ---- pkgs/clan-app/ui/src/routes/machines/list.tsx | 215 --- pkgs/clan-app/ui/src/routes/modules/add.tsx | 118 -- .../ui/src/routes/modules/details.tsx | 196 --- pkgs/clan-app/ui/src/routes/modules/list.tsx | 216 --- pkgs/clan-app/ui/src/three.tsx | 2 +- 45 files changed, 54 insertions(+), 6774 deletions(-) delete mode 100644 pkgs/clan-app/ui/src/Form/base/index.tsx delete mode 100644 pkgs/clan-app/ui/src/Form/base/label.tsx delete mode 100644 pkgs/clan-app/ui/src/Form/fields/Select.tsx delete mode 100644 pkgs/clan-app/ui/src/Form/fieldset/index.tsx delete mode 100644 pkgs/clan-app/ui/src/Form/form/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/FileInput.tsx delete mode 100644 pkgs/clan-app/ui/src/components/Menu.tsx delete mode 100644 pkgs/clan-app/ui/src/components/TagList/TagList.css delete mode 100644 pkgs/clan-app/ui/src/components/TagList/TagList.tsx delete mode 100644 pkgs/clan-app/ui/src/components/accordion/accordion.css delete mode 100644 pkgs/clan-app/ui/src/components/accordion/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/badge/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/fileSelect/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/group/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/machine-list-item/css/index.css delete mode 100644 pkgs/clan-app/ui/src/components/machine-list-item/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/modal/index.tsx delete mode 100644 pkgs/clan-app/ui/src/components/noiseThumbnail/index.tsx delete mode 100644 pkgs/clan-app/ui/src/queries/index.ts delete mode 100644 pkgs/clan-app/ui/src/routes/flash/view.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/avatar.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/create.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/details.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/index.ts delete mode 100644 pkgs/clan-app/ui/src/routes/machines/install/disk-step.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/install/hardware-step.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/install/summary-step.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/install/vars-step.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/machines/list.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/modules/add.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/modules/details.tsx delete mode 100644 pkgs/clan-app/ui/src/routes/modules/list.tsx diff --git a/pkgs/clan-app/ui/eslint.config.mjs b/pkgs/clan-app/ui/eslint.config.mjs index 44b2bae56..9a6e42be1 100644 --- a/pkgs/clan-app/ui/eslint.config.mjs +++ b/pkgs/clan-app/ui/eslint.config.mjs @@ -3,6 +3,7 @@ import tseslint from "typescript-eslint"; import tailwind from "eslint-plugin-tailwindcss"; import pluginQuery from "@tanstack/eslint-plugin-query"; import { globalIgnores } from "eslint/config"; +import unusedImports from "eslint-plugin-unused-imports"; const config = tseslint.config( eslint.configs.recommended, @@ -12,6 +13,9 @@ const config = tseslint.config( ...tailwind.configs["flat/recommended"], globalIgnores(["src/types/index.d.ts"]), { + plugins: { + "unused-imports": unusedImports, + }, rules: { "tailwindcss/no-contradicting-classname": [ "error", @@ -29,6 +33,7 @@ const config = tseslint.config( // TODO: make this more strict by removing later "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": "off", + "unused-imports/no-unused-imports": "warn", "@typescript-eslint/no-non-null-assertion": "off", }, }, diff --git a/pkgs/clan-app/ui/package-lock.json b/pkgs/clan-app/ui/package-lock.json index 9d37be13f..8cc139410 100644 --- a/pkgs/clan-app/ui/package-lock.json +++ b/pkgs/clan-app/ui/package-lock.json @@ -17,11 +17,7 @@ "@solidjs/router": "^0.15.3", "@tanstack/eslint-plugin-query": "^5.51.12", "@tanstack/solid-query": "^5.76.0", - "corvu": "^0.7.1", - "material-icons": "^1.13.12", - "nanoid": "^5.0.7", "solid-js": "^1.9.7", - "solid-markdown": "^2.0.13", "solid-toast": "^0.5.0", "three": "^0.176.0" }, @@ -36,7 +32,6 @@ "@storybook/addon-viewport": "^9.0.8", "@storybook/addon-vitest": "^9.0.8", "@tailwindcss/typography": "^0.5.13", - "@types/json-schema": "^7.0.15", "@types/node": "^22.15.19", "@types/three": "^0.176.0", "@typescript-eslint/parser": "^8.32.1", @@ -47,6 +42,7 @@ "concurrently": "^9.1.2", "eslint": "^9.27.0", "eslint-plugin-tailwindcss": "^3.17.0", + "eslint-plugin-unused-imports": "^4.1.4", "http-server": "^14.1.1", "jsdom": "^26.1.0", "knip": "^5.61.2", @@ -434,177 +430,6 @@ "node": ">=18" } }, - "node_modules/@corvu/accordion": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@corvu/accordion/-/accordion-0.2.5.tgz", - "integrity": "sha512-oBZKDZZNN5mirmilSzWSrY+7PQGHQbXAlWm1SOvG1AAsIeX5osUdQnKjH0XzlkkAxCLKHb41178W4YNNPqH0PA==", - "license": "MIT", - "dependencies": { - "@corvu/disclosure": "~0.2.2", - "@corvu/utils": "~0.4.2", - "solid-list": "~0.3.0" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/calendar": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@corvu/calendar/-/calendar-0.1.2.tgz", - "integrity": "sha512-Vbdns1iNNI0WTIwDZS7m9pHWtr/YTz7yrisXhHUCfl4mxDvb9W8MMmun651wiEjhL7+OrcNbbl2kTOmYSFIf4g==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/dialog": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@corvu/dialog/-/dialog-0.2.4.tgz", - "integrity": "sha512-n54vJq+fOy8GVrnYBdJpD6JXNuyx7LOeMrRxwzAvZnYGpW8+AA12tnb/P/2emJj/HjOO5otheGKb0breshdFlA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2", - "solid-dismissible": "~0.1.1", - "solid-focus-trap": "~0.1.8", - "solid-presence": "~0.2.0", - "solid-prevent-scroll": "~0.1.10" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/dialog/node_modules/solid-presence": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/solid-presence/-/solid-presence-0.2.0.tgz", - "integrity": "sha512-YM92o+jvpzX3XGaD4rLYmq/Kc2ZVh47GSCLEufHBFQQIurvZTs8SoGJxO8BJGNDxBKdcS8F3dYhW1SDXp4BNjA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/disclosure": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@corvu/disclosure/-/disclosure-0.2.2.tgz", - "integrity": "sha512-d2E9zS0w9peeOiBDc8/ZcqS56ZeOIiKJcwMFpLjuhlfrtVAepwyhbwFHNQTb48VeRHW8amfrGliymT//VQFF9g==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2", - "solid-presence": "~0.2.0" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/disclosure/node_modules/solid-presence": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/solid-presence/-/solid-presence-0.2.0.tgz", - "integrity": "sha512-YM92o+jvpzX3XGaD4rLYmq/Kc2ZVh47GSCLEufHBFQQIurvZTs8SoGJxO8BJGNDxBKdcS8F3dYhW1SDXp4BNjA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/drawer": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@corvu/drawer/-/drawer-0.2.4.tgz", - "integrity": "sha512-7jQoGZ8ROB9CmXam2nMY2wEskU3IoFwZQywkF/7vrBc/edGsPv7mOVQ1GN6G+4nd7nrMZ3UtqHAhmRh9V0azlw==", - "license": "MIT", - "dependencies": { - "@corvu/dialog": "~0.2.4", - "@corvu/utils": "~0.4.2", - "@solid-primitives/memo": "^1.4.1", - "solid-transition-size": "~0.1.4" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/otp-field": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@corvu/otp-field/-/otp-field-0.1.4.tgz", - "integrity": "sha512-3eG7OoUt6CfVqGujIYfqImdrhGR/s4DpKr5ZQT10zzw3nawIlcwVpqoHTam0v4cgv+NXXvl6I8DoA3J+WgW2YA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/popover": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@corvu/popover/-/popover-0.2.0.tgz", - "integrity": "sha512-zynRWyRV7mk2uX7t/COQL4OEa6H6FBgOxxlXLQJ1BV8hTiBJwmfAN/yB/9jy+zlp0G9vp64E8VdsNn6gxUEUEQ==", - "license": "MIT", - "dependencies": { - "@corvu/dialog": "~0.2.0", - "@corvu/utils": "~0.3.0", - "@floating-ui/dom": "^1.6.5" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/popover/node_modules/@corvu/utils": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@corvu/utils/-/utils-0.3.2.tgz", - "integrity": "sha512-ZWlyWEE8qV9+CB9OAyo2bTrZGXQN9ZeM+JfYv89zoR+lRACKTDuoOZEdiyL8Uc7U5dUSH1uTqKhTTnaHWb+wZA==", - "license": "MIT", - "dependencies": { - "@floating-ui/dom": "^1.6.7" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/resizable": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@corvu/resizable/-/resizable-0.2.5.tgz", - "integrity": "sha512-psax38DraM9SXtaNh/sfvizGO6xLCL4sqT4rWYlMZP5ZsUM05Q30tvXgnTo2roQFNOz2e06WofhDsBXTjY6g4A==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/tooltip": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@corvu/tooltip/-/tooltip-0.2.2.tgz", - "integrity": "sha512-gyOBJ43GNAecDtmWc68A5YJvifXWwK0VZZdTOcFbX0rVQUA2ihBMltRE4oj7/lKidg2gXALjmFr71Blt5s3YuQ==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2", - "@floating-ui/dom": "^1.6.13", - "solid-dismissible": "~0.1.1", - "solid-presence": "~0.2.0" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/@corvu/tooltip/node_modules/solid-presence": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/solid-presence/-/solid-presence-0.2.0.tgz", - "integrity": "sha512-YM92o+jvpzX3XGaD4rLYmq/Kc2ZVh47GSCLEufHBFQQIurvZTs8SoGJxO8BJGNDxBKdcS8F3dYhW1SDXp4BNjA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, "node_modules/@corvu/utils": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@corvu/utils/-/utils-0.4.2.tgz", @@ -2074,19 +1899,6 @@ "solid-js": "^1.6.12" } }, - "node_modules/@solid-primitives/memo": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@solid-primitives/memo/-/memo-1.4.2.tgz", - "integrity": "sha512-1w2MoD/25tZOImCI+dEL08n8dyyc6sg6o0zc14sZXBBa4XSz6TDuPYgQ24r+dQerXWoP6OgZ1VZz+Mo7c1Lmvg==", - "license": "MIT", - "dependencies": { - "@solid-primitives/scheduled": "^1.5.1", - "@solid-primitives/utils": "^6.3.1" - }, - "peerDependencies": { - "solid-js": "^1.6.12" - } - }, "node_modules/@solid-primitives/props": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@solid-primitives/props/-/props-3.2.1.tgz", @@ -2142,6 +1954,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/@solid-primitives/scheduled/-/scheduled-1.5.1.tgz", "integrity": "sha512-WKg/zvAyDIgQ/Xo48YaUY7ISaPyWTZNDzIVWP2R84CuLH+nZN/2O0aFn/gQlWY6y/Bfi/LdDt6Og2/PRzPY7mA==", + "dev": true, "license": "MIT", "peerDependencies": { "solid-js": "^1.6.12" @@ -2658,7 +2471,10 @@ "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/ms": "*" } @@ -2676,30 +2492,12 @@ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "license": "MIT" }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT" }, - "node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/@types/mdx": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", @@ -2711,7 +2509,10 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "license": "MIT" + "dev": true, + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@types/node": { "version": "22.15.32", @@ -2757,12 +2558,6 @@ "meshoptimizer": "~0.18.1" } }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "license": "MIT" - }, "node_modules/@types/webxr": { "version": "0.5.22", "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.22.tgz", @@ -3018,12 +2813,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "license": "ISC" - }, "node_modules/@vitest/browser": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-3.2.4.tgz", @@ -3538,16 +3327,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/bail": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", - "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3766,16 +3545,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -3928,16 +3697,6 @@ "node": ">= 0.8" } }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -4012,26 +3771,6 @@ "node": ">= 0.4.0" } }, - "node_modules/corvu": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/corvu/-/corvu-0.7.2.tgz", - "integrity": "sha512-OpBHnX7NYceHif3/OPu4Tkv9JmoM+WJFI9SjHKciE/PnWKgADqbRhViX2GvfUH5WMNMlb3MVAYmfykYJDECwtA==", - "license": "MIT", - "dependencies": { - "@corvu/accordion": "~0.2.3", - "@corvu/calendar": "~0.1.0", - "@corvu/dialog": "~0.2.3", - "@corvu/disclosure": "~0.2.0", - "@corvu/drawer": "~0.2.2", - "@corvu/otp-field": "~0.1.4", - "@corvu/popover": "~0.2.0", - "@corvu/resizable": "~0.2.3", - "@corvu/tooltip": "~0.2.1" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -4210,19 +3949,6 @@ "dev": true, "license": "MIT" }, - "node_modules/decode-named-character-reference": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.2.0.tgz", - "integrity": "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==", - "license": "MIT", - "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/deep-eql": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", @@ -4263,24 +3989,12 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -4628,6 +4342,22 @@ "tailwindcss": "^3.4.0" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", @@ -4802,12 +4532,6 @@ "node": ">=12.0.0" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5382,12 +5106,6 @@ "node": ">=8" } }, - "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", - "license": "MIT" - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -5470,18 +5188,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -5995,12 +5701,6 @@ "node": ">=10" } }, - "node_modules/material-icons": { - "version": "1.13.14", - "resolved": "https://registry.npmjs.org/material-icons/-/material-icons-1.13.14.tgz", - "integrity": "sha512-kZOfc7xCC0rAT8Q3DQixYAeT+tBqZnxkseQtp2bxBxz7q5pMAC+wmit7vJn1g/l7wRU+HEPq23gER4iPjGs5Cg==", - "license": "Apache-2.0" - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -6011,106 +5711,6 @@ "node": ">= 0.4" } }, - "node_modules/mdast-util-from-markdown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", - "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@ungap/structured-clone": "^1.0.0", - "devlop": "^1.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "trim-lines": "^3.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast/node_modules/unist-util-is": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", - "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast/node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", - "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", - "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", @@ -6150,448 +5750,6 @@ "dev": true, "license": "MIT" }, - "node_modules/micromark": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", - "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-core-commonmark": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", - "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-factory-destination": "^2.0.0", - "micromark-factory-label": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-factory-title": "^2.0.0", - "micromark-factory-whitespace": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-classify-character": "^2.0.0", - "micromark-util-html-tag-name": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-destination": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", - "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-label": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", - "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-space": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", - "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-title": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", - "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-whitespace": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", - "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-character": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", - "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-chunked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", - "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-classify-character": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", - "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-combine-extensions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", - "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", - "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-string": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", - "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", - "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-html-tag-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", - "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-normalize-identifier": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", - "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-resolve-all": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", - "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", - "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-subtokenize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", - "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", - "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", - "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -6712,24 +5870,6 @@ "thenify-all": "^1.0.0" } }, - "node_modules/nanoid": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.5.tgz", - "integrity": "sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.js" - }, - "engines": { - "node": "^18 || >=20" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -7403,16 +6543,6 @@ "node": ">= 6" } }, - "node_modules/property-information": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", - "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -7547,39 +6677,6 @@ "node": ">=8" } }, - "node_modules/remark-parse": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", - "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "mdast-util-from-markdown": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-rehype": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", - "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "mdast-util-to-hast": "^13.0.0", - "unified": "^11.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7963,30 +7060,6 @@ } } }, - "node_modules/solid-dismissible": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/solid-dismissible/-/solid-dismissible-0.1.1.tgz", - "integrity": "sha512-9kcKBJIMdS+586cA1g63HYWxKh3h89leeNHbPZ1csYjuni+NvPBtNr11l0iEX2AKKEt6FHk6qNhc/gjoYAW1pA==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.1" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/solid-focus-trap": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/solid-focus-trap/-/solid-focus-trap-0.1.9.tgz", - "integrity": "sha512-LTyNki6GUJPRLXV5uMWPkYClB07SUMubbr2EkAddiR0CJCF/I283txilMU9RURSr/P8EewMfXWu2o3aWrK7A5A==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, "node_modules/solid-js": { "version": "1.9.7", "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.7.tgz", @@ -7998,42 +7071,6 @@ "seroval-plugins": "~1.3.0" } }, - "node_modules/solid-list": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/solid-list/-/solid-list-0.3.0.tgz", - "integrity": "sha512-t4hx/F/l8Vmq+ib9HtZYl7Z9F1eKxq3eKJTXlvcm7P7yI4Z8O7QSOOEVHb/K6DD7M0RxzVRobK/BS5aSfLRwKg==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.4.0" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/solid-markdown": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/solid-markdown/-/solid-markdown-2.0.14.tgz", - "integrity": "sha512-Ln8R4TsNWySXvKkS80OHV+CSR/mwjk5XfGvC5UjZo/y/rAbbkBoxt6FXoWsfCkTW6GH9yxYvahSMXsUJU/ov4Q==", - "license": "MIT", - "dependencies": { - "comma-separated-tokens": "^2.0.3", - "property-information": "^6.3.0", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", - "space-separated-tokens": "^2.0.2", - "style-to-object": "^0.3.0", - "unified": "^11.0.5", - "unist-util-visit": "^4.1.2", - "vfile": "^6.0.3" - }, - "engines": { - "node": ">=18", - "pnpm": ">=8.6.0" - }, - "peerDependencies": { - "solid-js": "^1.6.0" - } - }, "node_modules/solid-presence": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/solid-presence/-/solid-presence-0.1.8.tgz", @@ -8082,30 +7119,6 @@ "solid-js": "^1.5.4" } }, - "node_modules/solid-transition-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/solid-transition-size/-/solid-transition-size-0.1.4.tgz", - "integrity": "sha512-ocHVnbfy23CgfaH4cEUR/AFg0Y3CEL8Oh3n9Qv8OHFJgPh+zkmERKZQfi/xH5XvxDCizg8VjPrVUhiHB1Gza8g==", - "license": "MIT", - "dependencies": { - "@corvu/utils": "~0.3.2" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, - "node_modules/solid-transition-size/node_modules/@corvu/utils": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@corvu/utils/-/utils-0.3.2.tgz", - "integrity": "sha512-ZWlyWEE8qV9+CB9OAyo2bTrZGXQN9ZeM+JfYv89zoR+lRACKTDuoOZEdiyL8Uc7U5dUSH1uTqKhTTnaHWb+wZA==", - "license": "MIT", - "dependencies": { - "@floating-ui/dom": "^1.6.7" - }, - "peerDependencies": { - "solid-js": "^1.8" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8125,16 +7138,6 @@ "node": ">=0.10.0" } }, - "node_modules/space-separated-tokens": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", - "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -8355,15 +7358,6 @@ "dev": true, "license": "MIT" }, - "node_modules/style-to-object": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", - "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", - "license": "MIT", - "dependencies": { - "inline-style-parser": "0.1.1" - } - }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", @@ -8719,26 +7713,6 @@ "tree-kill": "cli.js" } }, - "node_modules/trim-lines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", - "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/trough": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", - "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -8828,25 +7802,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unified": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", - "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "bail": "^2.0.0", - "devlop": "^1.0.0", - "extend": "^3.0.0", - "is-plain-obj": "^4.0.0", - "trough": "^2.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", @@ -8859,92 +7814,6 @@ "node": ">= 0.8.0" } }, - "node_modules/unist-util-is": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", - "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-is/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/unist-util-position": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", - "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", - "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0", - "unist-util-visit-parents": "^5.1.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", - "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/unist-util-visit/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, "node_modules/unplugin": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", @@ -9033,34 +7902,6 @@ "dev": true, "license": "ISC" }, - "node_modules/vfile": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", - "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", - "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/vite": { "version": "6.3.5", "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", diff --git a/pkgs/clan-app/ui/package.json b/pkgs/clan-app/ui/package.json index be1dd4531..569e98f64 100644 --- a/pkgs/clan-app/ui/package.json +++ b/pkgs/clan-app/ui/package.json @@ -9,10 +9,10 @@ "build": "npm run check && npm run test && vite build && npm run convert-html", "convert-html": "node gtk.webview.js", "serve": "vite preview", - "check": "tsc --noEmit --skipLibCheck && eslint ./src", + "check": "tsc --noEmit --skipLibCheck && eslint ./src --fix", "test": "vitest run --project unit --typecheck", "storybook": "storybook", - "knip": "knip", + "knip": "knip --fix", "storybook-build": "storybook build", "storybook-dev": "storybook dev -p 6006", "test-storybook": "vitest run --project storybook", @@ -31,7 +31,6 @@ "@storybook/addon-viewport": "^9.0.8", "@storybook/addon-vitest": "^9.0.8", "@tailwindcss/typography": "^0.5.13", - "@types/json-schema": "^7.0.15", "@types/node": "^22.15.19", "@types/three": "^0.176.0", "@typescript-eslint/parser": "^8.32.1", @@ -42,6 +41,7 @@ "concurrently": "^9.1.2", "eslint": "^9.27.0", "eslint-plugin-tailwindcss": "^3.17.0", + "eslint-plugin-unused-imports": "^4.1.4", "http-server": "^14.1.1", "jsdom": "^26.1.0", "knip": "^5.61.2", @@ -69,8 +69,6 @@ "@solidjs/router": "^0.15.3", "@tanstack/eslint-plugin-query": "^5.51.12", "@tanstack/solid-query": "^5.76.0", - "corvu": "^0.7.1", - "nanoid": "^5.0.7", "solid-js": "^1.9.7", "solid-toast": "^0.5.0", "three": "^0.176.0" diff --git a/pkgs/clan-app/ui/src/Form/base/index.tsx b/pkgs/clan-app/ui/src/Form/base/index.tsx deleted file mode 100644 index 1d1a76095..000000000 --- a/pkgs/clan-app/ui/src/Form/base/index.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { createEffect, createMemo, createSignal, onCleanup } from "solid-js"; -import type { - ComputePositionConfig, - ComputePositionReturn, - ReferenceElement, -} from "@floating-ui/dom"; -import { computePosition } from "@floating-ui/dom"; - -interface UseFloatingOptions< - R extends ReferenceElement, - F extends HTMLElement, -> extends Partial { - whileElementsMounted?: ( - reference: R, - floating: F, - update: () => void, - ) => // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - void | (() => void); -} - -interface UseFloatingState extends Omit { - x?: number | null; - y?: number | null; -} - -interface UseFloatingResult extends UseFloatingState { - update(): void; -} - -export function useFloating( - reference: () => R | undefined | null, - floating: () => F | undefined | null, - options?: UseFloatingOptions, -): UseFloatingResult { - const placement = () => options?.placement ?? "bottom"; - const strategy = () => options?.strategy ?? "absolute"; - - const [data, setData] = createSignal({ - x: null, - y: null, - placement: placement(), - strategy: strategy(), - middlewareData: {}, - }); - - const [error, setError] = createSignal<{ value: unknown } | undefined>(); - - createEffect(() => { - const currentError = error(); - if (currentError) { - throw currentError.value; - } - }); - - const version = createMemo(() => { - reference(); - floating(); - return {}; - }); - - function update() { - const currentReference = reference(); - const currentFloating = floating(); - - if (currentReference && currentFloating) { - const capturedVersion = version(); - computePosition(currentReference, currentFloating, { - middleware: options?.middleware, - placement: placement(), - strategy: strategy(), - }).then( - (currentData) => { - // Check if it's still valid - if (capturedVersion === version()) { - setData(currentData); - } - }, - (err) => { - setError(err); - }, - ); - } - } - - createEffect(() => { - const currentReference = reference(); - const currentFloating = floating(); - - placement(); - strategy(); - - if (currentReference && currentFloating) { - if (options?.whileElementsMounted) { - const cleanup = options.whileElementsMounted( - currentReference, - currentFloating, - update, - ); - - if (cleanup) { - onCleanup(cleanup); - } - } else { - update(); - } - } - }); - - return { - get x() { - return data().x; - }, - get y() { - return data().y; - }, - get placement() { - return data().placement; - }, - get strategy() { - return data().strategy; - }, - get middlewareData() { - return data().middlewareData; - }, - update, - }; -} diff --git a/pkgs/clan-app/ui/src/Form/base/label.tsx b/pkgs/clan-app/ui/src/Form/base/label.tsx deleted file mode 100644 index 03873cced..000000000 --- a/pkgs/clan-app/ui/src/Form/base/label.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import type { JSX } from "solid-js"; -interface LabelProps { - label: JSX.Element; - required?: boolean; -} -export const Label = (props: LabelProps) => ( - - {props.label} - -); diff --git a/pkgs/clan-app/ui/src/Form/fields/Select.tsx b/pkgs/clan-app/ui/src/Form/fields/Select.tsx deleted file mode 100644 index 88522f8cf..000000000 --- a/pkgs/clan-app/ui/src/Form/fields/Select.tsx +++ /dev/null @@ -1,274 +0,0 @@ -import { - createUniqueId, - createSignal, - Show, - type JSX, - For, - createMemo, - Accessor, -} from "solid-js"; -import { Portal } from "solid-js/web"; -import { useFloating } from "../base"; -import { autoUpdate, flip, hide, offset, shift, size } from "@floating-ui/dom"; -import { Button } from "../../components/Button/Button"; -import { - InputBase, - InputError, - InputLabel, - InputLabelProps, -} from "@/src/components/inputBase"; -import { FieldLayout } from "./layout"; -import Icon from "@/src/components/icon"; -import { useContext } from "corvu/dialog"; - -interface Option { - value: string; - label: string; - disabled?: boolean; -} - -interface SelectInputpProps { - value: string[] | string; - selectProps?: JSX.InputHTMLAttributes; - options: Option[]; - label: JSX.Element; - labelProps?: InputLabelProps; - helperText?: JSX.Element; - error?: string; - required?: boolean; - type?: string; - inlineLabel?: JSX.Element; - class?: string; - adornment?: { - position: "start" | "end"; - content: JSX.Element; - }; - disabled?: boolean; - placeholder?: string; - multiple?: boolean; - loading?: boolean; - portalRef?: Accessor; -} - -export function SelectInput(props: SelectInputpProps) { - const dialogContext = (dialogContextId?: string) => - useContext(dialogContextId); - - const _id = createUniqueId(); - - const [reference, setReference] = createSignal(); - const [floating, setFloating] = createSignal(); - - // `position` is a reactive object. - const position = useFloating(reference, floating, { - placement: "bottom-start", - - // pass options. Ensure the cleanup function is returned. - whileElementsMounted: (reference, floating, update) => - autoUpdate(reference, floating, update, { - animationFrame: true, - }), - middleware: [ - size({ - apply({ rects, elements }) { - Object.assign(elements.floating.style, { - minWidth: `${rects.reference.width}px`, - }); - }, - }), - offset({ mainAxis: 2 }), - shift(), - flip(), - hide({ - strategy: "referenceHidden", - }), - ], - }); - - // Create values list - const getValues = createMemo(() => { - return Array.isArray(props.value) - ? (props.value as string[]) - : typeof props.value === "string" - ? [props.value] - : []; - }); - - // const getSingleValue = createMemo(() => { - // const values = getValues(); - // return values.length > 0 ? values[0] : ""; - // }); - - const handleClickOption = (opt: Option) => { - if (!props.multiple) { - // @ts-expect-error: fieldName is not known ahead of time - props.selectProps.onInput({ - currentTarget: { - value: opt.value, - }, - }); - return; - } - let currValues = getValues(); - - if (currValues.includes(opt.value)) { - currValues = currValues.filter((o) => o !== opt.value); - } else { - currValues.push(opt.value); - } - // @ts-expect-error: fieldName is not known ahead of time - props.selectProps.onInput({ - currentTarget: { - options: currValues.map((value) => ({ - value, - selected: true, - disabled: false, - })), - }, - }); - }; - - return ( - <> - } - label={ - - {props.label} - - } - field={ - { - const popover = document.getElementById(_id); - if (popover) { - popover.togglePopover(); // Show or hide the popover - } - }} - type="button" - class="flex w-full items-center gap-2" - formnovalidate - // TODO: Use native popover once Webkit supports it within
- // popovertarget={_id} - // popovertargetaction="toggle" - > - - {props.adornment?.content} - - {props.inlineLabel} -
- - - {(item) => ( -
- {item} - - - -
- )} -
-
-
- - {props.adornment?.content} - - - - } - /> - } - /> - - -
-
    - - - {(opt) => ( - <> -
  • - -
  • - - )} -
    -
    -
-
-
- - ); -} diff --git a/pkgs/clan-app/ui/src/Form/fields/TextInput.tsx b/pkgs/clan-app/ui/src/Form/fields/TextInput.tsx index 24f3ca357..7487fabb9 100644 --- a/pkgs/clan-app/ui/src/Form/fields/TextInput.tsx +++ b/pkgs/clan-app/ui/src/Form/fields/TextInput.tsx @@ -5,7 +5,6 @@ import { InputLabel, InputVariant, } from "@/src/components/inputBase"; -import { Typography } from "@/src/components/Typography"; import { FieldLayout } from "./layout"; interface TextInputProps { diff --git a/pkgs/clan-app/ui/src/Form/fieldset/index.tsx b/pkgs/clan-app/ui/src/Form/fieldset/index.tsx deleted file mode 100644 index fa5ee953a..000000000 --- a/pkgs/clan-app/ui/src/Form/fieldset/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { JSX } from "solid-js"; - -import { Typography } from "@/src/components/Typography"; - -interface FieldsetProps { - legend?: string; - children: JSX.Element; - class?: string; -} - -export default function Fieldset(props: FieldsetProps) { - return ( -
- {props.legend && ( -
- - {props.legend} - -
- )} -
- {props.children} -
-
- ); -} diff --git a/pkgs/clan-app/ui/src/Form/form/index.tsx b/pkgs/clan-app/ui/src/Form/form/index.tsx deleted file mode 100644 index 031ca927d..000000000 --- a/pkgs/clan-app/ui/src/Form/form/index.tsx +++ /dev/null @@ -1,928 +0,0 @@ -import { - createForm, - Field, - FieldArray, - FieldValues, - FormStore, - pattern, - ResponseData, - setValue, - getValues, - insert, - SubmitHandler, - reset, - remove, - move, -} from "@modular-forms/solid"; -import { JSONSchema7, JSONSchema7Type } from "json-schema"; -import { TextInput } from "../fields/TextInput"; -import { createEffect, For, JSX, Match, Show, Switch } from "solid-js"; -import cx from "classnames"; -import { Label } from "../base/label"; -import { SelectInput } from "../fields/Select"; -import { Button } from "../../components/Button/Button"; -import Icon from "@/src/components/icon"; - -function generateDefaults(schema: JSONSchema7): unknown { - switch (schema.type) { - case "string": - return ""; // Default value for string - - case "number": - case "integer": - return 0; // Default value for number/integer - - case "boolean": - return false; // Default value for boolean - - case "array": - return []; // Default empty array if no items schema or items is true/false - - case "object": { - const obj: Record = {}; - if (schema.properties) { - Object.entries(schema.properties).forEach(([key, propSchema]) => { - if (typeof propSchema === "boolean") { - obj[key] = false; - } else { - // if (schema.required schema.required.includes(key)) - obj[key] = generateDefaults(propSchema); - } - }); - } - return obj; - } - - default: - return null; // Default for unknown types or nulls - } -} - -interface FormProps { - schema: JSONSchema7; - initialValues?: NonNullable; - handleSubmit?: SubmitHandler>; - initialPath?: string[]; - components?: { - before?: JSX.Element; - after?: JSX.Element; - }; - readonly?: boolean; - formProps?: JSX.InputHTMLAttributes; - errorContext?: string; - resetOnSubmit?: boolean; -} -export const DynForm = (props: FormProps) => { - const [formStore, { Field, Form: ModuleForm }] = createForm({ - initialValues: props.initialValues, - }); - - const handleSubmit: SubmitHandler> = async ( - values, - event, - ) => { - console.log("Submitting form values", values, props.errorContext); - props.handleSubmit?.(values, event); - // setValue(formStore, "root", null); - if (props.resetOnSubmit) { - console.log("Resetting form", values, props.initialValues); - reset(formStore); - } - }; - - createEffect(() => { - console.log("FormStore", formStore); - }); - - return ( - <> - {/* @ts-expect-error: This happened after solidjs upgrade. TOOD: fixme */} - - {props.components?.before} - - {props.components?.after} - - - ); -}; - -interface UnsupportedProps { - schema: JSONSchema7; - error?: string; -} - -const Unsupported = (props: UnsupportedProps) => ( -
- {props.error &&
{props.error}
} - - Invalid or unsupported schema entry of type:{" "} - {JSON.stringify(props.schema.type)} - -
-      {JSON.stringify(props.schema, null, 2)}
-    
-
-); - -interface SchemaFieldsProps { - formStore: FormStore; - Field: typeof Field; - schema: JSONSchema7; - path: string[]; - readonly: boolean; - parent: JSONSchema7; -} -function SchemaFields( - props: SchemaFieldsProps, -) { - return ( - }> - {/* Simple types */} - bool - - - - - - - - - - - {/* Composed types */} - - - - - - - {/* Empty / Null */} - - Dont know how to rendner InputType null - - - - ); -} - -function StringField( - props: SchemaFieldsProps, -) { - if ( - props.schema.type !== "string" && - props.schema.type !== "number" && - props.schema.type !== "integer" - ) { - return ( - - Error cannot render the following as String input. - - - ); - } - const { Field } = props; - - const validate = props.schema.pattern - ? pattern( - new RegExp(props.schema.pattern), - `String should follow pattern ${props.schema.pattern}`, - ) - : undefined; - - const commonProps = { - label: props.schema.title || props.path.join("."), - required: - props.parent.required && - props.parent.required.some( - (r) => r === props.path[props.path.length - 1], - ), - }; - const readonly = !!props.readonly; - return ( - }> - - {(s) => ( - - {(field, fieldProps) => ( - <> - - - )} - - )} - - - {(_enumSchemas) => ( - - {(field, fieldProps) => ( - - {(options) => ( - ({ - value: o, - label: o, - }))} - selectProps={fieldProps} - required={!!props.schema.minItems} - /> - )} - - )} - - )} - - - {(s) => ( - - {(field, fieldProps) => ( - - )} - - )} - - {/* TODO: when is it a normal string input? */} - - {(s) => ( - - {(field, fieldProps) => ( - - // - // - // } - // required - // altLabel="Leave empty to accept the default" - // helperText="Configure how dude connects" - // error="Something is wrong now" - /> - )} - - )} - - - ); -} - -interface OptionSchemaProps { - itemSpec: JSONSchema7Type; -} -function OptionSchema(props: OptionSchemaProps) { - return ( - Item spec unhandled} - > - - {(o) => } - - - ); -} - -interface ValueDisplayProps - extends SchemaFieldsProps { - children: JSX.Element; - listFieldName: string; - idx: number; - of: number; -} -function ListValueDisplay( - props: ValueDisplayProps, -) { - const removeItem = (e: Event) => { - e.preventDefault(); - remove( - props.formStore, - // @ts-expect-error: listFieldName is not known ahead of time - props.listFieldName, - { at: props.idx }, - ); - }; - const moveItemBy = (dir: number) => (e: Event) => { - e.preventDefault(); - move( - props.formStore, - // @ts-expect-error: listFieldName is not known ahead of time - props.listFieldName, - { from: props.idx, to: props.idx + dir }, - ); - }; - const topMost = () => props.idx === props.of - 1; - const bottomMost = () => props.idx === 0; - - return ( -
-
- {props.children} -
- - - -
-
-
- ); -} - -const findDuplicates = (arr: unknown[]) => { - const seen = new Set(); - const duplicates: number[] = []; - - arr.forEach((obj, idx) => { - const serializedObj = JSON.stringify(obj); - - if (seen.has(serializedObj)) { - duplicates.push(idx); - } else { - seen.add(serializedObj); - } - }); - - return duplicates; -}; - -interface OnlyStringItems { - children: (items: string[]) => JSX.Element; - itemspec: JSONSchema7; -} -const OnlyStringItems = (props: OnlyStringItems) => { - return ( - - } - > - {props.children(props.itemspec.enum as string[])} - - ); -}; - -function ArrayFields( - props: SchemaFieldsProps, -) { - if (props.schema.type !== "array") { - return ( - - Error cannot render the following as array. - - - ); - } - const { Field } = props; - - const listFieldName = props.path.join("."); - - return ( - <> - }> - - {(itemsSchema) => ( - <> - }> - - - - - { - let error = ""; - const values: unknown[] = getValues( - props.formStore, - // @ts-expect-error: listFieldName is not known ahead of time - listFieldName, - // @ts-expect-error: assumption based on the behavior of selectInput - )?.strings?.selection; - console.log("vali", { values }); - if (props.schema.uniqueItems) { - const duplicates = findDuplicates(values); - if (duplicates.length) { - error = `Duplicate entries are not allowed. Please make sure each entry is unique.`; - } - } - if ( - props.schema.maxItems && - values.length > props.schema.maxItems - ) { - error = `You can only select up to ${props.schema.maxItems} items`; - } - if ( - props.schema.minItems && - values.length < props.schema.minItems - ) { - error = `Please select at least ${props.schema.minItems} items.`; - } - return error; - }} - > - {(field, fieldProps) => ( - - {(options) => ( - ({ - value: o, - label: o, - }))} - selectProps={fieldProps} - required={!!props.schema.minItems} - /> - )} - - )} - - - - {/* !Important: Register the parent field to gain access to array items*/} - { - let error = ""; - // @ts-expect-error: listFieldName is not known ahead of time - const values: unknown[] = getValues( - props.formStore, - // @ts-expect-error: listFieldName is not known ahead of time - listFieldName, - ); - if (props.schema.uniqueItems) { - const duplicates = findDuplicates(values); - if (duplicates.length) { - error = `Duplicate entries are not allowed. Please make sure each entry is unique.`; - } - } - if ( - props.schema.maxItems && - values.length > props.schema.maxItems - ) { - error = `You can only add up to ${props.schema.maxItems} items`; - } - if ( - props.schema.minItems && - values.length < props.schema.minItems - ) { - error = `Please add at least ${props.schema.minItems} items.`; - } - - return error; - }} - > - {(fieldArray) => ( - <> - {/* Render existing items */} - - No {itemsSchema().title || "entries"} yet. - - } - > - {(item, idx) => ( - - - {(f, fp) => ( - <> - - - )} - - - )} - - - - {fieldArray.error} - - - - {/* Add new item */} - - - - ), - }} - // Add the new item to the FieldArray - handleSubmit={(values, event) => { - // @ts-expect-error: listFieldName is not known ahead of time - const prev: unknown[] = getValues( - props.formStore, - - // @ts-expect-error: listFieldName is not known ahead of time - listFieldName, - ); - if (itemsSchema().type === "object") { - const newIdx = prev.length; - setValue( - props.formStore, - - // @ts-expect-error: listFieldName is not known ahead of time - `${listFieldName}.${newIdx}`, - - // @ts-expect-error: listFieldName is not known ahead of time - values.root, - ); - } - - // @ts-expect-error: listFieldName is not known ahead of time - insert(props.formStore, listFieldName, { - // @ts-expect-error: listFieldName is not known ahead of time - value: values.root, - }); - }} - /> - - )} - - - - - )} - - - - ); -} - -interface ObjectFieldPropertyLabelProps { - schema: JSONSchema7; - fallback: JSX.Element; -} -function ObjectFieldPropertyLabel(props: ObjectFieldPropertyLabelProps) { - return ( - - {/* @ts-expect-error: $exportedModuleInfo should exist since we export it */} - - {(path) => path()[path().length - 1]} - - - ); -} - -function ObjectFields( - props: SchemaFieldsProps, -) { - if (props.schema.type !== "object") { - return ( - - Error cannot render the following as Object - - - ); - } - - const fieldName = props.path.join("."); - const { Field } = props; - - return ( - - } - > - - {(properties) => ( - - {([propName, propSchema]) => ( -
-
- )} -
- )} -
- {/* Objects where people can define their own keys - - Trivial Key-value pairs. Where the value is a string a number or a list of strings (trivial select). - - Non-trivial Key-value pairs. Where the value is an object or a list - */} - - {(additionalPropertiesSchema) => ( - - } - > - {/* Non-trivival cases */} - - {(itemSchema) => ( - - {(objectField, fp) => ( - <> - - - - } - each={Object.entries(objectField.value || {})} - > - {([key, relatedValue]) => ( - - {(f, fp) => ( -
- - - {key} - - -
- ), - }} - /> - - )} -
- )} -
- {/* Replace this with a normal input ?*/} - { - setValue( - props.formStore, - // @ts-expect-error: fieldName is not known ahead of time - `${fieldName}`, - // @ts-expect-error: fieldName is not known ahead of time - { ...objectField.value, [values[""]]: {} }, - ); - }} - /> - - )} -
- )} -
- - {(itemSchema) => ( - - )} - - {/* TODO: Trivial cases */} -
- )} -
-
- ); -} diff --git a/pkgs/clan-app/ui/src/api/index.tsx b/pkgs/clan-app/ui/src/api/index.tsx index a51fa07b8..59139290d 100644 --- a/pkgs/clan-app/ui/src/api/index.tsx +++ b/pkgs/clan-app/ui/src/api/index.tsx @@ -1,14 +1,12 @@ -import schema from "@/api/API.json" with { type: "json" }; import { API, Error as ApiError } from "@/api/API"; -import { nanoid } from "nanoid"; import { Schema as Inventory } from "@/api/Inventory"; -import { toast, Toast } from "solid-toast"; +import { toast } from "solid-toast"; import { ErrorToastComponent, CancelToastComponent, } from "@/src/components/toast"; type OperationNames = keyof API; -export type OperationArgs = API[T]["arguments"]; +type OperationArgs = API[T]["arguments"]; export type OperationResponse = API[T]["return"]; type ApiEnvelope = @@ -22,7 +20,7 @@ type ApiEnvelope = type Services = NonNullable; type ServiceNames = keyof Services; type ClanService = Services[T]; -export type ClanServiceInstance = NonNullable< +type ClanServiceInstance = NonNullable< Services[T] >[string]; @@ -30,7 +28,7 @@ export type SuccessQuery = Extract< OperationResponse, { status: "success" } >; -export type SuccessData = SuccessQuery["data"]; +type SuccessData = SuccessQuery["data"]; type ErrorQuery = Extract< OperationResponse, diff --git a/pkgs/clan-app/ui/src/api_test.tsx b/pkgs/clan-app/ui/src/api_test.tsx index c49755e0b..49599f059 100644 --- a/pkgs/clan-app/ui/src/api_test.tsx +++ b/pkgs/clan-app/ui/src/api_test.tsx @@ -119,11 +119,11 @@ export const ApiTester = () => { 0} > -
    +
      {(ep) => (
    • { e.preventDefault(); setValue(formStore, "endpoint", ep); @@ -142,13 +142,13 @@ export const ApiTester = () => { {(field, fieldProps) => ( -
      +