=== VisuCode AI ===
Contributors: tiagobecker
Tags: visual editor, grapesjs, ai, html, gutenberg block
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Visual Editor for AI-generated HTML content using GrapesJS.

== Description ==

VisuCode AI is a powerful visual editor that allows you to create and edit high-fidelity HTML content using the GrapesJS drag-and-drop engine. It features an integrated AI Assistant to help you optimize code for SEO, accessibility, and structure.

**Key Features:**

* **GrapesJS Visual Editor** — Drag-and-drop HTML/CSS editor with responsive design tools.
* **Gutenberg Block Integration** — Embed VisuCode page content within any post or page using the "VisuCode Content" block.
* **AI Assistant** — Optimize your content for SEO, accessibility, clean code structure, and translate into multiple languages.
* **Multi-Tenant Ready** — Each user sees only their own pages, prepared for SaaS environments.
* **Project Organization** — Group pages into projects for better management.
* **Import/Export** — Import HTML/CSS content and export projects as ZIP files.
* **WordPress Shortcode Support** — Render WP shortcodes dynamically inside your visual designs with a dedicated block.
* **Theme Styles Preview** — Toggle theme styles in the editor for real-time preview.
* **Focus Mode** — Distraction-free editing experience.
* **Fully Internationalized** — Translated into English, Portuguese (BR), Spanish, French, and German.

== Installation ==

1. Upload the `visucode-ai` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Settings > Permalinks and save to flush rewrite rules.
4. Start creating new VisuCode Pages!

== Frequently Asked Questions ==

= Does it require an API key? =
AI features require an OpenAI API Key, which can be configured in the plugin settings. The visual editor works without an API key.

= How do I embed VisuCode content in a regular page? =
Use the "VisuCode Content" block in the Gutenberg Block Editor. Search for "VisuCode" in the block inserter, select a page, and the content will be rendered inline.

= Can I customize the page URL slug? =
Yes, go to Settings > Permalinks, where you will find a "VisuCode" section to define your custom slug.

== Screenshots ==

1. The VisuCode Editor in action.
2. AI Assistant optimization tools.
3. VisuCode Content block in the Gutenberg editor.
4. Dashboard with stats and recent pages.

== Changelog ==

= 1.2.0 =
* **MAJOR FEATURE: Full Project ZIP Import** — You can now upload a complete ZIP file generated by AI assistants (like ChatGPT, Claude, Antigravity, Cursor, Bolt, etc.). VisuCode automatically parses multiple HTML pages, CSS files, JavaScript logic, JSON data, and sideloads images/videos into the WordPress Media Library, creating a beautifully linked, editable project inside WordPress.
* **Feature:** Added native WordPress Homepage support (can now set a VisuCode page as the site's front page).
* **Feature:** Implemented global permalink structure support (respects WordPress global taxonomy and slugs).
* **Feature:** Integrated Component Code Editor directly into the GrapesJS interface.
* **Feature:** Added native WordPress Shortcodes support directly in the visual editor with granular performance controls.
* **Enhancement:** Major performance improvements for page rendering and frontend displays.
* **Bug Fix:** Fixed general rendering bugs and script execution duplications on imported pages.

= 1.0.0 =
* Initial release.
* GrapesJS visual editor with drag-and-drop.
* AI Assistant with SEO, accessibility, clean code, and translation tools.
* Gutenberg "VisuCode Content" block for embedding pages.
* Dashboard with stats, recent pages, and AI usage summary.
* Project organization via custom taxonomy.
* Import/Export functionality.
* Full internationalization (en, pt-BR, es, fr, de).
