/** * Figma Integration * * Fetches design specifications, tokens, components, and assets from Figma. * * Capabilities: * - spec: Fetch design specs as markdown for AI coding loops * - tokens: Extract design tokens (colors, typography, spacing) * - components: Generate component code (React, Vue, Svelte, HTML) * - assets: Export icons and images (SVG, PNG, PDF) */ import { type AuthMethod, BaseIntegration, type IntegrationOptions, type IntegrationResult } from '../base.js'; import type { FigmaIntegrationOptions } from './types.js'; export declare class FigmaIntegration extends BaseIntegration { name: string; displayName: string; description: string; website: string; authMethods: AuthMethod[]; private readonly API_BASE; /** * Whether we detected a low-budget plan (starter/free with low limit-type). * When true, skip non-essential API calls (icons, screenshots) to conserve * the tiny request budget (6 req/month on starter-low). */ private lowBudget; fetch(identifier: string, options?: IntegrationOptions & FigmaIntegrationOptions): Promise; /** * Fetch design specifications as markdown */ private fetchDesignSpec; /** * Extract design tokens from a Figma file */ private fetchDesignTokens; /** * Generate component code from Figma components */ private fetchAndGenerateComponents; /** * Export assets (icons, images) from Figma */ private fetchAssets; /** * Fetch download URLs for all image fills in a Figma file. * Uses the /files/{key}/images endpoint which returns URLs for all imageRef values. */ private fetchImageFillUrls; /** * Collect top-level frame IDs for rendering as screenshots. * Uses selectPrimaryFrames to avoid screenshotting duplicate frames. * Returns up to `limit` frame IDs. */ private collectTopLevelFrameIds; /** * Extract text content and information architecture from Figma */ private fetchContentExtraction; /** * Find component nodes in a document */ private findComponents; /** * Find asset nodes (icons, logos, etc.) in a document */ private findAssetNodes; private static readonly CACHE_DIR; private static readonly CACHE_TTL_MS; private getCachePath; private readCache; private writeCache; /** * Make an API request to Figma with timeout, caching, and single retry on 429. * @param essential - If true, retries once on 429. If false, throws immediately on 429. */ private apiRequest; getHelp(): string; } //# sourceMappingURL=source.d.ts.map