=== Jemdy Product Builder ===
Contributors: jemdycommerce
Donate link: https://jemdycommerce.com/

Tags: woocommerce, product builder, product configurator, attributes filter, shortcode
Requires at least: 6.1
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Create a modern WooCommerce product builder with attribute/price filters and variation support. Shortcode: [jemdy-builder-form].

== Description ==

Create a seamless WooCommerce Product Builder / Configurator that lets customers pick items (including variable products) with real-time filtering by attributes, price, stock, and on-sale status. Optimized UI for mobile with Drawer patterns, smooth scrolling, and performance-minded REST API.

Works with both global attributes (pa_*) and custom product attributes defined per product.


⚡ Key Features

Shortcode: Drop the builder anywhere – [jemdy-builder-form].

Variable products: Pick variations by attributes; price/thumbnail update instantly.

Advanced filters: Attributes (global + custom), price range, in-stock, on-sale, keyword search, sorting (newest / price asc / price desc).

Mobile-ready: Drawer UI, body-scroll lock, smooth “scroll to top” when switching categories.

Performance: Custom REST endpoint, server-side pagination, transient caching for filter facets, Vite + React build.

Localization: Translation-ready (text domain: jemdy-product-builder, languages/ folder). Safe HTML in help texts is sanitized.

Extensible: Filters/Hooks allow modifying product payloads before sending to the frontend.

🙌 Admin Experience

Configure which categories appear in the builder and set the display labels.

Helpful Help tab with usage guide and shortcode/template tag.

Production/Development build modes for smooth local development.

🍒 Typical Use Cases

PC parts configurator (CPU, RAM, etc.)

Bundles with variable products (size/color)

Curated category pickers with price/stock filters

✅ Compatibility

Compatible with modern WooCommerce themes.

Works with standard WooCommerce product/variation data and attribute taxonomies.

Enjoy the plugin? A quick rating keeps development going ❤️

== Installation ==

Manual installation:

Upload the jemdy-product-builder folder to /wp-content/plugins/.

Activate the plugin via Plugins → Installed Plugins.

In the WordPress admin, open Jemdy Builder to configure categories and labels.

Add the shortcode to a page/post: [jemdy-builder-form]

That’s it — your product builder is ready.

== Frequently Asked Questions ==

= Do I need WooCommerce? =
Yes. This plugin extends WooCommerce and requires it to be active.

= How do I output the builder? =
Use the shortcode [jemdy-builder-form] in any page or post.
For theme files, you can use: echo do_shortcode('[jemdy-builder-form]');

= Does it support variable products? =
Yes. Customers can select variations by attributes (supports both global pa_* and custom attributes added directly on the product edit screen).

= Why don’t I see any products? =
Check that:

The selected categories contain published products with prices.

Filters (in-stock / on-sale / attributes) are not overly strict.

You switched categories — filters reset to default for clarity.

= Is it translation-ready? =
Yes. Text domain is jemdy-product-builder. Place translations in the languages/ directory. The plugin also localizes UI strings to the React app.

== Screenshots ==

Admin – configure categories and labels for the builder

Frontend – desktop product builder with filters

Frontend – mobile Drawer for product picking

Variation selection with dynamic price/thumbnail

Help tab with shortcode/template tag instructions

== Changelog ==

= 2.0.0 =
* NEW: Implemented native Tailwind CSS v4 architecture (CSS-first config) for better performance.
* FIX: Solved persistent CSS specificity conflicts in WP Admin by applying "Selector Strategy" (`#jdpb-apps` scoping) and removing conflicting WP form styles via PHP hook on the plugin page.
* TWEAK: Updated `tailwind-merge` configuration to correctly handle custom color conflicts (e.g., `text-foreground` vs `text-primary-foreground`).
* DEV: Converted all utility class usages from `jw-utility` to `jw:utility` namespace structure.

= 1.1.0 =

Build: Refactored packaging script — exclude all .ts/.tsx sources, include only compiled dist assets.

Build: Removed PostCSS and Tailwind v3 config files from release (migrated to CSS-first Tailwind 4 pipeline with prefix jw-).

Improved: Added full color token system synced between PHP + Tailwind config:
- background / foreground
- primary / primary-foreground
- secondary / secondary-foreground
- accent / accent-foreground
- muted / muted-foreground
- destructive / destructive-foreground
- popover / popover-foreground
- border / input / ring

Improved: Refined UI variants for Button (default, outline, secondary, ghost, link, destructive).

Security: Updated build exclusion rules to avoid leaking source maps or internal tools in final zip.

Docs: Added migration plan to Tailwind v4 (on hold) and internal documentation on token architecture.

Internal: Adopted consistent jw- prefix for all Tailwind utilities (previous jd- prefix deprecated).

= 1.0.2 =

Improved: Switched to proper script/style enqueues (wp_enqueue_scripts, admin_enqueue_scripts) with script_loader_tag to add type="module" (and crossorigin in dev). Removed direct <script>/<style> outputs.

Improved: Admin page now renders a clean app root without inline CSS/JS; notices remain intact per WP guidelines.

Security: Added/updated permission_callback on REST routes — public reads keep __return_true; settings write endpoints require manage_options.

Security: Replaced raw SQL with $wpdb->prepare() (including dynamic IN (...) placeholders). Removed long anonymous closures per coding standards.

Security: Hardened sanitization/escaping across payload parsing and query args.

Performance: Introduced object caching (wp_cache_*) for attribute labels, global term aggregations, and _product_attributes meta scans; cache keys auto-bust with last_changed.

Performance: Prefilter by taxonomy only when all selected attributes are global (pa_*), reducing unnecessary scans.

Refactor: Modular architecture — added Services (ProductService), Repositories (ProductRepository), Support (Attributes, Pagination), Domain (DTO Payload, Builders, Filters). Easier maintenance and extension.

Feature: Filter logic revised — custom (per-product) attributes now match correctly alongside global attributes. Empty attribute groups are omitted from payload.

Fix: Pagination rendering logic corrected near edges (e.g., pages 1–3 and n–2…n).

Fix: ScrollArea/key handling updated for React 18; mobile drawer + filter UX tweaks.

Docs: readme.txt updated — max 5 tags, short description trimmed to ≤150 chars.

Build: Packaging script updated to build app, toggle dev flag, and zip with proper exclusions.

= 1.0.1 =

First public release of Jemdy Product Builder

Product builder shortcode [jemdy-builder-form]

Variable product support with attribute selection

Advanced filters: attributes (global + custom), price, in-stock, on-sale, search, sorting

Mobile Drawer UX, scroll optimizations

REST API with pagination and transient caching for filter facets

Translation-ready (text domain jemdy-product-builder)

Hooks to customize product payloads before response

= 1.0.0 =

Initial internal build and foundation (enqueue from Vite manifest, module preload, CSS auto-enqueue, i18n plumbing)
