Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

677 B
Raw Blame
import { getTemplate, getTheme, getTemplates, getThemes, parseSyntax } from "@antv/infographic";
import type { InfographicSyntaxAdapter } from "@edgeever/shared";

export const infographicSyntaxAdapter: InfographicSyntaxAdapter = {
  parse: syntax => {
    const parsed = parseSyntax(syntax);
    return { options: parsed.options as ReturnType<InfographicSyntaxAdapter["parse"]>["options"], errors: parsed.errors, warnings: parsed.warnings };
  },
  hasTemplate: template => Boolean(getTemplate(template)),
  hasTheme: theme => Boolean(getTheme(theme)),
};

export const infographicCapabilities = () => ({ templates: getTemplates(), themes: getThemes(), maxOperations: 100 });