@figma/code-connect
Version:
A tool for connecting your design system components in code with your design system in Figma
33 lines • 964 B
TypeScript
/**
* Default Code Connect labels for native parsers
*/
export declare enum CodeConnectLabel {
React = "React",
Storybook = "Storybook",
SwiftUI = "SwiftUI",
Compose = "Compose",
WebComponents = "Web Components",
HTML = "HTML",
Vue = "Vue",
Angular = "Angular",
Code = "Code"
}
/**
* Supported Code Connect languages for syntax highlighting and formatting
*/
export declare enum CodeConnectLanguage {
TypeScript = "typescript",
Swift = "swift",
Kotlin = "kotlin",
HTML = "html",
Raw = "raw"
}
/**
* Infers the appropriate language for a raw template file based on its label.
* Falls back to 'raw' if the label is not recognized.
*
* @param label - The label associated with the Code Connect file
* @returns The corresponding language identifier for syntax highlighting
*/
export declare function getInferredLanguageForRaw(label: string): string;
//# sourceMappingURL=label_language_mapping.d.ts.map