index.ts
1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ============= All Types Export =============
// Export all types for internal use and advanced users
export * from './types/index';
// ============= SKILL API Exports =============
// Export all skill-api utilities for IDE integration (Cursor, Claude Code, etc.)
// This includes:
// - Type exports: Protocol, FrameData, FigmaFrameInfo, FigmaUrlInfo, WorkspaceStructure
// - Initial agent: INITIAL_AGENT_SYSTEM_PROMPT, initialAgentInstruction
// - Figma processing: executeFigmaAndImagesActions, figmaTool
// - Protocol utilities: extractNodePositionsHierarchical, postProcessStructure, etc.
// - Prompt generation: generateStructurePrompt, extractDataListPrompt
// - Helper functions: extractComponentGroups, prepareComponentDataForAI, etc.
// - JSON parser: extractJSON
// - Naming utilities: toKebabCase
export * from './skill-api';
// ============= Engine API Exports =============
// The primary entry point used by the orchestration backend (apps/server) to
// generate a React project from a Figma URL. `Design2CodeOptions` accepts an
// optional `modelConfig` so the backend can inject credentials at runtime.
export { design2code } from './graph';
export type { Design2CodeOptions } from './graph';
// ============= Orchestration Backend Support =============
// Helpers the apps/server backend needs so it can own credentials, stream logs,
// and drive generation without reaching into internal modules.
export { subscribeLogs, logger } from './utils/logger';
export type { LogEntry, LogLevel } from './utils/logger';
export {
loadConfig,
configExists,
getConfigPath,
saveConfig,
setRuntimeConfig,
clearRuntimeConfig,
} from './utils/config';
export type { ModelConfig, FigmaConfig } from './utils/config';
export { patchEvoltagentStreamingForceOff } from './utils/patch-evoltagent';
export { parseFigmaUrl } from './utils/url-parser';