From dc05abac372ce9256bf63aa0872cfa67e07b883d Mon Sep 17 00:00:00 2001 From: Jeremy Valentine <38669521+valentine195@users.noreply.github.com> Date: Thu, 26 Jan 2023 20:17:53 -0500 Subject: [PATCH] fix: fixes obsidian icon definition --- src/icons/manager.ts | 7 +- src/icons/obsidian.ts | 699 ------------------------------------------ 2 files changed, 3 insertions(+), 703 deletions(-) delete mode 100644 src/icons/obsidian.ts diff --git a/src/icons/manager.ts b/src/icons/manager.ts index 92e3ff8..ab90e7b 100644 --- a/src/icons/manager.ts +++ b/src/icons/manager.ts @@ -13,9 +13,8 @@ import type { IconName } from "@fortawesome/fontawesome-svg-core"; /* import { RPG } from "./rpgawesome"; */ import type { AdmonitionIconDefinition, IconType } from "src/@types"; import type ObsidianAdmonition from "src/main"; -import { Notice, setIcon } from "obsidian"; +import { getIconIds, Notice, setIcon } from "obsidian"; import { type DownloadableIconPack, DownloadableIcons } from "./packs"; -import { ObsidianIconNames, ObsidianIcons } from "./obsidian"; export { type DownloadableIconPack, DownloadableIcons }; @@ -73,7 +72,7 @@ export class IconManager { ...(this.plugin.data.useFontAwesome ? this.FONT_AWESOME_MAP.values() : []), - ...ObsidianIcons.map((name) => { + ...getIconIds().map((name) => { return { type: "obsidian" as IconType, name }; }), ...downloaded @@ -121,7 +120,7 @@ export class IconManager { return "font-awesome"; if (findIconDefinition({ iconName: str as IconName, prefix: "fab" })) return "font-awesome"; - if (ObsidianIcons.includes(str as ObsidianIconNames)) { + if (getIconIds().includes(str)) { return "obsidian"; } for (const [pack, icons] of Object.entries(this.DOWNLOADED)) { diff --git a/src/icons/obsidian.ts b/src/icons/obsidian.ts deleted file mode 100644 index 65fe0b4..0000000 --- a/src/icons/obsidian.ts +++ /dev/null @@ -1,699 +0,0 @@ -export type ObsidianIconNames = typeof ObsidianIcons[number]; -export const ObsidianIcons = [ - "logo-crystal", - "create-new", - "trash", - "search", - "right-triangle", - "document", - "folder", - "pencil", - "left-arrow", - "right-arrow", - "three-horizontal-bars", - "dot-network", - "audio-file", - "image-file", - "pdf-file", - "gear", - "documents", - "blocks", - "go-to-file", - "presentation", - "cross-in-box", - "microphone", - "microphone-filled", - "link", - "popup-open", - "checkmark", - "hashtag", - "left-arrow-with-tail", - "right-arrow-with-tail", - "up-arrow-with-tail", - "down-arrow-with-tail", - "lines-of-text", - "vertical-three-dots", - "pin", - "magnifying-glass", - "info", - "horizontal-split", - "vertical-split", - "calendar-with-checkmark", - "sheets-in-box", - "up-and-down-arrows", - "broken-link", - "cross", - "any-key", - "reset", - "star", - "crossed-star", - "dice", - "filled-pin", - "enter", - "help", - "vault", - "open-vault", - "paper-plane", - "bullet-list", - "uppercase-lowercase-a", - "star-list", - "expand-vertically", - "languages", - "switch", - "pane-layout", - "install", - "sync", - "check-in-circle", - "sync-small", - "check-small", - "paused", - "forward-arrow", - "stacked-levels", - "bracket-glyph", - "note-glyph", - "tag-glyph", - "price-tag-glyph", - "heading-glyph", - "bold-glyph", - "italic-glyph", - "strikethrough-glyph", - "highlight-glyph", - "code-glyph", - "quote-glyph", - "link-glyph", - "bullet-list-glyph", - "number-list-glyph", - "checkbox-glyph", - "undo-glyph", - "redo-glyph", - "up-chevron-glyph", - "down-chevron-glyph", - "left-chevron-glyph", - "right-chevron-glyph", - "percent-sign-glyph", - "keyboard-glyph", - "double-up-arrow-glyph", - "double-down-arrow-glyph", - "image-glyph", - "wrench-screwdriver-glyph", - "clock", - "plus-with-circle", - "minus-with-circle", - "indent-glyph", - "unindent-glyph", - "fullscreen", - "exit-fullscreen", - "cloud", - "run-command", - "compress-glyph", - "enlarge-glyph", - "scissors-glyph", - "up-curly-arrow-glyph", - "down-curly-arrow-glyph", - "plus-minus-glyph", - "links-going-out", - "links-coming-in", - "add-note-glyph", - "duplicate-glyph", - "clock-glyph", - "calendar-glyph", - "command-glyph", - "dice-glyph", - "file-explorer-glyph", - "graph-glyph", - "import-glyph", - "navigate-glyph", - "open-elsewhere-glyph", - "bullet-list-glyph", - "presentation-glyph", - "paper-plane-glyph", - "question-mark-glyph", - "restore-file-glyph", - "search-glyph", - "star-glyph", - "play-audio-glyph", - "stop-audio-glyph", - "tomorrow-glyph", - "wand-glyph", - "workspace-glyph", - "yesterday-glyph", - "box-glyph", - "merge-files-glyph", - "merge-files", - "two-blank-pages", - "scissors", - "paste", - "paste-text", - "split", - "select-all-text", - "wand", - "github-glyph", - "reading-glasses", - "Activity", - "Airplay", - "AlarmCheck", - "AlarmClockOff", - "AlarmClock", - "AlarmMinus", - "AlarmPlus", - "Album", - "AlertCircle", - "AlertOctagon", - "AlertTriangle", - "AlignCenter", - "AlignJustify", - "AlignLeft", - "AlignRight", - "Anchor", - "Aperture", - "Archive", - "ArrowBigDown", - "ArrowBigLeft", - "ArrowBigRight", - "ArrowBigUp", - "ArrowDownCircle", - "ArrowDownLeft", - "ArrowDownRight", - "ArrowDown", - "ArrowLeftCircle", - "ArrowLeftRight", - "ArrowLeft", - "ArrowRightCircle", - "ArrowRight", - "ArrowUpCircle", - "ArrowUpLeft", - "ArrowUpRight", - "ArrowUp", - "Asterisk", - "AtSign", - "Award", - "Axe", - "Banknote", - "BarChart2", - "BarChart", - "BatteryCharging", - "BatteryFull", - "BatteryLow", - "BatteryMedium", - "Battery", - "Beaker", - "BellMinus", - "BellOff", - "BellPlus", - "BellRing", - "Bell", - "Bike", - "Binary", - "Bitcoin", - "BluetoothConnected", - "BluetoothOff", - "BluetoothSearching", - "Bluetooth", - "Bold", - "BookOpen", - "Book", - "BookmarkMinus", - "BookmarkPlus", - "Bookmark", - "Bot", - "BoxSelect", - "Box", - "Briefcase", - "Brush", - "Bug", - "Building", - "Bus", - "Calculator", - "Calendar", - "CameraOff", - "Camera", - "Car", - "Carrot", - "Cast", - "CheckCircle2", - "CheckCircle", - "CheckSquare", - "Check", - "ChevronDown", - "ChevronFirst", - "ChevronLast", - "ChevronLeft", - "ChevronRight", - "ChevronUp", - "ChevronsDownUp", - "ChevronsDown", - "ChevronsLeft", - "ChevronsRight", - "ChevronsUpDown", - "ChevronsUp", - "Chrome", - "CircleSlashed", - "Circle", - "ClipboardCheck", - "ClipboardCopy", - "ClipboardList", - "ClipboardX", - "Clipboard", - "Clock1", - "Clock10", - "Clock11", - "Clock12", - "Clock2", - "Clock3", - "Clock4", - "Clock5", - "Clock6", - "Clock7", - "Clock8", - "Clock9", - "Clock", - "CloudDrizzle", - "CloudFog", - "CloudHail", - "CloudLightning", - "CloudMoon", - "CloudOff", - "CloudRainWind", - "CloudRain", - "CloudSnow", - "CloudSun", - "Cloud", - "Cloudy", - "Clover", - "Code2", - "Code", - "Codepen", - "Codesandbox", - "Coffee", - "Coins", - "Columns", - "Command", - "Compass", - "Contact", - "Contrast", - "Cookie", - "Copy", - "Copyleft", - "Copyright", - "CornerDownLeft", - "CornerDownRight", - "CornerLeftDown", - "CornerLeftUp", - "CornerRightDown", - "CornerRightUp", - "CornerUpLeft", - "CornerUpRight", - "Cpu", - "CreditCard", - "Crop", - "Cross", - "Crosshair", - "Crown", - "Currency", - "Database", - "Delete", - "Disc", - "DivideCircle", - "DivideSquare", - "Divide", - "DollarSign", - "DownloadCloud", - "Download", - "Dribbble", - "Droplet", - "Droplets", - "Drumstick", - "Edit2", - "Edit3", - "Edit", - "Egg", - "EqualNot", - "Equal", - "Euro", - "Expand", - "ExternalLink", - "EyeOff", - "Eye", - "Facebook", - "FastForward", - "Feather", - "Figma", - "FileCheck2", - "FileCheck", - "FileCode", - "FileDigit", - "FileInput", - "FileMinus2", - "FileMinus", - "FileOutput", - "FilePlus2", - "FilePlus", - "FileSearch", - "FileText", - "FileX2", - "FileX", - "File", - "Files", - "Film", - "Filter", - "FlagTriangleLeft", - "FlagTriangleRight", - "Flag", - "Flame", - "FlashlightOff", - "Flashlight", - "FlaskConical", - "FlaskRound", - "FolderMinus", - "FolderOpen", - "FolderPlus", - "Folder", - "FormInput", - "Forward", - "Framer", - "Frown", - "FunctionSquare", - "Gamepad2", - "Gamepad", - "Gauge", - "Gavel", - "Gem", - "Ghost", - "Gift", - "GitBranchPlus", - "GitBranch", - "GitCommit", - "GitMerge", - "GitPullRequest", - "Github", - "Gitlab", - "Glasses", - "Globe2", - "Globe", - "Grab", - "GraduationCap", - "Grid", - "GripHorizontal", - "GripVertical", - "Hammer", - "HandMetal", - "Hand", - "HardDrive", - "HardHat", - "Hash", - "Haze", - "Headphones", - "Heart", - "HelpCircle", - "Hexagon", - "Highlighter", - "History", - "Home", - "ImageMinus", - "ImageOff", - "ImagePlus", - "Image", - "Import", - "Inbox", - "Indent", - "IndianRupee", - "Infinity", - "Info", - "Inspect", - "Instagram", - "Italic", - "JapaneseYen", - "Key", - "Landmark", - "Languages", - "Laptop2", - "Laptop", - "LassoSelect", - "Lasso", - "Layers", - "LayoutDashboard", - "LayoutGrid", - "LayoutList", - "LayoutTemplate", - "Layout", - "Library", - "LifeBuoy", - "LightbulbOff", - "Lightbulb", - "Link2Off", - "Link2", - "Link", - "Linkedin", - "ListChecks", - "ListMinus", - "ListOrdered", - "ListPlus", - "ListX", - "List", - "Loader2", - "Loader", - "LocateFixed", - "Locate", - "Lock", - "LogIn", - "LogOut", - "Mail", - "MapPin", - "Map", - "Maximize2", - "Maximize", - "Megaphone", - "Meh", - "Menu", - "MessageCircle", - "MessageSquare", - "MicOff", - "Mic", - "Minimize2", - "Minimize", - "MinusCircle", - "MinusSquare", - "Minus", - "MonitorOff", - "MonitorSpeaker", - "Monitor", - "Moon", - "MoreHorizontal", - "MoreVertical", - "MountainSnow", - "Mountain", - "MousePointer2", - "MousePointerClick", - "MousePointer", - "MoveDiagonal2", - "MoveDiagonal", - "MoveHorizontal", - "MoveVertical", - "Move", - "Music", - "Navigation2", - "Navigation", - "Network", - "Octagon", - "Option", - "Outdent", - "PackageCheck", - "PackageMinus", - "PackagePlus", - "PackageSearch", - "PackageX", - "Package", - "Palette", - "Paperclip", - "PauseCircle", - "PauseOctagon", - "Pause", - "PenTool", - "Pencil", - "Percent", - "PersonStanding", - "PhoneCall", - "PhoneForwarded", - "PhoneIncoming", - "PhoneMissed", - "PhoneOff", - "PhoneOutgoing", - "Phone", - "PieChart", - "PiggyBank", - "Pin", - "Pipette", - "Plane", - "PlayCircle", - "Play", - "PlugZap", - "PlusCircle", - "PlusSquare", - "Plus", - "Pocket", - "Podcast", - "Pointer", - "PoundSterling", - "PowerOff", - "Power", - "Printer", - "QrCode", - "Quote", - "RadioReceiver", - "Radio", - "Redo", - "RefreshCcw", - "RefreshCw", - "Regex", - "Repeat1", - "Repeat", - "ReplyAll", - "Reply", - "Rewind", - "RockingChair", - "RotateCcw", - "RotateCw", - "Rss", - "Ruler", - "RussianRuble", - "Save", - "Scale", - "ScanLine", - "Scan", - "Scissors", - "ScreenShareOff", - "ScreenShare", - "Search", - "Send", - "SeparatorHorizontal", - "SeparatorVertical", - "ServerCrash", - "ServerOff", - "Server", - "Settings2", - "Settings", - "Share2", - "Share", - "Sheet", - "ShieldAlert", - "ShieldCheck", - "ShieldClose", - "ShieldOff", - "Shield", - "Shirt", - "ShoppingBag", - "ShoppingCart", - "Shovel", - "Shrink", - "Shuffle", - "SidebarClose", - "SidebarOpen", - "Sidebar", - "Sigma", - "SignalHigh", - "SignalLow", - "SignalMedium", - "SignalZero", - "Signal", - "SkipBack", - "SkipForward", - "Skull", - "Slack", - "Slash", - "Sliders", - "SmartphoneCharging", - "Smartphone", - "Smile", - "Snowflake", - "SortAsc", - "SortDesc", - "Speaker", - "Sprout", - "Square", - "StarHalf", - "Star", - "StopCircle", - "Strikethrough", - "Subscript", - "Sun", - "Sunrise", - "Sunset", - "Superscript", - "SwissFranc", - "SwitchCamera", - "Table", - "Tablet", - "Tag", - "Target", - "Tent", - "TerminalSquare", - "Terminal", - "TextCursorInput", - "TextCursor", - "ThermometerSnowflake", - "ThermometerSun", - "Thermometer", - "ThumbsDown", - "ThumbsUp", - "Ticket", - "TimerOff", - "TimerReset", - "Timer", - "ToggleLeft", - "ToggleRight", - "Tornado", - "Trash2", - "Trash", - "Trello", - "TrendingDown", - "TrendingUp", - "Triangle", - "Truck", - "Tv2", - "Tv", - "Twitch", - "Twitter", - "Type", - "Umbrella", - "Underline", - "Undo", - "Unlink2", - "Unlink", - "Unlock", - "UploadCloud", - "Upload", - "UserCheck", - "UserMinus", - "UserPlus", - "UserX", - "User", - "Users", - "Verified", - "Vibrate", - "VideoOff", - "Video", - "View", - "Voicemail", - "Volume1", - "Volume2", - "VolumeX", - "Volume", - "Wallet", - "Wand", - "Watch", - "Webcam", - "WifiOff", - "Wifi", - "Wind", - "WrapText", - "Wrench", - "XCircle", - "XOctagon", - "XSquare", - "X", - "Youtube", - "ZapOff", - "Zap", - "ZoomIn", - "ZoomOut" -] as const;