import { ArrowDown, ArrowUp, BatteryCharging, Bed, Check, CircleCheck, CloudDrizzle, CloudFog, CloudLightning, CloudRain, CloudSnow, Cloudy, DoorOpen, Droplets, Fan, Flame, House, Lightbulb, type LucideIcon, Moon, Plug, Snowflake, Sun, SunSnow, Thermometer, ThermometerSun, TriangleAlert, Umbrella, Wind, Zap, } from "lucide-react" /** * The icons a tile may be drawn with, by name. * * Curated rather than lucide's `dynamicIconImports`: the panel has to offer * these in a list, and the dynamic map makes the bundler emit a lazy chunk per * icon — some fifteen hundred of them — so a wall panel would fetch one request * per tile over its LAN before it could draw anything. A few dozen weather, * room and status glyphs cover what a dashboard says, and the map is cheap to * extend. */ export const ICONS: Record = { sun: Sun, moon: Moon, cloudy: Cloudy, "cloud-rain": CloudRain, "cloud-drizzle": CloudDrizzle, "cloud-snow": CloudSnow, "cloud-lightning": CloudLightning, "cloud-fog": CloudFog, wind: Wind, umbrella: Umbrella, snowflake: Snowflake, droplets: Droplets, thermometer: Thermometer, "thermometer-sun": ThermometerSun, flame: Flame, fan: Fan, "sun-snow": SunSnow, "door-open": DoorOpen, house: House, bed: Bed, lightbulb: Lightbulb, plug: Plug, zap: Zap, "battery-charging": BatteryCharging, "arrow-up": ArrowUp, "arrow-down": ArrowDown, "triangle-alert": TriangleAlert, check: Check, "circle-check": CircleCheck, } export const ICON_NAMES = Object.keys(ICONS) /** * What an icon may be tinted, by name. * * Literal classes so Tailwind's scanner sees them. No terracotta: that is the * one affordance a view gets, and a panel is many tiles. */ export const ICON_COLORS: Record = { default: "text-foreground", muted: "text-muted-foreground", primary: "text-primary", success: "text-status-success", danger: "text-destructive", }