UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

35 lines (34 loc) 1.62 kB
import { ProjectItemType } from "./IProjectItemData"; import { ProjectItemTypeGroup } from "./ProjectItemTypeInfo"; /** * Base path for item type SVG icons (relative to the content web root). * In VS Code webviews this needs to be resolved against * `CreatorToolsHost.contentWebRoot` (the `asWebviewUri` of the extension * root), because absolute paths like "/res/..." resolve to the webview * sandbox origin and get a 403. In the web build `contentWebRoot` is empty * and the path stays relative to the page, which is also correct. */ export declare const ICON_BASE_PATH = "res/icons/itemtypes"; /** * Maps specific ProjectItemType values to their SVG icon filenames. * If a type is not listed here, it falls back to its group icon. */ export declare const ProjectItemTypeIconFiles: Partial<Record<ProjectItemType, string>>; /** * Maps ProjectItemTypeGroup to their SVG icon filenames. * Used as fallback when no specific icon exists for an item type. */ export declare const ProjectItemTypeGroupIconFiles: Record<ProjectItemTypeGroup, string>; /** * Gets the SVG icon filename for a specific project item type. * Falls back to group icon if no specific icon is defined. */ export declare function getIconFilenameForProjectItemType(itemType: ProjectItemType): string; /** * Gets the full path to the SVG icon for a project item type. */ export declare function getIconPathForProjectItemType(itemType: ProjectItemType): string; /** * Gets the full path to the SVG icon for a project item type group. */ export declare function getIconPathForProjectItemTypeGroup(group: ProjectItemTypeGroup): string;