figmake-pro 3.0.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.
Files changed (34) hide show
  1. package/.github/workflows/ci.yml +27 -0
  2. package/CONTRIBUTING.md +19 -0
  3. package/LICENSE +21 -0
  4. package/README.md +47 -0
  5. package/dist/cli/index.js +22827 -0
  6. package/dist/plugin/code.js +791 -0
  7. package/dist/plugin/ui.html +207 -0
  8. package/package.json +32 -0
  9. package/src/cli/index.ts +129 -0
  10. package/src/core/config.ts +21 -0
  11. package/src/core/converters/layoutConverter.ts +122 -0
  12. package/src/core/extractors/animationExtractor.ts +104 -0
  13. package/src/core/extractors/styleExtractor.ts +40 -0
  14. package/src/core/generators/handlerGenerator.ts +72 -0
  15. package/src/core/generators/reactGenerator.ts +129 -0
  16. package/src/core/utils/codeMetrics.ts +54 -0
  17. package/src/core/utils/collisionDetector.ts +77 -0
  18. package/src/core/utils/copyManager.ts +33 -0
  19. package/src/core/utils/generateReadme.ts +70 -0
  20. package/src/core/utils/imageExporter.ts +34 -0
  21. package/src/design-system/extractDesignTokens.ts +28 -0
  22. package/src/design-system/extractPalette.ts +92 -0
  23. package/src/design-system/extractShadows.ts +33 -0
  24. package/src/design-system/extractSpacing.ts +34 -0
  25. package/src/design-system/extractTypography.ts +71 -0
  26. package/src/plugin/code.ts +143 -0
  27. package/src/plugin/manifest.json +9 -0
  28. package/src/plugin/ui.html +207 -0
  29. package/src/vibecode-guard/generateClaudeRules.ts +25 -0
  30. package/src/vibecode-guard/generateCopilotInstructions.ts +18 -0
  31. package/src/vibecode-guard/generateCursorRules.ts +35 -0
  32. package/src/vibecode-guard/generateLockfile.ts +19 -0
  33. package/src/vibecode-guard/generatePromptContext.ts +15 -0
  34. package/tsconfig.json +19 -0
@@ -0,0 +1,27 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - uses: actions/setup-node@v4
9
+ with:
10
+ node-version: '20'
11
+ - run: npm ci
12
+ - run: npm run build
13
+ - run: npm test
14
+ - run: npm run lint
15
+
16
+ publish:
17
+ needs: build
18
+ if: github.ref == 'refs/heads/main'
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-node@v4
23
+ - run: npm ci
24
+ - run: npm run build
25
+ - run: npm publish --access public
26
+ env:
27
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,19 @@
1
+ # Contributing to Figmake
2
+
3
+ Thank you for your interest in contributing to Figmake! We welcome contributions from the community.
4
+
5
+ ## How to Contribute
6
+
7
+ 1. **Fork the repository.**
8
+ 2. **Create a new branch** for your feature or bug fix.
9
+ 3. **Make your changes.**
10
+ 4. **Write tests** for your changes.
11
+ 5. **Submit a pull request.**
12
+
13
+ ## Code Style
14
+
15
+ Please follow the existing code style and naming conventions.
16
+
17
+ ## Questions?
18
+
19
+ Feel free to open an issue for any questions or discussions.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 QuaymePro
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # Figmake
2
+
3
+ > Design-to-code compiler with AI agent guardrails.
4
+ > Extract Figma designs as pixel-perfect React code. Generate design lockfiles that keep vibecoding agents from hallucinating styles.
5
+
6
+ ## Why Figmake?
7
+
8
+ AI coding agents are powerful but they hallucinate design. Colors drift. Spacing breaks. Fonts get replaced. Your carefully crafted design system dissolves with every prompt.
9
+
10
+ Figmake extracts the **ground truth** from your Figma files and generates:
11
+
12
+ 1. **Pixel-perfect React components** with exact styles
13
+ 2. **Design lockfiles** that any AI agent can reference
14
+ 3. **Prompt context** that forces agents to respect your design system
15
+
16
+ ## Quick Start
17
+
18
+ ### Figma Plugin
19
+ 1. Install from Figma Community: [link]
20
+ 2. Select any frame
21
+ 3. Copy React code or export full project
22
+
23
+ ### CLI
24
+ ```bash
25
+ npx figmake init
26
+ npx figmake export "https://figma.com/file/..." --token YOUR_TOKEN
27
+ npx figmake lockfile # Generate design constraints for AI agents
28
+ ```
29
+
30
+ With Cursor/Claude/Copilot
31
+
32
+ ```bash
33
+ figmake guard --output .cursor/rules/design-system.mdc
34
+ # Now your AI agent won't hallucinate styles
35
+ ```
36
+
37
+ ## Features
38
+
39
+ · ✅ Pixel-perfect conversion (no rounding, no opinionated scales)
40
+ · ✅ Auto Layout → Flexbox/Grid with exact values
41
+ · ✅ Framer Motion animations from Figma prototypes
42
+ · ✅ Event handlers for interactive elements
43
+ · ✅ Design token extraction (colors, typography, spacing, shadows)
44
+ · ✅ AI agent lockfiles (Cursor, Claude, Copilot, Windsurf)
45
+ · ✅ Component collision detection
46
+ · ✅ Code metrics and complexity analysis
47
+ · ✅ README generation on export