Skip to content

Add Figma→Elementor converter & UI#3

Draft
aminul-xs wants to merge 9 commits intowpmetcom:mainfrom
aminul-xs:main
Draft

Add Figma→Elementor converter & UI#3
aminul-xs wants to merge 9 commits intowpmetcom:mainfrom
aminul-xs:main

Conversation

@aminul-xs
Copy link
Collaborator

No description provided.

aminul-xs and others added 9 commits January 29, 2026 10:35
Added .prettierrc, .prettierignore, .gitignore, and VSCode settings for consistent code style. Renamed the project to 'figmakit' in package.json and updated its description. Introduced Prettier scripts, added vite-env.d.ts, and reformatted all source files for style consistency.
Renamed the plugin to 'figmakit', updated its ID, and added 'figjam' to supported editor types in manifest.json. Added ESLint-related devDependencies to package.json. Changed the App background color from red to green in App.tsx. Minor formatting improvements in tsconfig.json.
Implement end-to-end Figma→Elementor conversion flow: add serialization in plugin (serializeNode) and new message handler ('get-figma-nodes'), increase plugin UI height, and post selected nodes to the UI. Add a React UI component (FigmaToElementor) and replace old demo App to request nodes and display generated Elementor `_element_data`. Introduce parser utilities (parseFigmaNodes, createElementorPage) and strong types (src/types/elementor.ts) to map Figma nodes to Elementor widget/page shapes. Add sample output files under dev-docs for reference. Misc: update manifest allowedDomains for Figma API, adjust .vscode JSON formatter setting, tidy package.json devDeps formatting and npm scripts whitespace, fix tsconfig typeRoots formatting, and ensure vite-env.d.ts newline.
Replace and expand the example page data, remove obsolete convert file, and adjust debugging output.

- Update dev-docs/convert-example.json: major content restructure and settings updates (container/widget ids, typography, nav/menu/button widgets, padding, flex settings, page_settings, and title changed to "Page wpmetcom#1").
- Remove dev-docs/convert.json (deleted as obsolete).
- src/plugin/code.ts: reduce noisy console output, add a concise log when UI messages arrive, and comment out other debug logs.
- src/ui/components/FigmaToElementor.tsx: remove an extra parent log and standardize the received-message debug text.

These changes tidy example data and streamline plugin/UI logging for clearer debugging.
Update dev-docs/convert-example.json: numerous IDs and content adjusted, font-size tweak (28→27), added padding_tablet/padding_mobile and several new container/section blocks (images, text widgets), and changed title to "Home Page wpmetcom#1". Add docs/note.md with planning notes for widget organization (src/ui/widgets), config and types guidance. Remove src/ui/utils/parseFigmaNodes.tsx (parser utility deleted) — callers will need to be migrated to the new widget-based approach or replaced with an updated parser.
Introduce a complete FigmaKit conversion system: add serializer modules (serializeBase, serializeChildren, serializeComponent, serializeFrame, serializeImage, serializeRectangle, serializeText, serializeVector) and a new plugin serializer index; implement a widget-based UI architecture (builders, widgetFactory, elementor/elementskit widgets: container, heading, image, plus registry and configs), utilities (getUniqueId, getIsInner, rgbToHex), and types (widget.ts). Add extensive docs and examples (ADD_WIDGET_GUIDE.md, ARCHITECTURE.md, FIGMA_PROPERTIES_GUIDE.md, dev-docs outputs including after-convert.json and updated convert-example.json). Update core files (package.json, src/plugin/code.ts, src/types/elementor.ts, src/ui/App.tsx, src/ui/components/FigmaToElementor.tsx, tsconfig.json, vite.config.ts) and remove an obsolete docs/note.md. This change implements the core conversion pipeline and developer docs with example outputs for converting Figma nodes to Elementor export JSON.
Reorganize and split node serializers into src/plugin/serializer/nodes/*.ts, adding dedicated serializers for boolean operations, component sets, ellipse, group, image, instance, line, polygon, rectangle, text, unknown and vector nodes. Introduce helper functions in serializeBase (serializeFills, serializeStrokes, serializeExtendedStrokes, serializeEffects, serializeCornerRadius) to DRY common properties and update serializeFrame/text to use them. Update serializer index to import and dispatch to the new node-specific functions and remove legacy flat serializer files. Also add a console.log of the selection in src/plugin/code.ts for debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant