@promptui-lib/codegen 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +502 -0
- package/dist/frameworks/bootstrap.template.d.ts +2 -2
- package/dist/frameworks/bootstrap.template.d.ts.map +1 -1
- package/dist/frameworks/bootstrap.template.js +30 -5
- package/dist/frameworks/flutter.template.d.ts +10 -0
- package/dist/frameworks/flutter.template.d.ts.map +1 -0
- package/dist/frameworks/flutter.template.js +217 -0
- package/dist/frameworks/index.d.ts +4 -2
- package/dist/frameworks/index.d.ts.map +1 -1
- package/dist/frameworks/index.js +19 -1
- package/dist/frameworks/mui.template.d.ts +2 -2
- package/dist/frameworks/mui.template.d.ts.map +1 -1
- package/dist/frameworks/mui.template.js +36 -7
- package/dist/frameworks/swiftui.template.d.ts +10 -0
- package/dist/frameworks/swiftui.template.d.ts.map +1 -0
- package/dist/frameworks/swiftui.template.js +247 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/mappings/component-mappings.d.ts +61 -0
- package/dist/mappings/component-mappings.d.ts.map +1 -0
- package/dist/mappings/component-mappings.js +1093 -0
- package/dist/mappings/index.d.ts +6 -0
- package/dist/mappings/index.d.ts.map +1 -0
- package/dist/mappings/index.js +5 -0
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component Mappings
|
|
3
|
+
* Maps Figma frame names to framework-specific components
|
|
4
|
+
*/
|
|
5
|
+
export interface IComponentMapping {
|
|
6
|
+
/** Bootstrap classes/structure */
|
|
7
|
+
bootstrap: {
|
|
8
|
+
tag: string;
|
|
9
|
+
classes: string[];
|
|
10
|
+
wrapper?: string;
|
|
11
|
+
children?: string;
|
|
12
|
+
};
|
|
13
|
+
/** MUI component */
|
|
14
|
+
mui: {
|
|
15
|
+
component: string;
|
|
16
|
+
props?: Record<string, string>;
|
|
17
|
+
imports?: string[];
|
|
18
|
+
};
|
|
19
|
+
/** Tailwind classes */
|
|
20
|
+
tailwind: {
|
|
21
|
+
tag: string;
|
|
22
|
+
classes: string[];
|
|
23
|
+
};
|
|
24
|
+
/** React + SCSS (custom implementation) */
|
|
25
|
+
scss: {
|
|
26
|
+
tag: string;
|
|
27
|
+
baseClass: string;
|
|
28
|
+
/** If true, generates animation keyframes */
|
|
29
|
+
hasAnimation?: boolean;
|
|
30
|
+
animationName?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Flutter widget */
|
|
33
|
+
flutter: {
|
|
34
|
+
widget: string;
|
|
35
|
+
props?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
/** SwiftUI view */
|
|
38
|
+
swiftui: {
|
|
39
|
+
view: string;
|
|
40
|
+
modifiers?: string[];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Component mappings by name
|
|
45
|
+
* Key is the component name (without #), case-insensitive matching
|
|
46
|
+
*/
|
|
47
|
+
export declare const COMPONENT_MAPPINGS: Record<string, IComponentMapping>;
|
|
48
|
+
/**
|
|
49
|
+
* Get component mapping by name (case-insensitive)
|
|
50
|
+
*/
|
|
51
|
+
export declare function getComponentMapping(name: string): IComponentMapping | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Check if a component name has a mapping
|
|
54
|
+
*/
|
|
55
|
+
export declare function hasComponentMapping(name: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Extract component type from name
|
|
58
|
+
* e.g., "#ButtonPrimary" -> "button", "#CardProduct" -> "card"
|
|
59
|
+
*/
|
|
60
|
+
export declare function extractComponentType(name: string): string | null;
|
|
61
|
+
//# sourceMappingURL=component-mappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-mappings.d.ts","sourceRoot":"","sources":["../../src/mappings/component-mappings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,kCA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