/** * Figma URL Parser * * Parses Figma URLs and identifiers to extract file keys and node IDs. */ export interface FigmaUrlParts { /** The Figma file key (22 character alphanumeric) */ fileKey: string; /** Optional node IDs extracted from URL */ nodeIds?: string[]; /** Optional file name from URL */ fileName?: string; } /** * Parse a Figma URL or file key into its component parts * * Supported formats: * - Direct file key: "ABC123xyz..." * - File URL: https://www.figma.com/file/FILEKEY/FileName * - Design URL: https://www.figma.com/design/FILEKEY/FileName * - With node selection: https://www.figma.com/file/FILEKEY/FileName?node-id=X:Y * - With multiple nodes: https://www.figma.com/file/FILEKEY/FileName?node-id=X:Y,A:B * * @param input - Figma URL or file key * @returns Parsed URL parts */ export declare function parseFigmaUrl(input: string): FigmaUrlParts; /** * Check if a string looks like a Figma URL */ export declare function isFigmaUrl(input: string): boolean; /** * Format node IDs for API request (comma-separated, URL-encoded) */ export declare function formatNodeIds(nodeIds: string[]): string; /** * Convert Figma node ID to a safe filename * Node IDs are in format "X:Y" which isn't filesystem-safe */ export declare function nodeIdToFilename(nodeId: string): string; //# sourceMappingURL=url-parser.d.ts.map