diff --git a/packages/data-sdk/src/App.ts b/packages/data-sdk/src/App.ts index 12adcf8d9..717ffe794 100644 --- a/packages/data-sdk/src/App.ts +++ b/packages/data-sdk/src/App.ts @@ -3,6 +3,7 @@ import { FORMANT_API_URL } from "./config"; import { QueryStore } from "./cache/queryStore"; import { IStreamData, ITags, StreamType } from "./main"; import { JsonSchema } from "./model/JsonSchema"; +import { IconName } from "./model/IconName"; const queryStore = new QueryStore(); @@ -35,7 +36,7 @@ export type AppMessage = | { type: "setup_module_menus"; module: string; - menus: { label: string }[]; + menus: { label: string; icon?: IconName }[]; } | { type: "send_channel_data"; @@ -235,7 +236,7 @@ export class App { }); } - static setupModuleMenus(menus: { label: string }[]) { + static setupModuleMenus(menus: { label: string; icon?: IconName }[]) { const moduleName = this.getCurrentModuleContext(); if (!moduleName) { throw new Error("No module context"); diff --git a/packages/data-sdk/src/model/IconName.ts b/packages/data-sdk/src/model/IconName.ts new file mode 100644 index 000000000..4c97845ce --- /dev/null +++ b/packages/data-sdk/src/model/IconName.ts @@ -0,0 +1,3 @@ +import { icons } from "./icons"; + +export type IconName = (typeof icons)[number]; diff --git a/packages/data-sdk/src/model/icons.ts b/packages/data-sdk/src/model/icons.ts new file mode 100644 index 000000000..203b3d6da --- /dev/null +++ b/packages/data-sdk/src/model/icons.ts @@ -0,0 +1,117 @@ +export const icons = [ + "add-small", + "annotation", + "audio", + "audio-muted", + "audio-volume-0", + "audio-volume-half", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-up", + "board", + "arrow", + "assistance", + "battery", + "bitset", + "capture", + "channel", + "check", + "chevron-up", + "chevron-down", + "chevron-left", + "chevron-right", + "clock", + "clone", + "close", + "close-large", + "command", + "comment", + "configuration", + "copy", + "critical", + "cube", + "delete", + "device", + "down", + "dropdown", + "download", + "download-18", + "duration", + "edit", + "edit-layout", + "error", + "event", + "expand", + "eye", + "eye_closed", + "collapse", + "favorite", + "file", + "filter", + "gamepad", + "group", + "forward", + "fullscreen", + "goal", + "hardware", + "health", + "help", + "image", + "integration", + "joystick-star", + "jump", + "json", + "link", + "localization", + "location", + "location-arrow", + "location-arrow-fill", + "location-arrow-slash", + "menu", + "minus", + "more", + "next", + "numeric", + "on-demand", + "offline", + "online", + "organization", + "overview", + "pause", + "play", + "playback", + "plus", + "previous", + "recenter", + "refresh", + "remove", + "relocalization", + "search", + "seek-option", + "seek-next", + "seek-previous", + "settings", + "share", + "shift", + "stop", + "stream", + "tags", + "teams", + "teleop", + "text", + "tools", + "undo", + "up", + "user", + "utility", + "video", + "video-off", + "view", + "warning", + "infinity", + "code", + "access", + "ros", + "adapter", +] as const;