File
Blob: src/shared/launcher.ts
| 1 | // String-only registry of launcher tile icon and tint names. Living |
| 2 | // under `src/shared/` so the Worker can validate values without pulling |
| 3 | // lucide-react into the Worker bundle; the client maps these names to |
| 4 | // Lucide components in `src/client/lib/launcher-icons.ts`. |
| 5 | // |
| 6 | // Order is meaningful for the admin picker: suite-relevant icons first, |
| 7 | // then grouped by category. |
| 8 | export const LAUNCHER_ICON_NAMES = [ |
| 9 | // Tools |
| 10 | "Hammer", |
| 11 | "Wrench", |
| 12 | // Source control |
| 13 | "GitBranch", |
| 14 | // Cloud / network |
| 15 | "Cloud", |
| 16 | "Globe", |
| 17 | "Network", |
| 18 | // Data |
| 19 | "Database", |
| 20 | "Server", |
| 21 | // Dev |
| 22 | "Terminal", |
| 23 | "Code", |
| 24 | "Braces", |
| 25 | // Writing |
| 26 | "BookOpen", |
| 27 | "Pilcrow", |
| 28 | "FileText", |
| 29 | "Notebook", |
| 30 | // Security |
| 31 | "ShieldCheck", |
| 32 | "Lock", |
| 33 | // Comms |
| 34 | "Inbox", |
| 35 | "MessageSquare", |
| 36 | // Media |
| 37 | "Music", |
| 38 | "Image", |
| 39 | // Time |
| 40 | "Calendar", |
| 41 | // Highlights |
| 42 | "Sparkles", |
| 43 | "Zap", |
| 44 | "Rocket", |
| 45 | // Process / structure |
| 46 | "Workflow", |
| 47 | "Compass", |
| 48 | "Layers", |
| 49 | "Folder", |
| 50 | "Package", |
| 51 | "Settings", |
| 52 | ] as const; |
| 53 | |
| 54 | export type LauncherIconName = (typeof LAUNCHER_ICON_NAMES)[number]; |
| 55 | |
| 56 | export const isLauncherIconName = (s: unknown): s is LauncherIconName => |
| 57 | typeof s === "string" && (LAUNCHER_ICON_NAMES as readonly string[]).includes(s); |
| 58 | |
| 59 | // Tints derived from the limic suite's brand colours. Each is OKLCH at |
| 60 | // moderate chroma so it reads well on tessera's lifted-canvas dark surface. |
| 61 | // D1 launcher rows store these tint identifiers; the client maps each |
| 62 | // identifier to a visible swatch color. |
| 63 | export const LAUNCHER_TINT_NAMES = [ |
| 64 | "gold", |
| 65 | "sky", |
| 66 | "violet", |
| 67 | "rose", |
| 68 | "indigo", |
| 69 | "orange", |
| 70 | "teal", |
| 71 | "lime", |
| 72 | "forest", |
| 73 | "magenta", |
| 74 | ] as const; |
| 75 | |
| 76 | export type LauncherTintName = (typeof LAUNCHER_TINT_NAMES)[number]; |
| 77 | |
| 78 | export const isLauncherTintName = (s: unknown): s is LauncherTintName => |
| 79 | typeof s === "string" && (LAUNCHER_TINT_NAMES as readonly string[]).includes(s); |