figma-to-code-agent 0.3.0
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/CHANGELOG.md +55 -0
- package/LICENSE +21 -0
- package/QUICKSTART.md +198 -0
- package/README.md +149 -0
- package/dist/FigmaToCodeAgent.d.ts +55 -0
- package/dist/FigmaToCodeAgent.d.ts.map +1 -0
- package/dist/FigmaToCodeAgent.js +251 -0
- package/dist/FigmaToCodeAgent.js.map +1 -0
- package/dist/assets/index.d.ts +6 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +7 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +261 -0
- package/dist/cli.js.map +1 -0
- package/dist/extraction/FigmaAPIClient.d.ts +53 -0
- package/dist/extraction/FigmaAPIClient.d.ts.map +1 -0
- package/dist/extraction/FigmaAPIClient.js +275 -0
- package/dist/extraction/FigmaAPIClient.js.map +1 -0
- package/dist/extraction/FigmaCache.d.ts +28 -0
- package/dist/extraction/FigmaCache.d.ts.map +1 -0
- package/dist/extraction/FigmaCache.js +120 -0
- package/dist/extraction/FigmaCache.js.map +1 -0
- package/dist/extraction/MCPClient.d.ts +75 -0
- package/dist/extraction/MCPClient.d.ts.map +1 -0
- package/dist/extraction/MCPClient.js +254 -0
- package/dist/extraction/MCPClient.js.map +1 -0
- package/dist/extraction/index.d.ts +9 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +27 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/types.d.ts +122 -0
- package/dist/extraction/types.d.ts.map +1 -0
- package/dist/extraction/types.js +6 -0
- package/dist/extraction/types.js.map +1 -0
- package/dist/generation/AICodeOptimizer.d.ts +10 -0
- package/dist/generation/AICodeOptimizer.d.ts.map +1 -0
- package/dist/generation/AICodeOptimizer.js +33 -0
- package/dist/generation/AICodeOptimizer.js.map +1 -0
- package/dist/generation/ReactGenerator.d.ts +27 -0
- package/dist/generation/ReactGenerator.d.ts.map +1 -0
- package/dist/generation/ReactGenerator.js +423 -0
- package/dist/generation/ReactGenerator.js.map +1 -0
- package/dist/generation/VueGenerator.d.ts +23 -0
- package/dist/generation/VueGenerator.d.ts.map +1 -0
- package/dist/generation/VueGenerator.js +337 -0
- package/dist/generation/VueGenerator.js.map +1 -0
- package/dist/generation/index.d.ts +6 -0
- package/dist/generation/index.d.ts.map +1 -0
- package/dist/generation/index.js +7 -0
- package/dist/generation/index.js.map +1 -0
- package/dist/generation/types.d.ts +24 -0
- package/dist/generation/types.d.ts.map +1 -0
- package/dist/generation/types.js +3 -0
- package/dist/generation/types.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/BedrockProvider.d.ts +8 -0
- package/dist/llm/BedrockProvider.d.ts.map +1 -0
- package/dist/llm/BedrockProvider.js +34 -0
- package/dist/llm/BedrockProvider.js.map +1 -0
- package/dist/llm/LLMFactory.d.ts +5 -0
- package/dist/llm/LLMFactory.d.ts.map +1 -0
- package/dist/llm/LLMFactory.js +21 -0
- package/dist/llm/LLMFactory.js.map +1 -0
- package/dist/llm/OpenAIProvider.d.ts +7 -0
- package/dist/llm/OpenAIProvider.d.ts.map +1 -0
- package/dist/llm/OpenAIProvider.js +34 -0
- package/dist/llm/OpenAIProvider.js.map +1 -0
- package/dist/llm/index.d.ts +5 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +21 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/types.d.ts +23 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +3 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/transformation/ASTFactory.d.ts +92 -0
- package/dist/transformation/ASTFactory.d.ts.map +1 -0
- package/dist/transformation/ASTFactory.js +240 -0
- package/dist/transformation/ASTFactory.js.map +1 -0
- package/dist/transformation/ASTParser.d.ts +13 -0
- package/dist/transformation/ASTParser.d.ts.map +1 -0
- package/dist/transformation/ASTParser.js +177 -0
- package/dist/transformation/ASTParser.js.map +1 -0
- package/dist/transformation/TransformationPipeline.d.ts +31 -0
- package/dist/transformation/TransformationPipeline.d.ts.map +1 -0
- package/dist/transformation/TransformationPipeline.js +42 -0
- package/dist/transformation/TransformationPipeline.js.map +1 -0
- package/dist/transformation/index.d.ts +7 -0
- package/dist/transformation/index.d.ts.map +1 -0
- package/dist/transformation/index.js +25 -0
- package/dist/transformation/index.js.map +1 -0
- package/dist/transformation/transformers/AIComponentSplitter.d.ts +14 -0
- package/dist/transformation/transformers/AIComponentSplitter.d.ts.map +1 -0
- package/dist/transformation/transformers/AIComponentSplitter.js +71 -0
- package/dist/transformation/transformers/AIComponentSplitter.js.map +1 -0
- package/dist/transformation/transformers/AILayoutAnalyzer.d.ts +18 -0
- package/dist/transformation/transformers/AILayoutAnalyzer.d.ts.map +1 -0
- package/dist/transformation/transformers/AILayoutAnalyzer.js +125 -0
- package/dist/transformation/transformers/AILayoutAnalyzer.js.map +1 -0
- package/dist/transformation/transformers/AISemanticNamer.d.ts +12 -0
- package/dist/transformation/transformers/AISemanticNamer.d.ts.map +1 -0
- package/dist/transformation/transformers/AISemanticNamer.js +50 -0
- package/dist/transformation/transformers/AISemanticNamer.js.map +1 -0
- package/dist/transformation/transformers/ComponentExtractor.d.ts +16 -0
- package/dist/transformation/transformers/ComponentExtractor.d.ts.map +1 -0
- package/dist/transformation/transformers/ComponentExtractor.js +91 -0
- package/dist/transformation/transformers/ComponentExtractor.js.map +1 -0
- package/dist/transformation/transformers/FigmaLayerPreserver.d.ts +14 -0
- package/dist/transformation/transformers/FigmaLayerPreserver.d.ts.map +1 -0
- package/dist/transformation/transformers/FigmaLayerPreserver.js +48 -0
- package/dist/transformation/transformers/FigmaLayerPreserver.js.map +1 -0
- package/dist/transformation/transformers/FigmaStructureOptimizer.d.ts +16 -0
- package/dist/transformation/transformers/FigmaStructureOptimizer.d.ts.map +1 -0
- package/dist/transformation/transformers/FigmaStructureOptimizer.js +65 -0
- package/dist/transformation/transformers/FigmaStructureOptimizer.js.map +1 -0
- package/dist/transformation/transformers/FlattenTransformer.d.ts +15 -0
- package/dist/transformation/transformers/FlattenTransformer.d.ts.map +1 -0
- package/dist/transformation/transformers/FlattenTransformer.js +69 -0
- package/dist/transformation/transformers/FlattenTransformer.js.map +1 -0
- package/dist/transformation/transformers/LayoutOptimizer.d.ts +15 -0
- package/dist/transformation/transformers/LayoutOptimizer.d.ts.map +1 -0
- package/dist/transformation/transformers/LayoutOptimizer.js +63 -0
- package/dist/transformation/transformers/LayoutOptimizer.js.map +1 -0
- package/dist/transformation/transformers/SemanticNamer.d.ts +14 -0
- package/dist/transformation/transformers/SemanticNamer.d.ts.map +1 -0
- package/dist/transformation/transformers/SemanticNamer.js +65 -0
- package/dist/transformation/transformers/SemanticNamer.js.map +1 -0
- package/dist/transformation/transformers/SimplifyTransformer.d.ts +23 -0
- package/dist/transformation/transformers/SimplifyTransformer.d.ts.map +1 -0
- package/dist/transformation/transformers/SimplifyTransformer.js +138 -0
- package/dist/transformation/transformers/SimplifyTransformer.js.map +1 -0
- package/dist/transformation/types.d.ts +129 -0
- package/dist/transformation/types.d.ts.map +1 -0
- package/dist/transformation/types.js +7 -0
- package/dist/transformation/types.js.map +1 -0
- package/dist/validation/index.d.ts +6 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +7 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +81 -0
- package/test-app/test-react/index.html +19 -0
- package/test-app/test-react/package.json +16 -0
- package/test-app/test-react/src/Component.jsx +146 -0
- package/test-app/test-react/src/Component.module.css +572 -0
- package/test-app/test-react/src/Homepage.jsx +53 -0
- package/test-app/test-react/src/Homepage.module.css +218 -0
- package/test-app/test-react/src/ProductPage.jsx +74 -0
- package/test-app/test-react/src/ProductPage.module.css +357 -0
- package/test-app/test-react/src/ShoppingCart.jsx +151 -0
- package/test-app/test-react/src/ShoppingCart.module.css +739 -0
- package/test-app/test-react/src/main.jsx +9 -0
- package/test-app/test-react/vite.config.js +6 -0
- package/test-app/test-vue/index.html +19 -0
- package/test-app/test-vue/package.json +15 -0
- package/test-app/test-vue/src/App.vue +16 -0
- package/test-app/test-vue/src/Component.vue +723 -0
- package/test-app/test-vue/src/Homepage.vue +271 -0
- package/test-app/test-vue/src/ProductPage.vue +431 -0
- package/test-app/test-vue/src/ShoppingCart.vue +890 -0
- package/test-app/test-vue/src/main.js +4 -0
- package/test-app/test-vue/vite.config.js +6 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import styles from './ShoppingCart.module.css'
|
|
3
|
+
import imged_o_neil_avvdzlhdowa_unsplash_1 from './assets/ed-o-neil-avvdzlhdowa-unsplash-1.png'
|
|
4
|
+
import imgnoonbrew_zicb4_ekmak_unsplash from './assets/noonbrew-zicb4_ekmak-unsplash.png'
|
|
5
|
+
import imgk8_0_fkphulv_m_unsplash_2 from './assets/k8-0_fkphulv-m-unsplash-2.png'
|
|
6
|
+
|
|
7
|
+
export function ShoppingCart(props) {
|
|
8
|
+
return (
|
|
9
|
+
<div className={styles['shopping-cart']}>
|
|
10
|
+
{/* tomato */}
|
|
11
|
+
<div className={styles['tomato']}>
|
|
12
|
+
{/* heirloomTomato */}
|
|
13
|
+
<span className={styles['heirloom-tomato']}>Heirloom tomato</span>
|
|
14
|
+
{/* 599 */}
|
|
15
|
+
<span className={styles['element']}>$5.99</span>
|
|
16
|
+
{/* 599Lb */}
|
|
17
|
+
<span className={styles['lb']}>$5.99 / lb</span>
|
|
18
|
+
{/* inputField */}
|
|
19
|
+
<div className={styles['input-field']}>
|
|
20
|
+
{/* 1Lb */}
|
|
21
|
+
<span className={styles['lb-1']}>1 lb</span>
|
|
22
|
+
{/* icon */}
|
|
23
|
+
<div className={styles['icon']}>
|
|
24
|
+
{/* union */}
|
|
25
|
+
<div className={styles['union']}>
|
|
26
|
+
{/* union */}
|
|
27
|
+
<div className={styles['union-1']}>
|
|
28
|
+
{/* rectangle4 */}
|
|
29
|
+
<div className={styles['rectangle4']} />
|
|
30
|
+
{/* rectangle5 */}
|
|
31
|
+
<div className={styles['rectangle5']} />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
{/* edONeil */}
|
|
37
|
+
<img className={styles['ed-oneil']} src={imged_o_neil_avvdzlhdowa_unsplash_1} alt="edONeil" />
|
|
38
|
+
</div>
|
|
39
|
+
{/* ginger */}
|
|
40
|
+
<div className={styles['ginger']}>
|
|
41
|
+
{/* organicGinger */}
|
|
42
|
+
<span className={styles['organic-ginger']}>Organic ginger</span>
|
|
43
|
+
{/* 1299Lb */}
|
|
44
|
+
<span className={styles['lb-2']}>$12.99 / lb</span>
|
|
45
|
+
{/* inputField */}
|
|
46
|
+
<div className={styles['input-field-1']}>
|
|
47
|
+
{/* 05Lb */}
|
|
48
|
+
<span className={styles['lb-3']}>0.5 lb</span>
|
|
49
|
+
{/* icon */}
|
|
50
|
+
<div className={styles['icon-1']}>
|
|
51
|
+
{/* union */}
|
|
52
|
+
<div className={styles['union-2']}>
|
|
53
|
+
{/* union */}
|
|
54
|
+
<div className={styles['union-3']}>
|
|
55
|
+
{/* rectangle4 */}
|
|
56
|
+
<div className={styles['rectangle4-1']} />
|
|
57
|
+
{/* rectangle5 */}
|
|
58
|
+
<div className={styles['rectangle5-1']} />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{/* 650 */}
|
|
64
|
+
<span className={styles['element-1']}>$6.50</span>
|
|
65
|
+
{/* noonbrewZicb4Ekmak */}
|
|
66
|
+
<img className={styles['noonbrew-zicb4ekmak']} src={imgnoonbrew_zicb4_ekmak_unsplash} alt="noonbrewZicb4Ekmak" />
|
|
67
|
+
</div>
|
|
68
|
+
{/* onion */}
|
|
69
|
+
<div className={styles['onion']}>
|
|
70
|
+
{/* sweetOnion */}
|
|
71
|
+
<span className={styles['sweet-onion']}>Sweet onion</span>
|
|
72
|
+
{/* 299Lb */}
|
|
73
|
+
<span className={styles['lb-4']}>$2.99 / lb</span>
|
|
74
|
+
{/* inputField */}
|
|
75
|
+
<div className={styles['input-field-2']}>
|
|
76
|
+
{/* 5Lb */}
|
|
77
|
+
<span className={styles['lb-5']}>5 lb</span>
|
|
78
|
+
{/* icon */}
|
|
79
|
+
<div className={styles['icon-2']}>
|
|
80
|
+
{/* union */}
|
|
81
|
+
<div className={styles['union-4']}>
|
|
82
|
+
{/* union */}
|
|
83
|
+
<div className={styles['union-5']}>
|
|
84
|
+
{/* rectangle4 */}
|
|
85
|
+
<div className={styles['rectangle4-2']} />
|
|
86
|
+
{/* rectangle5 */}
|
|
87
|
+
<div className={styles['rectangle5-2']} />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
{/* 1495 */}
|
|
93
|
+
<span className={styles['element-2']}>$14.95</span>
|
|
94
|
+
{/* k80Fkphulv */}
|
|
95
|
+
<img className={styles['k80fkphulv']} src={imgk8_0_fkphulv_m_unsplash_2} alt="k80Fkphulv" />
|
|
96
|
+
</div>
|
|
97
|
+
{/* summary */}
|
|
98
|
+
<div className={styles['summary']}>
|
|
99
|
+
{/* orderSummary */}
|
|
100
|
+
<span className={styles['order-summary']}>Order summary</span>
|
|
101
|
+
{/* subtotal */}
|
|
102
|
+
<span className={styles['subtotal']}>Subtotal</span>
|
|
103
|
+
{/* 2744 */}
|
|
104
|
+
<span className={styles['element-3']}>$27.44</span>
|
|
105
|
+
{/* shipping */}
|
|
106
|
+
<span className={styles['shipping']}>Shipping</span>
|
|
107
|
+
{/* 399 */}
|
|
108
|
+
<span className={styles['element-4']}>$3.99</span>
|
|
109
|
+
{/* tax */}
|
|
110
|
+
<span className={styles['tax']}>Tax</span>
|
|
111
|
+
{/* 200 */}
|
|
112
|
+
<span className={styles['element-5']}>$2.00</span>
|
|
113
|
+
{/* total */}
|
|
114
|
+
<span className={styles['total']}>Total</span>
|
|
115
|
+
{/* 3343 */}
|
|
116
|
+
<span className={styles['element-6']}>$33.43</span>
|
|
117
|
+
{/* button */}
|
|
118
|
+
<div className={styles['button']}>
|
|
119
|
+
{/* continueToPayment */}
|
|
120
|
+
<span className={styles['continue-to-payment']}>Continue to payment</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
{/* pageHeading */}
|
|
124
|
+
<div className={styles['page-heading']}>
|
|
125
|
+
{/* 3Items */}
|
|
126
|
+
<span className={styles['items']}>3 items</span>
|
|
127
|
+
{/* basket */}
|
|
128
|
+
<span className={styles['basket']}>Basket</span>
|
|
129
|
+
</div>
|
|
130
|
+
{/* navigation */}
|
|
131
|
+
<div className={styles['navigation']}>
|
|
132
|
+
{/* worldPeas */}
|
|
133
|
+
<span className={styles['world-peas']}>World Peas</span>
|
|
134
|
+
{/* shop */}
|
|
135
|
+
<span className={styles['shop']}>Shop</span>
|
|
136
|
+
{/* newstand */}
|
|
137
|
+
<span className={styles['newstand']}>Newstand</span>
|
|
138
|
+
{/* whoWeAre */}
|
|
139
|
+
<span className={styles['who-we-are']}>Who we are</span>
|
|
140
|
+
{/* myProfile */}
|
|
141
|
+
<span className={styles['my-profile']}>My profile</span>
|
|
142
|
+
{/* cartButton */}
|
|
143
|
+
<div className={styles['cart-button']}>
|
|
144
|
+
{/* basket3 */}
|
|
145
|
+
<span className={styles['basket3']}>Basket (3)</span>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|