Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

1.1 KB
Raw Blame
import { resolveScreenshot } from "./locale";
import type { ProjectState } from "./types";

/** Only assets used by the deck being exported; inactive decks may be unfinished. */
export function exportAssetPaths(state: ProjectState): string[] {
  const paths = new Set<string>();
  const add = (path: string | undefined) => { if (path) paths.add(path); };
  for (const slide of state.slidesByDevice[state.device] || []) {
    if (state.device === "feature-graphic" || slide.layout === "feature-graphic") {
      add(state.appIcon);
      continue;
    }
    if (slide.layout !== "no-device" || slide.transforms?.device || slide.transforms?.deviceSecondary) {
      if (state.device === "iphone") add("/mockup.png");
      for (const locale of state.locales) {
        add(resolveScreenshot(slide.screenshot, locale));
        if (slide.layout === "two-devices" || slide.transforms?.deviceSecondary) {
          add(resolveScreenshot(slide.screenshotSecondary, locale));
        }
      }
    }
    for (const image of slide.imageElements || []) add(image.src);
  }
  return [...paths];
}