=== Fast Fuzzy Search – WordPress & WooCommerce Live Search ===
Contributors: zarhasan
Donate link: https://redoxbird.com
Tags: woocommerce search, ajax search, live search, fuzzy search, search by sku
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Blazing fast, typo-tolerant, AJAX-powered search for WordPress and WooCommerce. Live results as you type, with a customizable overlay that matches your site.

== Description ==

https://www.youtube.com/watch?v=mx1QhdYJqtI

**Tired of slow or irrelevant WordPress search results?**

Fast Fuzzy Search replaces the default WordPress search with an instant, typo-friendly search bar that works out of the box. Built for WooCommerce, blogs, documentation portals, and custom post types.

The plugin includes a REST API endpoint for cache-plugin compatibility, a file-based search index with configurable expiration, and Alpine.js-driven reactive UI with zero external CDN dependencies.

== Features ==

- **Live AJAX Search** — Instant results as the visitor types, no page reload.
- **Typo-Tolerant Fuzzy Engine** — Powered by uFuzzy. "blu cap" still finds "blue cap".
- **WooCommerce Integration** — Search by name, SKU, category, tags, and attributes. Shows prices and thumbnails inline.
- **10 Built-In Themes** — Minimal Light, Minimal Dark, Material Light, Material Dark, Glassmorphic, Brutal, Iris, Crisp, Terracotta, Editorial. Each fully styled with hover, focus, and selected states.
- **Custom Aesthetic Editor (Pro)** — Inline CSS editor in the admin panel. Select any built-in theme as a base, and custimize.
- **Primary Color Customization** — All themes use the configured primary color via CSS custom properties. No hardcoded colors.
- **Multiple Trigger Types** — Floating icon button, text button, search field, or hybrid input-button.
- **Auto Mode + Shortcode** — Render sitewide via `wp_body_open` or embed manually with `[fast_fuzzy_search]`.
- **Post-Type Filters** — Show/hide filter chips above results. Exclude content types from indexing.
- **Smart File Cache** — Search index stored as a flat JSON file in `wp-content/cache/`. Configurable expiration.
- **REST API Endpoint** — `POST /wp-json/fast-fuzzy-search/v1/search` for cache-plugin compatibility. Falls back to `admin-ajax.php`.
- **Polylang Compatible** — Works with multilingual sites using Polylang.
- **Custom Post Type Support** — Indexes all public post types by default.
- **Zero External Dependencies** — All assets (Alpine.js, uFuzzy, CSS) are self-hosted. No CDNs, no trackers.

== Why Fast Fuzzy Search? ==

- **Instant AJAX Results** — Lightning-fast feedback as you type
- **Typo-Tolerant Matching** — "blu cap" still finds "blue cap"
- **Fully Self-Hosted** — 100% of your data stays on your server
- **Zero Configuration** — Install, activate, and go
- **Works with Polylang** — Multilingual for Latin script languages
- **Lightweight & Performant** — Optimized for 50,000+ posts
- **10 Built-In Themes** — Drop-in themes included, plus a custom CSS editor

== Installation ==

1. Upload to `/wp-content/plugins/` or install via Plugins > Add New.
2. Activate the plugin.
3. Customize under **Settings > Fast Fuzzy Search**.
4. Optionally use `[fast_fuzzy_search]` shortcode to embed search manually.

== Frequently Asked Questions ==

= Is it compatible with WooCommerce? =
Yes. Automatically indexes WooCommerce products by name, SKU, category, tags, and attributes (Pro). Shows prices and featured images in search results.

= Will it slow down my site? =
No. The search index is cached as a flat file with configurable expiration. The front-end loads Alpine.js and uFuzzy asynchronously. No external requests.

= Can I use it with a custom post type? =
Yes. All public post types are indexed by default. You can exclude specific types from the settings page.

= How do I create a custom theme? =
Select Custom from the Aesthetic dropdown (Pro). An inline CSS editor appears. Pick any built-in theme as a base, click Load Base Theme, and the CSS is rewritten with `.fast-fuzzy-search--custom` selectors. Edit freely and save.

= Does it work with caching plugins? =
Yes. The search index is fetched via the WordPress REST API (`/wp-json/fast-fuzzy-search/v1/search`) with a cache-busting parameter. Falls back to `admin-ajax.php` if REST is unavailable. The index itself is stored as a static file outside the database.

= How do I embed the search in a specific page? =
Use the `[fast_fuzzy_search]` shortcode. Optionally pass attributes: `placeholder`, `aesthetic`, `type`.

= Can I override the search template? =
Yes. Copy any file from `template-parts/` into your child theme at the same relative path. The plugin checks the child theme before falling back to its own files.

= Is it multilingual? =
The plugin is compatible with Polylang. The search index respects the current site locale.

== Changelog ==

= 1.2.0 =
* New: Custom Aesthetic inline CSS editor with base theme loader (Pro)
* New: Iris, Crisp, Terracotta, Editorial themes (Pro)
* New: REST API endpoint for cache-plugin compatibility
* New: Admin documentation page with theme integration guide
* New: Auto-generated shortcode from current settings
* New: View all results button
* Dev: Removed Tailwind CSS dependency — all CSS is now vanilla BEM

= 1.1.9 =
* Added headings to the search index

= 1.1.8 =
* Improved admin settings page
* Improved frontend UI for filtering post types

= 1.1.4 =
* Improved admin settings page
* Fixed button triggers

= 1.1.3 =
* Enhanced integration capabilities with themes
* Added contextual search

= 1.1.2 =
* Added search panel animations

= 1.1.1 =
* Updated readme for clarity

= 1.1.0 =
* Fixed Documentation Pro integration
* Updated readme

= 1.0.3 =
* Fixed custom theme integration

= 1.0.2 =
* Added SKU search support

= 1.0.1 =
* Bug fixes

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.2.0 =
Major update: new custom CSS editor, 4 new themes, REST API endpoint, cache-plugin compatibility, Freemius licensing, improved settings UI, and numerous bug fixes.

== CSS and JavaScript ==

**uFuzzy** – Copyright (c) 2022 Leon Sorokin
MIT License: https://github.com/leeoniya/uFuzzy/blob/main/LICENSE
Source: https://github.com/leeoniya/uFuzzy

**Alpine.js** – Copyright © 2019-2021 Caleb Porzio and contributors
MIT License: https://github.com/alpinejs/alpine/blob/main/LICENSE.md
Source: https://github.com/alpinejs/alpine

== Screenshots ==
1. Minimal theme (light mode)
2. Backend options with stats
3. Backend options showing styles
4. Backend options showing layout controls
5. Backend options showing more options
6. Minimal theme (dark mode)
7. Material theme (light mode)
8. Material theme (dark mode)
9. Glassmorphic theme
10. Brutal theme
