From 3fa280d21878ae391674a21758199df3d2d8c3b5 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Fri, 3 Oct 2025 09:04:28 -0500 Subject: chore: app -> desktop --- packages/desktop/src/ui/button.tsx | 36 + packages/desktop/src/ui/collapsible.tsx | 62 + packages/desktop/src/ui/file-icon.tsx | 582 ++ packages/desktop/src/ui/file-icons/sprite.svg | 11707 ++++++++++++++++++++++++ packages/desktop/src/ui/file-icons/types.ts | 1095 +++ packages/desktop/src/ui/icon-button.tsx | 38 + packages/desktop/src/ui/icon.tsx | 155 + packages/desktop/src/ui/index.ts | 13 + packages/desktop/src/ui/link.tsx | 13 + packages/desktop/src/ui/logo.tsx | 125 + packages/desktop/src/ui/tabs.tsx | 71 + packages/desktop/src/ui/tooltip.tsx | 58 + 12 files changed, 13955 insertions(+) create mode 100644 packages/desktop/src/ui/button.tsx create mode 100644 packages/desktop/src/ui/collapsible.tsx create mode 100644 packages/desktop/src/ui/file-icon.tsx create mode 100644 packages/desktop/src/ui/file-icons/sprite.svg create mode 100644 packages/desktop/src/ui/file-icons/types.ts create mode 100644 packages/desktop/src/ui/icon-button.tsx create mode 100644 packages/desktop/src/ui/icon.tsx create mode 100644 packages/desktop/src/ui/index.ts create mode 100644 packages/desktop/src/ui/link.tsx create mode 100644 packages/desktop/src/ui/logo.tsx create mode 100644 packages/desktop/src/ui/tabs.tsx create mode 100644 packages/desktop/src/ui/tooltip.tsx (limited to 'packages/desktop/src/ui') diff --git a/packages/desktop/src/ui/button.tsx b/packages/desktop/src/ui/button.tsx new file mode 100644 index 000000000..21d89fbee --- /dev/null +++ b/packages/desktop/src/ui/button.tsx @@ -0,0 +1,36 @@ +import { Button as Kobalte } from "@kobalte/core/button" +import { type ComponentProps, splitProps } from "solid-js" + +export interface ButtonProps { + variant?: "primary" | "secondary" | "ghost" + size?: "sm" | "md" | "lg" +} + +export function Button(props: ComponentProps<"button"> & ButtonProps) { + const [split, rest] = splitProps(props, ["variant", "size", "class", "classList"]) + return ( + + {props.children} + + ) +} diff --git a/packages/desktop/src/ui/collapsible.tsx b/packages/desktop/src/ui/collapsible.tsx new file mode 100644 index 000000000..e0202f617 --- /dev/null +++ b/packages/desktop/src/ui/collapsible.tsx @@ -0,0 +1,62 @@ +import { Collapsible as KobalteCollapsible } from "@kobalte/core/collapsible" +import { splitProps } from "solid-js" +import type { ComponentProps, ParentProps } from "solid-js" +import { Icon, type IconProps } from "./icon" + +export interface CollapsibleProps extends ComponentProps {} +export interface CollapsibleTriggerProps extends ComponentProps {} +export interface CollapsibleContentProps extends ComponentProps {} + +function CollapsibleRoot(props: CollapsibleProps) { + return +} + +function CollapsibleTrigger(props: CollapsibleTriggerProps) { + const [local, others] = splitProps(props, ["class"]) + return ( + + ) +} + +function CollapsibleContent(props: ParentProps) { + const [local, others] = splitProps(props, ["class", "children"]) + return ( + + {local.children} + + ) +} + +function CollapsibleArrow(props: Partial) { + const [local, others] = splitProps(props, ["class", "name"]) + return ( + + ) +} + +export const Collapsible = Object.assign(CollapsibleRoot, { + Trigger: CollapsibleTrigger, + Content: CollapsibleContent, + Arrow: CollapsibleArrow, +}) diff --git a/packages/desktop/src/ui/file-icon.tsx b/packages/desktop/src/ui/file-icon.tsx new file mode 100644 index 000000000..d31a741e0 --- /dev/null +++ b/packages/desktop/src/ui/file-icon.tsx @@ -0,0 +1,582 @@ +import type { Component, JSX } from "solid-js" +import { createMemo, splitProps } from "solid-js" +import sprite from "@/ui/file-icons/sprite.svg" +import type { IconName } from "@/ui/file-icons/types" + +export type FileIconProps = JSX.GSVGAttributes & { + node: { path: string; type: "file" | "directory" } + expanded?: boolean +} + +export const FileIcon: Component = (props) => { + const [local, rest] = splitProps(props, ["node", "class", "expanded"]) + const name = createMemo(() => chooseIconName(local.node.path, local.node.type, local.expanded || false)) + return ( + + + + ) +} + +type IconMaps = { + fileNames: Record + fileExtensions: Record + folderNames: Record + defaults: { + file: IconName + folder: IconName + folderOpen: IconName + } +} + +const ICON_MAPS: IconMaps = { + fileNames: { + // Documentation files + "readme.md": "Readme", + "changelog.md": "Changelog", + "contributing.md": "Contributing", + "conduct.md": "Conduct", + license: "Certificate", + authors: "Authors", + credits: "Credits", + install: "Installation", + + // Node.js files + "package.json": "Nodejs", + "package-lock.json": "Nodejs", + "yarn.lock": "Yarn", + "pnpm-lock.yaml": "Pnpm", + "bun.lock": "Bun", + "bun.lockb": "Bun", + "bunfig.toml": "Bun", + ".nvmrc": "Nodejs", + ".node-version": "Nodejs", + + // Docker files + dockerfile: "Docker", + "docker-compose.yml": "Docker", + "docker-compose.yaml": "Docker", + ".dockerignore": "Docker", + + // Config files + "jest.config.js": "Jest", + "jest.config.ts": "Jest", + "jest.config.mjs": "Jest", + "vitest.config.js": "Vitest", + "vitest.config.ts": "Vitest", + "tailwind.config.js": "Tailwindcss", + "tailwind.config.ts": "Tailwindcss", + "turbo.json": "Turborepo", + "tsconfig.json": "Tsconfig", + "jsconfig.json": "Jsconfig", + ".eslintrc": "Eslint", + ".eslintrc.js": "Eslint", + ".eslintrc.json": "Eslint", + ".prettierrc": "Prettier", + ".prettierrc.js": "Prettier", + ".prettierrc.json": "Prettier", + "vite.config.js": "Vite", + "vite.config.ts": "Vite", + "webpack.config.js": "Webpack", + "rollup.config.js": "Rollup", + "astro.config.mjs": "AstroConfig", + "astro.config.js": "AstroConfig", + "next.config.js": "Next", + "next.config.mjs": "Next", + "nuxt.config.js": "Nuxt", + "nuxt.config.ts": "Nuxt", + "svelte.config.js": "Svelte", + "gatsby-config.js": "Gatsby", + "remix.config.js": "Remix", + "prisma.schema": "Prisma", + ".gitignore": "Git", + ".gitattributes": "Git", + makefile: "Makefile", + cmake: "Cmake", + "cargo.toml": "Rust", + "go.mod": "GoMod", + "go.sum": "GoMod", + "requirements.txt": "Python", + "pyproject.toml": "Python", + pipfile: "Python", + "poetry.lock": "Poetry", + gemfile: "Gemfile", + rakefile: "Ruby", + "composer.json": "Php", + "build.gradle": "Gradle", + "pom.xml": "Maven", + "deno.json": "Deno", + "deno.jsonc": "Deno", + "vercel.json": "Vercel", + "netlify.toml": "Netlify", + ".env": "Tune", + ".env.local": "Tune", + ".env.development": "Tune", + ".env.production": "Tune", + ".env.example": "Tune", + ".editorconfig": "Editorconfig", + "robots.txt": "Robots", + "favicon.ico": "Favicon", + browserlist: "Browserlist", + ".babelrc": "Babel", + "babel.config.js": "Babel", + "gulpfile.js": "Gulp", + "gruntfile.js": "Grunt", + "capacitor.config.json": "Capacitor", + "ionic.config.json": "Ionic", + "angular.json": "Angular", + ".storybook": "Storybook", + "storybook.config.js": "Storybook", + "cypress.config.js": "Cypress", + "playwright.config.js": "Playwright", + "puppeteer.config.js": "Puppeteer", + "wrangler.toml": "Wrangler", + "firebase.json": "Firebase", + supabase: "Supabase", + terraform: "Terraform", + kubernetes: "Kubernetes", + ".gitpod.yml": "Gitpod", + ".devcontainer": "Vscode", + "travis.yml": "Travis", + "appveyor.yml": "Appveyor", + ".circleci": "Circleci", + "renovate.json": "Renovate", + "dependabot.yml": "Dependabot", + "lerna.json": "Lerna", + "nx.json": "Nx", + }, + fileExtensions: { + // Test files + "spec.ts": "TestTs", + "test.ts": "TestTs", + "spec.tsx": "TestJsx", + "test.tsx": "TestJsx", + "spec.js": "TestJs", + "test.js": "TestJs", + "spec.jsx": "TestJsx", + "test.jsx": "TestJsx", + + // JavaScript/TypeScript + "js.map": "JavascriptMap", + "d.ts": "TypescriptDef", + ts: "Typescript", + tsx: "React_ts", + js: "Javascript", + jsx: "React", + mjs: "Javascript", + cjs: "Javascript", + + // Web languages + html: "Html", + htm: "Html", + css: "Css", + scss: "Sass", + sass: "Sass", + less: "Less", + styl: "Stylus", + + // Data formats + json: "Json", + xml: "Xml", + yml: "Yaml", + yaml: "Yaml", + toml: "Toml", + hjson: "Hjson", + + // Documentation + md: "Markdown", + mdx: "Mdx", + tex: "Tex", + + // Programming languages + py: "Python", + pyx: "Python", + pyw: "Python", + rs: "Rust", + go: "Go", + java: "Java", + kt: "Kotlin", + scala: "Scala", + php: "Php", + rb: "Ruby", + cs: "Csharp", + vb: "Visualstudio", + cpp: "Cpp", + cc: "Cpp", + cxx: "Cpp", + c: "C", + h: "H", + hpp: "Hpp", + swift: "Swift", + m: "ObjectiveC", + mm: "ObjectiveCpp", + dart: "Dart", + lua: "Lua", + pl: "Perl", + r: "R", + jl: "Julia", + hs: "Haskell", + elm: "Elm", + ml: "Ocaml", + clj: "Clojure", + cljs: "Clojure", + erl: "Erlang", + ex: "Elixir", + exs: "Elixir", + nim: "Nim", + zig: "Zig", + v: "Vlang", + odin: "Odin", + gleam: "Gleam", + grain: "Grain", + roc: "Rocket", + fs: "Fsharp", + + // Shell scripts + sh: "Console", + bash: "Console", + zsh: "Console", + fish: "Console", + ps1: "Powershell", + + // Config/build files + cfg: "Settings", + ini: "Settings", + conf: "Settings", + properties: "Settings", + + // Media files + svg: "Svg", + png: "Image", + jpg: "Image", + jpeg: "Image", + gif: "Image", + webp: "Image", + bmp: "Image", + ico: "Favicon", + mp4: "Video", + mov: "Video", + avi: "Video", + webm: "Video", + mp3: "Audio", + wav: "Audio", + flac: "Audio", + + // Archive files + zip: "Zip", + tar: "Zip", + gz: "Zip", + rar: "Zip", + "7z": "Zip", + + // Document files + pdf: "Pdf", + doc: "Word", + docx: "Word", + ppt: "Powerpoint", + pptx: "Powerpoint", + xls: "Document", + xlsx: "Document", + + // Database files + sql: "Database", + db: "Database", + sqlite: "Database", + + // Other + env: "Tune", + log: "Log", + lock: "Lock", + key: "Key", + pem: "Certificate", + crt: "Certificate", + proto: "Proto", + graphql: "Graphql", + gql: "Graphql", + wasm: "Webassembly", + dockerfile: "Docker", + }, + folderNames: { + // Source code + src: "FolderSrc", + source: "FolderSrc", + lib: "FolderLib", + libs: "FolderLib", + + // Testing + test: "FolderTest", + tests: "FolderTest", + testing: "FolderTest", + spec: "FolderTest", + specs: "FolderTest", + __tests__: "FolderTest", + e2e: "FolderTest", + integration: "FolderTest", + unit: "FolderTest", + cypress: "FolderCypress", + + // Dependencies + node_modules: "FolderNode", + vendor: "FolderPackages", + packages: "FolderPackages", + deps: "FolderPackages", + + // Build/dist + build: "FolderBuildkite", + dist: "FolderDist", + out: "FolderDist", + output: "FolderDist", + target: "FolderTarget", + + // Configuration + config: "FolderConfig", + configs: "FolderConfig", + configuration: "FolderConfig", + settings: "FolderConfig", + env: "FolderEnvironment", + environments: "FolderEnvironment", + + // Docker + docker: "FolderDocker", + dockerfiles: "FolderDocker", + containers: "FolderDocker", + + // Documentation + docs: "FolderDocs", + doc: "FolderDocs", + documentation: "FolderDocs", + readme: "FolderDocs", + + // Public/assets + public: "FolderPublic", + static: "FolderPublic", + assets: "FolderImages", + images: "FolderImages", + img: "FolderImages", + icons: "FolderImages", + media: "FolderImages", + fonts: "FolderFont", + styles: "FolderCss", + stylesheets: "FolderCss", + css: "FolderCss", + sass: "FolderSass", + scss: "FolderSass", + less: "FolderLess", + + // Scripts + scripts: "FolderScripts", + script: "FolderScripts", + tools: "FolderTools", + utils: "FolderUtils", + utilities: "FolderUtils", + helpers: "FolderHelper", + + // Framework specific + components: "FolderComponents", + component: "FolderComponents", + views: "FolderViews", + view: "FolderViews", + layouts: "FolderLayout", + layout: "FolderLayout", + templates: "FolderTemplate", + template: "FolderTemplate", + hooks: "FolderHook", + hook: "FolderHook", + store: "FolderStore", + stores: "FolderStore", + state: "FolderNgrxStore", + reducers: "FolderReduxReducer", + reducer: "FolderReduxReducer", + services: "FolderApi", + service: "FolderApi", + api: "FolderApi", + apis: "FolderApi", + routes: "FolderRoutes", + route: "FolderRoutes", + routing: "FolderRoutes", + middleware: "FolderMiddleware", + middlewares: "FolderMiddleware", + controllers: "FolderController", + controller: "FolderController", + models: "FolderDatabase", + model: "FolderDatabase", + schemas: "FolderDatabase", + schema: "FolderDatabase", + migrations: "FolderDatabase", + migration: "FolderDatabase", + seeders: "FolderSeeders", + seeder: "FolderSeeders", + + // TypeScript + types: "FolderTypescript", + typing: "FolderTypescript", + typings: "FolderTypescript", + "@types": "FolderTypescript", + interfaces: "FolderInterface", + interface: "FolderInterface", + + // Mobile + android: "FolderAndroid", + ios: "FolderIos", + mobile: "FolderMobile", + flutter: "FolderFlutter", + + // Infrastructure + kubernetes: "FolderKubernetes", + k8s: "FolderKubernetes", + terraform: "FolderTerraform", + aws: "FolderAws", + azure: "FolderAzurePipelines", + firebase: "FolderFirebase", + supabase: "FolderSupabase", + vercel: "FolderVercel", + netlify: "FolderNetlify", + + // CI/CD + ".github": "FolderGithub", + ".gitlab": "FolderGitlab", + ".circleci": "FolderCircleci", + ci: "FolderCi", + ".ci": "FolderCi", + workflows: "FolderGhWorkflows", + + // Git + ".git": "FolderGit", + + // Development tools + ".vscode": "FolderVscode", + ".idea": "FolderIntellij", + ".cursor": "FolderCursor", + ".devcontainer": "FolderContainer", + ".storybook": "FolderStorybook", + + // Localization + i18n: "FolderI18n", + locales: "FolderI18n", + locale: "FolderI18n", + lang: "FolderI18n", + languages: "FolderI18n", + + // Other common patterns + temp: "FolderTemp", + tmp: "FolderTemp", + logs: "FolderLog", + log: "FolderLog", + backup: "FolderBackup", + backups: "FolderBackup", + examples: "FolderExamples", + example: "FolderExamples", + demo: "FolderExamples", + demos: "FolderExamples", + samples: "FolderExamples", + sample: "FolderExamples", + fixtures: "FolderTest", + mocks: "FolderMock", + mock: "FolderMock", + data: "FolderDatabase", + database: "FolderDatabase", + db: "FolderDatabase", + sql: "FolderDatabase", + prisma: "FolderPrisma", + drizzle: "FolderDrizzle", + + // Security + security: "FolderSecure", + auth: "FolderSecure", + authentication: "FolderSecure", + authorization: "FolderSecure", + keys: "FolderKeys", + certs: "FolderKeys", + certificates: "FolderKeys", + + // Content + content: "FolderContent", + posts: "FolderContent", + articles: "FolderContent", + blog: "FolderContent", + + // Functions + functions: "FolderFunctions", + function: "FolderFunctions", + lambda: "FolderFunctions", + lambdas: "FolderFunctions", + serverless: "FolderServerless", + + // Jobs/tasks + jobs: "FolderJob", + job: "FolderJob", + tasks: "FolderTasks", + task: "FolderTasks", + cron: "FolderTasks", + queue: "FolderQueue", + queues: "FolderQueue", + + // Desktop platforms + desktop: "FolderDesktop", + windows: "FolderWindows", + macos: "FolderMacos", + linux: "FolderLinux", + }, + defaults: { + file: "Document", + folder: "Folder", + folderOpen: "FolderOpen", + }, +} + +const toOpenVariant = (icon: IconName): IconName => { + if (!icon.startsWith("Folder")) return icon + if (icon.endsWith("_light")) return icon.replace("_light", "Open_light") as IconName + if (!icon.endsWith("Open")) return (icon + "Open") as IconName + return icon +} + +const basenameOf = (p: string) => + p + .replace(/[/\\]+$/, "") + .split(/[\\/]/) + .pop() ?? "" + +const folderNameVariants = (name: string) => { + const n = name.toLowerCase() + return [n, `.${n}`, `_${n}`, `__${n}__`] +} + +const dottedSuffixesDesc = (name: string) => { + const n = name.toLowerCase() + const idxs: number[] = [] + for (let i = 0; i < n.length; i++) if (n[i] === ".") idxs.push(i) + const out = new Set() + out.add(n) // allow exact whole-name "extensions" like "dockerfile" + for (const i of idxs) if (i + 1 < n.length) out.add(n.slice(i + 1)) + return Array.from(out).sort((a, b) => b.length - a.length) // longest first +} + +export function chooseIconName(path: string, type: "directory" | "file", expanded: boolean): IconName { + const base = basenameOf(path) + const baseLower = base.toLowerCase() + + if (type === "directory") { + for (const cand of folderNameVariants(baseLower)) { + const icon = ICON_MAPS.folderNames[cand] + if (icon) return expanded ? toOpenVariant(icon) : icon + } + return expanded ? ICON_MAPS.defaults.folderOpen : ICON_MAPS.defaults.folder + } + + const byName = ICON_MAPS.fileNames[baseLower] + if (byName) return byName + + for (const ext of dottedSuffixesDesc(baseLower)) { + const icon = ICON_MAPS.fileExtensions[ext] + if (icon) return icon + } + + return ICON_MAPS.defaults.file +} diff --git a/packages/desktop/src/ui/file-icons/sprite.svg b/packages/desktop/src/ui/file-icons/sprite.svg new file mode 100644 index 000000000..619b2b58c --- /dev/null +++ b/packages/desktop/src/ui/file-icons/sprite.svg @@ -0,0 +1,11707 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/desktop/src/ui/file-icons/types.ts b/packages/desktop/src/ui/file-icons/types.ts new file mode 100644 index 000000000..5b47661f9 --- /dev/null +++ b/packages/desktop/src/ui/file-icons/types.ts @@ -0,0 +1,1095 @@ +// This file is generated by icon spritesheet generator + +export const iconNames = [ + "Zip", + "Zig", + "Zeabur_light", + "Zeabur", + "Yarn", + "Yang", + "Yaml", + "Xml", + "Xmake", + "Xaml", + "Wxt", + "Wrangler", + "Word", + "Wolframlanguage", + "Windicss", + "Werf", + "Wepy", + "Webpack", + "Webhint", + "Webassembly", + "Watchman", + "Wally", + "Wallaby", + "Wakatime_light", + "Wakatime", + "VuexStore", + "Vue", + "VueConfig", + "Vscode", + "Vlang", + "Vitest", + "Vite", + "Visualstudio", + "Virtual", + "Vim", + "Video", + "Vfl", + "Verilog", + "Verified", + "Verdaccio", + "Vercel_light", + "Vercel", + "Velocity", + "Velite", + "Vedic", + "Varnish", + "VanillaExtract", + "Vala", + "Vagrant", + "Uv", + "Url", + "Unocss", + "Unity", + "Uml_light", + "Uml", + "Umi", + "Typst", + "Typescript", + "TypescriptDef", + "Twine", + "Twig", + "Turborepo_light", + "Turborepo", + "Tune", + "Tsil", + "Tsdoc", + "Tsconfig", + "Trigger", + "Tree", + "Travis", + "Toml_light", + "Toml", + "Todo", + "Tobimake", + "Tobi", + "Tldraw_light", + "Tldraw", + "Tilt", + "Textlint", + "Tex", + "TestTs", + "TestJsx", + "TestJs", + "Terraform", + "Template", + "Templ", + "Teal", + "Tcl", + "Taze", + "Tauri", + "Taskfile", + "Tailwindcss", + "Table", + "Systemd_light", + "Systemd", + "Syncpack", + "Swift", + "Swc", + "Sway", + "Swagger", + "Svgr", + "Svgo", + "Svg", + "Svelte", + "Supabase", + "Subtitles", + "Sublime", + "Stylus", + "Stylelint_light", + "Stylelint", + "Stylable", + "Stryker", + "Storybook", + "Stitches_light", + "Stitches", + "Stencil", + "Steadybit", + "Stan", + "Stackblitz", + "Spwn", + "Sonarcloud", + "Solidity", + "Snyk", + "Snowpack_light", + "Snowpack", + "Snapcraft", + "Snakemake", + "Sml", + "Smarty", + "Slug", + "Slint", + "Slim", + "Sketch", + "Siyuan", + "Simulink", + "Silverstripe", + "Shader", + "Settings", + "Serverless", + "Sequelize", + "Sentry", + "Semgrep", + "SemanticRelease_light", + "SemanticRelease", + "Search", + "Screwdriver", + "Scons_light", + "Scons", + "Scheme", + "Scala", + "Sbt", + "Sass", + "Sas", + "San", + "Salesforce", + "Rust", + "Ruff", + "Ruby", + "Rubocop_light", + "Rubocop", + "Rspec", + "Routing", + "Rome", + "Rollup", + "Rojo", + "Rocket", + "Robots", + "Robot", + "Roblox", + "Roadmap", + "Riot", + "Restql", + "Rescript", + "RescriptInterface", + "Replit", + "Renovate", + "Remix_light", + "Remix", + "Remark", + "Regedit", + "ReduxStore", + "ReduxSelector", + "ReduxReducer", + "ReduxAction", + "Red", + "Reason", + "Readme", + "React_ts", + "React", + "Rc", + "Rbxmk", + "Razor", + "Raml", + "Racket", + "R", + "Qwik", + "Quokka", + "Quasar", + "Quarto", + "Qsharp", + "Pytorch", + "Python", + "PythonMisc", + "Purescript", + "Puppeteer", + "Puppet", + "Pug", + "Protractor", + "Proto", + "Prompt", + "Prolog", + "Processing", + "Prisma", + "Prettier", + "PreCommit", + "Powershell", + "Powerpoint", + "Posthtml", + "Postcss", + "Poetry", + "Pnpm_light", + "Pnpm", + "Pm2Ecosystem", + "Plop", + "Playwright", + "Plastic", + "Pkl", + "Pipeline", + "Pinejs", + "Phpunit", + "Phpstan", + "Php_elephant_pink", + "Php_elephant", + "Php", + "PhpCsFixer", + "Perl", + "Percy", + "Pdm", + "Pdf", + "Payload_light", + "Payload", + "Pawn", + "Pascal", + "Parcel", + "Panda", + "Palette", + "Packship", + "Oxlint", + "Otne", + "Openapi_light", + "Openapi", + "Opam", + "Opa", + "Odin", + "Ocaml", + "ObjectiveCpp", + "ObjectiveC", + "Nx", + "Nuxt", + "Nunjucks", + "Nuget", + "Npm", + "Nodemon", + "Nodejs_alt", + "Nodejs", + "Nix", + "Nim", + "NgrxState", + "NgrxSelectors", + "NgrxReducer", + "NgrxEntity", + "NgrxEffects", + "NgrxActions", + "Nginx", + "Next_light", + "Next", + "Netlify_light", + "Netlify", + "Nest", + "Ndst", + "NanoStaged_light", + "NanoStaged", + "Mxml", + "Moonscript", + "Moon", + "Mojo", + "Modernizr", + "Mocha", + "Mjml", + "Mint", + "Minecraft", + "MinecraftFabric", + "Meson", + "Mermaid", + "Merlin", + "Mercurial", + "Mdx", + "Mdsvex", + "Maven", + "Matlab", + "Mathematica", + "Markojs", + "Markdownlint", + "Markdown", + "Markdoc", + "MarkdocConfig", + "Makefile", + "Lyric", + "Luau", + "Lua", + "Lottie", + "Lolcode", + "Log", + "Lock", + "Livescript", + "Lisp", + "Liquid", + "Lintstaged", + "Lilypond", + "Lighthouse", + "Lib", + "Liara", + "Less", + "Lerna", + "Lefthook", + "Lbx", + "Latexmk", + "Laravel", + "Label", + "Kusto", + "Kubernetes", + "Kotlin", + "Knip", + "Kl", + "Kivy", + "Keystatic", + "Key", + "Kcl", + "Karma", + "Just", + "Jupyter", + "Julia", + "Jsr_light", + "Jsr", + "Json", + "Jsconfig", + "Jinja_light", + "Jinja", + "Jest", + "Jenkins", + "Javascript", + "JavascriptMap", + "Javaclass", + "Java", + "Jar", + "Istanbul", + "Ionic", + "Installation", + "Imba", + "Image", + "IfanrCloud", + "Idris", + "I18n", + "Husky", + "Hurl", + "Huff_light", + "Huff", + "Http", + "Html", + "Hpp", + "Hosts_light", + "Hosts", + "Horusec", + "Hjson", + "Histoire", + "Hex", + "Heroku", + "Helm", + "Hcl_light", + "Hcl", + "Haxe", + "Haskell", + "Harmonix", + "Hardhat", + "Handlebars", + "Haml", + "Hadolint", + "Hack", + "H", + "Gulp", + "Grunt", + "Groovy", + "Gridsome", + "Graphql", + "Graphcool", + "Grain", + "GrafanaAlloy", + "Gradle", + "Godot", + "GodotAssets", + "Go_gopher", + "Go", + "GoMod", + "Gnuplot", + "Gleam", + "Gitpod", + "Gitlab", + "GithubSponsors", + "GithubActionsWorkflow", + "Git", + "Gemini", + "GeminiAi", + "Gemfile", + "Gcp", + "Gatsby", + "Garden", + "Gamemaker", + "Fusebox", + "Fsharp", + "Freemarker", + "Foxpro", + "Fortran", + "Forth", + "Font", + "Folder", + "FolderZeabur", + "FolderZeaburOpen", + "FolderYarn", + "FolderYarnOpen", + "FolderWordpress", + "FolderWordpressOpen", + "FolderWindows", + "FolderWindowsOpen", + "FolderWebpack", + "FolderWebpackOpen", + "FolderWakatime", + "FolderWakatimeOpen", + "FolderVuexStore", + "FolderVuexStoreOpen", + "FolderVuepress", + "FolderVuepressOpen", + "FolderVue", + "FolderVueOpen", + "FolderVueDirectives", + "FolderVueDirectivesOpen", + "FolderVscode", + "FolderVscodeOpen", + "FolderVm", + "FolderVmOpen", + "FolderViews", + "FolderViewsOpen", + "FolderVideo", + "FolderVideoOpen", + "FolderVerdaccio", + "FolderVerdaccioOpen", + "FolderVercel", + "FolderVercelOpen", + "FolderUtils", + "FolderUtilsOpen", + "FolderUpload", + "FolderUploadOpen", + "FolderUpdate", + "FolderUpdateOpen", + "FolderUnity", + "FolderUnityOpen", + "FolderUi", + "FolderUiOpen", + "FolderTypescript", + "FolderTypescriptOpen", + "FolderTurborepo", + "FolderTurborepoOpen", + "FolderTrigger", + "FolderTriggerOpen", + "FolderTrash", + "FolderTrashOpen", + "FolderTools", + "FolderToolsOpen", + "FolderTheme", + "FolderThemeOpen", + "FolderTest", + "FolderTestOpen", + "FolderTerraform", + "FolderTerraformOpen", + "FolderTemplate", + "FolderTemplateOpen", + "FolderTemp", + "FolderTempOpen", + "FolderTelevision", + "FolderTelevisionOpen", + "FolderTasks", + "FolderTasksOpen", + "FolderTaskfile", + "FolderTaskfileOpen", + "FolderTarget", + "FolderTargetOpen", + "FolderSyntax", + "FolderSyntaxOpen", + "FolderSvg", + "FolderSvgOpen", + "FolderSvelte", + "FolderSvelteOpen", + "FolderSupabase", + "FolderSupabaseOpen", + "FolderSublime", + "FolderSublimeOpen", + "FolderStylus", + "FolderStylusOpen", + "FolderStorybook", + "FolderStorybookOpen", + "FolderStore", + "FolderStoreOpen", + "FolderStencil", + "FolderStencilOpen", + "FolderStack", + "FolderStackOpen", + "FolderSrc", + "FolderSrcTauri", + "FolderSrcTauriOpen", + "FolderSrcOpen", + "FolderSnippet", + "FolderSnippetOpen", + "FolderSnapcraft", + "FolderSnapcraftOpen", + "FolderShared", + "FolderSharedOpen", + "FolderShader", + "FolderShaderOpen", + "FolderServerless", + "FolderServerlessOpen", + "FolderServer", + "FolderServerOpen", + "FolderSeeders", + "FolderSeedersOpen", + "FolderSecure", + "FolderSecureOpen", + "FolderScripts", + "FolderScriptsOpen", + "FolderScons", + "FolderSconsOpen", + "FolderScala", + "FolderScalaOpen", + "FolderSass", + "FolderSassOpen", + "FolderSandbox", + "FolderSandboxOpen", + "FolderRust", + "FolderRustOpen", + "FolderRules", + "FolderRulesOpen", + "FolderRoutes", + "FolderRoutesOpen", + "FolderRobot", + "FolderRobotOpen", + "FolderReview", + "FolderReviewOpen", + "FolderResource", + "FolderResourceOpen", + "FolderResolver", + "FolderResolverOpen", + "FolderRepository", + "FolderRepositoryOpen", + "FolderReduxReducer", + "FolderReduxReducerOpen", + "FolderReactComponents", + "FolderReactComponentsOpen", + "FolderQueue", + "FolderQueueOpen", + "FolderQuasar", + "FolderQuasarOpen", + "FolderPytorch", + "FolderPytorchOpen", + "FolderPython", + "FolderPythonOpen", + "FolderPublic", + "FolderPublicOpen", + "FolderProto", + "FolderProtoOpen", + "FolderPrompts", + "FolderPromptsOpen", + "FolderProject", + "FolderProjectOpen", + "FolderPrivate", + "FolderPrivateOpen", + "FolderPrisma", + "FolderPrismaOpen", + "FolderPowershell", + "FolderPowershellOpen", + "FolderPolicy", + "FolderPolicyOpen", + "FolderPlugin", + "FolderPluginOpen", + "FolderPlastic", + "FolderPlasticOpen", + "FolderPipe", + "FolderPipeOpen", + "FolderPhpmailer", + "FolderPhpmailerOpen", + "FolderPhp", + "FolderPhpOpen", + "FolderPdm", + "FolderPdmOpen", + "FolderPdf", + "FolderPdfOpen", + "FolderPackages", + "FolderPackagesOpen", + "FolderOther", + "FolderOtherOpen", + "FolderOrganism", + "FolderOrganismOpen", + "FolderOpen", + "FolderObsidian", + "FolderObsidianOpen", + "FolderNuxt", + "FolderNuxtOpen", + "FolderNode", + "FolderNodeOpen", + "FolderNgrxStore", + "FolderNgrxStoreOpen", + "FolderNext", + "FolderNextOpen", + "FolderNetlify", + "FolderNetlifyOpen", + "FolderMoon", + "FolderMoonOpen", + "FolderMolecule", + "FolderMoleculeOpen", + "FolderMojo", + "FolderMojoOpen", + "FolderMock", + "FolderMockOpen", + "FolderMobile", + "FolderMobileOpen", + "FolderMjml", + "FolderMjmlOpen", + "FolderMiddleware", + "FolderMiddlewareOpen", + "FolderMeta", + "FolderMetaOpen", + "FolderMessages", + "FolderMessagesOpen", + "FolderMercurial", + "FolderMercurialOpen", + "FolderMarkdown", + "FolderMarkdownOpen", + "FolderMappings", + "FolderMappingsOpen", + "FolderMail", + "FolderMailOpen", + "FolderMacos", + "FolderMacosOpen", + "FolderLuau", + "FolderLuauOpen", + "FolderLua", + "FolderLuaOpen", + "FolderLottie", + "FolderLottieOpen", + "FolderLog", + "FolderLogOpen", + "FolderLiquibase", + "FolderLiquibaseOpen", + "FolderLinux", + "FolderLinuxOpen", + "FolderLink", + "FolderLinkOpen", + "FolderLib", + "FolderLibOpen", + "FolderLess", + "FolderLessOpen", + "FolderLefthook", + "FolderLefthookOpen", + "FolderLayout", + "FolderLayoutOpen", + "FolderKusto", + "FolderKustoOpen", + "FolderKubernetes", + "FolderKubernetesOpen", + "FolderKeys", + "FolderKeysOpen", + "FolderJupyter", + "FolderJupyterOpen", + "FolderJson", + "FolderJsonOpen", + "FolderJob", + "FolderJobOpen", + "FolderJinja_light", + "FolderJinja", + "FolderJinjaOpen_light", + "FolderJinjaOpen", + "FolderJavascript", + "FolderJavascriptOpen", + "FolderJava", + "FolderJavaOpen", + "FolderIos", + "FolderIosOpen", + "FolderInterface", + "FolderInterfaceOpen", + "FolderInterceptor", + "FolderInterceptorOpen", + "FolderIntellij_light", + "FolderIntellij", + "FolderIntellijOpen_light", + "FolderIntellijOpen", + "FolderInclude", + "FolderIncludeOpen", + "FolderImport", + "FolderImportOpen", + "FolderImages", + "FolderImagesOpen", + "FolderI18n", + "FolderI18nOpen", + "FolderHusky", + "FolderHuskyOpen", + "FolderHook", + "FolderHookOpen", + "FolderHome", + "FolderHomeOpen", + "FolderHelper", + "FolderHelperOpen", + "FolderHelm", + "FolderHelmOpen", + "FolderGulp", + "FolderGulpOpen", + "FolderGuard", + "FolderGuardOpen", + "FolderGraphql", + "FolderGraphqlOpen", + "FolderGradle", + "FolderGradleOpen", + "FolderGodot", + "FolderGodotOpen", + "FolderGlobal", + "FolderGlobalOpen", + "FolderGitlab", + "FolderGitlabOpen", + "FolderGithub", + "FolderGithubOpen", + "FolderGitea", + "FolderGiteaOpen", + "FolderGit", + "FolderGitOpen", + "FolderGhWorkflows", + "FolderGhWorkflowsOpen", + "FolderGenerator", + "FolderGeneratorOpen", + "FolderGamemaker", + "FolderGamemakerOpen", + "FolderFunctions", + "FolderFunctionsOpen", + "FolderForgejo", + "FolderForgejoOpen", + "FolderFont", + "FolderFontOpen", + "FolderFlutter", + "FolderFlutterOpen", + "FolderFlow", + "FolderFlowOpen", + "FolderFirestore", + "FolderFirestoreOpen", + "FolderFirebase", + "FolderFirebaseOpen", + "FolderFavicon", + "FolderFaviconOpen", + "FolderFastlane", + "FolderFastlaneOpen", + "FolderExport", + "FolderExportOpen", + "FolderExpo", + "FolderExpoOpen", + "FolderExamples", + "FolderExamplesOpen", + "FolderEvent", + "FolderEventOpen", + "FolderError", + "FolderErrorOpen", + "FolderEnvironment", + "FolderEnvironmentOpen", + "FolderEnum", + "FolderEnumOpen", + "FolderElement", + "FolderElementOpen", + "FolderDump", + "FolderDumpOpen", + "FolderDrizzle", + "FolderDrizzleOpen", + "FolderDownload", + "FolderDownloadOpen", + "FolderDocs", + "FolderDocsOpen", + "FolderDocker", + "FolderDockerOpen", + "FolderDist", + "FolderDistOpen", + "FolderDirective", + "FolderDirectiveOpen", + "FolderDesktop", + "FolderDesktopOpen", + "FolderDelta", + "FolderDeltaOpen", + "FolderDecorators", + "FolderDecoratorsOpen", + "FolderDebug", + "FolderDebugOpen", + "FolderDatabase", + "FolderDatabaseOpen", + "FolderDart", + "FolderDartOpen", + "FolderCypress", + "FolderCypressOpen", + "FolderCustom", + "FolderCustomOpen", + "FolderCursor_light", + "FolderCursor", + "FolderCursorOpen_light", + "FolderCursorOpen", + "FolderCss", + "FolderCssOpen", + "FolderCoverage", + "FolderCoverageOpen", + "FolderCore", + "FolderCoreOpen", + "FolderController", + "FolderControllerOpen", + "FolderContract", + "FolderContractOpen", + "FolderContext", + "FolderContextOpen", + "FolderContent", + "FolderContentOpen", + "FolderContainer", + "FolderContainerOpen", + "FolderConstant", + "FolderConstantOpen", + "FolderConsole", + "FolderConsoleOpen", + "FolderConnection", + "FolderConnectionOpen", + "FolderConfig", + "FolderConfigOpen", + "FolderComponents", + "FolderComponentsOpen", + "FolderCommand", + "FolderCommandOpen", + "FolderCobol", + "FolderCobolOpen", + "FolderCluster", + "FolderClusterOpen", + "FolderCloudflare", + "FolderCloudflareOpen", + "FolderCloudFunctions", + "FolderCloudFunctionsOpen", + "FolderCline", + "FolderClineOpen", + "FolderClient", + "FolderClientOpen", + "FolderClaude", + "FolderClaudeOpen", + "FolderClass", + "FolderClassOpen", + "FolderCircleci", + "FolderCircleciOpen", + "FolderCi", + "FolderCiOpen", + "FolderChangesets", + "FolderChangesetsOpen", + "FolderCart", + "FolderCartOpen", + "FolderBuildkite", + "FolderBuildkiteOpen", + "FolderBower", + "FolderBowerOpen", + "FolderBloc", + "FolderBlocOpen", + "FolderBlender", + "FolderBlenderOpen", + "FolderBicep", + "FolderBicepOpen", + "FolderBibliography", + "FolderBibliographyOpen", + "FolderBenchmark", + "FolderBenchmarkOpen", + "FolderBatch", + "FolderBatchOpen", + "FolderBase", + "FolderBaseOpen", + "FolderBackup", + "FolderBackupOpen", + "FolderAzurePipelines", + "FolderAzurePipelinesOpen", + "FolderAws", + "FolderAwsOpen", + "FolderAurelia", + "FolderAureliaOpen", + "FolderAudio", + "FolderAudioOpen", + "FolderAttachment", + "FolderAttachmentOpen", + "FolderAtom", + "FolderAtomOpen", + "FolderAstro", + "FolderAstroOpen", + "FolderArchive", + "FolderArchiveOpen", + "FolderApp", + "FolderAppOpen", + "FolderApollo", + "FolderApolloOpen", + "FolderApi", + "FolderApiOpen", + "FolderAnsible", + "FolderAnsibleOpen", + "FolderAnimation", + "FolderAnimationOpen", + "FolderAngular", + "FolderAngularOpen", + "FolderAndroid", + "FolderAndroidOpen", + "FolderAdmin", + "FolderAdminOpen", + "Flow", + "Flash", + "Firebase", + "Figma", + "Favicon", + "Fastlane", + "Exe", + "Excalidraw", + "Eslint", + "Esbuild", + "Erlang", + "Epub", + "Ember", + "Email", + "Elm", + "Elixir", + "Ejs", + "Editorconfig", + "Edge", + "Dune", + "Duc", + "Drone_light", + "Drone", + "Drizzle", + "Drawio", + "Dotjs", + "Document", + "DoctexInstaller", + "Docker", + "Dll", + "Django", + "Disc", + "Dinophp", + "Diff", + "Dhall", + "DependenciesUpdate", + "Dependabot", + "Deno_light", + "Deno", + "Denizenscript", + "Deepsource", + "Database", + "Dart_generated", + "Dart", + "D", + "Cypress", + "Cursor_light", + "Cursor", + "Cuda", + "Cucumber", + "Css", + "CssMap", + "Csharp", + "Crystal_light", + "Crystal", + "Credits", + "Craco", + "Cpp", + "Copilot_light", + "Copilot", + "Controller", + "Contributing", + "Context", + "Contentlayer", + "Console", + "Conduct", + "Concourse", + "Commitlint", + "Commitizen", + "Command", + "Coloredpetrinets", + "Coldfusion", + "Coffee", + "CoderabbitAi", + "Codeowners", + "Codecov", + "CodeClimate_light", + "CodeClimate", + "Coconut", + "Cobol", + "Coala", + "Cmake", + "Cloudfoundry", + "Clojure", + "Cline", + "Claude", + "Clangd", + "Citation", + "Circleci_light", + "Circleci", + "Chrome", + "Chess_light", + "Chess", + "Changelog", + "Certificate", + "Cds", + "Cbx", + "Capnp", + "Capacitor", + "Cake", + "Cairo", + "Cadence", + "Caddy", + "Cabal", + "C3", + "C", + "Bun_light", + "Bun", + "Buildkite", + "Bucklescript", + "Buck", + "Bruno", + "Browserlist_light", + "Browserlist", + "Brainfuck", + "Bower", + "Blitz", + "Blink_light", + "Blink", + "Blender", + "Bithound", + "Bitbucket", + "Biome", + "Bicep", + "BibtexStyle", + "Bibliography", + "BenchTs", + "BenchJsx", + "BenchJs", + "Beancount", + "Bbx", + "Bazel", + "Ballerina", + "Babel", + "Azure", + "AzurePipelines", + "Autoit", + "Autohotkey", + "Auto_light", + "Auto", + "Authors", + "Aurelia", + "Audio", + "Astyle", + "Astro", + "AstroConfig", + "Assembly", + "Asciidoc", + "Arduino", + "Architecture", + "Appveyor", + "AppsScript", + "Applescript", + "Apollo", + "Apiblueprint", + "Antlr", + "Angular", + "Android", + "Amplify", + "Advpl", + "Adonis", + "AdobeSwc", + "AdobePhotoshop_light", + "AdobePhotoshop", + "AdobeIllustrator_light", + "AdobeIllustrator", + "Ada", + "Actionscript", + "Abc", + "Abap", + "3d", +] as const + +export type IconName = (typeof iconNames)[number] diff --git a/packages/desktop/src/ui/icon-button.tsx b/packages/desktop/src/ui/icon-button.tsx new file mode 100644 index 000000000..7e9e3e6e2 --- /dev/null +++ b/packages/desktop/src/ui/icon-button.tsx @@ -0,0 +1,38 @@ +import { Button as KobalteButton } from "@kobalte/core/button" +import { splitProps } from "solid-js" +import type { ComponentProps, JSX } from "solid-js" + +export interface IconButtonProps extends ComponentProps { + variant?: "primary" | "secondary" | "outline" | "ghost" + size?: "xs" | "sm" | "md" | "lg" + children: JSX.Element +} + +export function IconButton(props: IconButtonProps) { + const [local, others] = splitProps(props, ["variant", "size", "class", "classList"]) + return ( + + ) +} diff --git a/packages/desktop/src/ui/icon.tsx b/packages/desktop/src/ui/icon.tsx new file mode 100644 index 000000000..35c77c078 --- /dev/null +++ b/packages/desktop/src/ui/icon.tsx @@ -0,0 +1,155 @@ +import { splitProps, type ComponentProps } from "solid-js" + +export interface IconProps extends ComponentProps<"svg"> { + name: keyof typeof icons + size?: number +} + +// prettier-ignore +const icons = { + close: '', + menu: ' ', + "chevron-right": '', + "chevron-left": '', + "chevron-down": '', + "chevron-up": '', + "chevron-down-square": '', + "chevron-up-square": '', + "chevron-right-square": '', + "chevron-left-square": '', + settings: '', + globe: '', + github: '', + hammer: '', + "avatar-square": '', + slash: '', + robot: '', + cloud: '', + "file-text": '', + file: '', + "file-checkmark": '', + "file-code": '', + "file-important": '', + "file-minus": '', + "file-plus": '', + files: '', + "file-zip": '', + jpg: '', + pdf: '', + png: '', + gif: '', + archive: '', + sun: '', + moon: '', + monitor: '', + command: '', + link: '', + share: '', + branch: '', + logout: '', + login: '', + keys: '', + key: '', + info: '', + warning: '', + checkmark: '', + "checkmark-square": '', + plus: '', + minus: '', + undo: '', + merge: '', + redo: '', + refresh: '', + rotate: '', + "arrow-left": '', + "arrow-down": '', + "arrow-right": '', + "arrow-up": '', + enter: '', + trash: '', + package: '', + box: '', + lock: '', + unlocked: '', + activity: '', + asterisk: '', + bell: '', + "bell-off": '', + bolt: '', + bookmark: '', + brain: '', + browser: '', + "browser-cursor": '', + bug: '', + "carat-down": '', + "carat-left": '', + "carat-right": '', + "carat-up": '', + cards: '', + chart: '', + "check-circle": '', + checklist: '', + "checklist-cards": '', + lab: '', + circle: '', + "circle-dotted": '', + clipboard: '', + clock: '', + "close-circle": '', + terminal: '', + code: '', + components: '', + copy: '', + cpu: '', + dashboard: '', + transfer: '', + devices: '', + diamond: '', + dice: '', + discord: '', + dots: '', + expand: '', + droplet: '', + "chevron-double-down": '', + "chevron-double-left": '', + "chevron-double-right": '', + "chevron-double-up": '', + "speech-bubble": '', + message: '', + annotation: '', + square: '', + "pull-request": '', + pencil: '', + sparkles: '', + photo: '', + columns: '', + "open-pane": '', + "close-pane": '', + "file-search": '', + "folder-search": '', + search: '', + "web-search": '', + loading: '', + mic: '', + } as const + +export function Icon(props: IconProps) { + const [local, others] = splitProps(props, ["name", "size", "class", "classList"]) + const size = local.size ?? 24 + return ( + + ) +} diff --git a/packages/desktop/src/ui/index.ts b/packages/desktop/src/ui/index.ts new file mode 100644 index 000000000..d3f24a192 --- /dev/null +++ b/packages/desktop/src/ui/index.ts @@ -0,0 +1,13 @@ +export { Button, type ButtonProps } from "./button" +export { + Collapsible, + type CollapsibleProps, + type CollapsibleTriggerProps, + type CollapsibleContentProps, +} from "./collapsible" +export { FileIcon, type FileIconProps } from "./file-icon" +export { Icon, type IconProps } from "./icon" +export { IconButton, type IconButtonProps } from "./icon-button" +export { Link, type LinkProps } from "./link" +export { Logo, type LogoProps } from "./logo" +export { Tooltip, type TooltipProps } from "./tooltip" diff --git a/packages/desktop/src/ui/link.tsx b/packages/desktop/src/ui/link.tsx new file mode 100644 index 000000000..461206d58 --- /dev/null +++ b/packages/desktop/src/ui/link.tsx @@ -0,0 +1,13 @@ +import { A } from "@solidjs/router" +import { splitProps } from "solid-js" +import type { ComponentProps } from "solid-js" + +export interface LinkProps extends ComponentProps { + variant?: "primary" | "secondary" | "ghost" + size?: "sm" | "md" | "lg" +} + +export function Link(props: LinkProps) { + const [, others] = splitProps(props, ["variant", "size", "class"]) + return +} diff --git a/packages/desktop/src/ui/logo.tsx b/packages/desktop/src/ui/logo.tsx new file mode 100644 index 000000000..0bbaba835 --- /dev/null +++ b/packages/desktop/src/ui/logo.tsx @@ -0,0 +1,125 @@ +import type { ComponentProps } from "solid-js" + +export interface LogoProps extends ComponentProps<"svg"> { + variant?: "mark" | "full" | "ornate" + size?: number +} + +export function Logo(props: LogoProps) { + const { variant = "mark", size = 64, ...others } = props + + if (variant === "mark") { + return ( + + + + + ) + } + + if (variant === "full") { + return ( + + + + + + + + + + + + + ) + } + + return ( + + + + + + + + + + + + + + + + + + + ) +} diff --git a/packages/desktop/src/ui/tabs.tsx b/packages/desktop/src/ui/tabs.tsx new file mode 100644 index 000000000..d82d3327a --- /dev/null +++ b/packages/desktop/src/ui/tabs.tsx @@ -0,0 +1,71 @@ +import { Tabs as KobalteTabs } from "@kobalte/core/tabs" +import { splitProps } from "solid-js" +import type { ComponentProps, ParentProps } from "solid-js" + +export interface TabsProps extends ComponentProps {} +export interface TabsListProps extends ComponentProps {} +export interface TabsTriggerProps extends ComponentProps {} +export interface TabsContentProps extends ComponentProps {} + +function TabsRoot(props: TabsProps) { + return +} + +function TabsList(props: TabsListProps) { + const [local, others] = splitProps(props, ["class"]) + return ( + + ) +} + +function TabsTrigger(props: ParentProps) { + const [local, others] = splitProps(props, ["class", "children"]) + return ( + + {local.children} + + ) +} + +function TabsContent(props: ParentProps) { + const [local, others] = splitProps(props, ["class", "children"]) + return ( + + {local.children} + + ) +} + +export const Tabs = Object.assign(TabsRoot, { + List: TabsList, + Trigger: TabsTrigger, + Content: TabsContent, +}) diff --git a/packages/desktop/src/ui/tooltip.tsx b/packages/desktop/src/ui/tooltip.tsx new file mode 100644 index 000000000..8bf1dc429 --- /dev/null +++ b/packages/desktop/src/ui/tooltip.tsx @@ -0,0 +1,58 @@ +import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip" +import { children, createEffect, createSignal, splitProps } from "solid-js" +import type { ComponentProps } from "solid-js" + +export interface TooltipProps extends ComponentProps { + value: string | (() => string) + class?: string +} + +export function Tooltip(props: TooltipProps) { + const [open, setOpen] = createSignal(false) + const [local, others] = splitProps(props, ["class", "children"]) + + const c = children(() => local.children) + + createEffect(() => { + const childElements = c() + if (childElements instanceof HTMLElement) { + childElements.addEventListener("focus", () => setOpen(true)) + childElements.addEventListener("blur", () => setOpen(false)) + } else if (Array.isArray(childElements)) { + for (const child of childElements) { + if (child instanceof HTMLElement) { + child.addEventListener("focus", () => setOpen(true)) + child.addEventListener("blur", () => setOpen(false)) + } + } + } + }) + + return ( + + + {c()} + + + + {typeof others.value === "function" ? others.value() : others.value} + + + + + ) +} -- cgit v1.2.3