=== DXM Block Toolkit ===
Contributors: devxmachina
Plugin URI: https://devxmachina.com/products/block-toolkit-lite/
Tags: gutenberg, blocks, block inventory, content audit
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dxm-block-toolkit

Index Gutenberg blocks and discover every source where they are used, with inventory, drill-down, filters, and scan health.

== Description ==

DXM Block Toolkit helps you discover where Gutenberg blocks are used and understand whether the index is healthy and current.

It indexes every supported Gutenberg source without artificial edition-based caps on indexed sources, results, or scans, including:

- Posts, pages, and eligible custom post types.
- Synced patterns and reusable blocks.
- Templates and template parts.
- Navigations.

The plugin includes:

- Block Inventory with block title, name, namespace, instance count, source count, and source-type distribution.
- Search by block title, name, or namespace, with sorting and pagination.
- Source drill-down with source title, source type, post type, status, occurrence count, and edit links.
- Filters for source type, status, class tokens, IDs and anchors, and indexed block attributes.
- Manual full scans, incremental indexing, daily recurring scans, progress, cancel and resume controls, index health, errors, comparisons, recent history, and local diagnostics.

Scans read stored content and write only to DXM Block Toolkit index tables. They never modify post content.

Common workflows:

1. Run a full scan from the Scans tab to initialize the index.
2. Search or sort Block Inventory to isolate a block type.
3. Open View sources to find every indexed source that uses the block.
4. Use source and attribute filters to narrow the results.
5. Review Scans whenever you need to confirm freshness, errors, or index health.

DXM Block Toolkit Pro is an optional add-on for content search, exports, network-wide reporting, and safe block transformations. DXM Block Toolkit Lite remains fully usable without Pro.

Built by DevXMachina: https://devxmachina.com

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/dxm-block-toolkit`, or install the ZIP through WordPress admin.
2. Activate DXM Block Toolkit.
3. Open `DXM -> DXM Block Toolkit`.
4. Run a full scan to initialize the index.

== Frequently Asked Questions ==

= Does DXM Block Toolkit Lite limit posts, sources, results, or scans? =

No. DXM Block Toolkit Lite does not impose artificial edition-based caps on supported sources, indexed results, or scans. Normal server-resource and hosting constraints still apply.

= Which content does DXM Block Toolkit index? =

DXM Block Toolkit indexes supported Gutenberg content from posts, pages, eligible custom post types, synced patterns, templates, template parts, and navigations. Excluded WordPress records such as revisions and auto-drafts are not treated as content sources.

= Can I run scans without a Pro license key? =

Yes. DXM Block Toolkit Lite has no commercial entitlement requirement, and its scanning and indexing never require a Pro license key. Manual scans, incremental indexing, daily recurring scans, comparisons, recent history, and health information remain available to administrators.

= Does DXM Block Toolkit modify post content? =

No. DXM Block Toolkit only discovers and indexes block usage. It does not transform or replace stored block content.

= What is the difference between Blocks and Patterns? =

Blocks reports usage aggregated by block type, for example `core/paragraph`. Patterns reports reusable or synced entities and the sources that reference them through `core/block`.

= How do attribute filters work? =

Open View sources for a block, then filter by class, ID or anchor, attribute path and value, or compact query syntax such as `class:hero id:intro attr:data-variant=dark`.

Class and ID filters match exact tokens. Attribute filters use exact matching by default and support contains matching for bounded indexed text values. Active filters are combined, so a source must satisfy all of them.

= How do attribute paths work? =

Attribute paths describe where a scalar value lives inside the parsed block attributes. Use a top-level key such as `anchor`, `className`, or `align`, or dot notation for nested values such as `style.color.text` and `layout.type`.

Strings, numbers, booleans, and arrays of scalar values may be indexed. Arrays of objects, empty or oversized values, raw content blobs, and secret-like paths are skipped.

= What happens if I later activate Pro? =

Pro reuses the DXM Block Toolkit index, so activation does not require an unnecessary reindex. Disabling or removing Pro does not delete the shared index.

= How does DXM Block Toolkit work on multisite? =

DXM Block Toolkit may be site-active or network-active, but its UI and API expose only the current site's index. Network-wide reporting and cross-site search are Pro capabilities.

== Screenshots ==

1. Browse indexed Gutenberg blocks with instance and source counts, then open every source that uses a block.
2. Filter a block's sources by content metadata and attributes, including CSS class names.
3. Monitor audit scan health, scheduled scans, index integrity, and recent scan events.
4. Confirm index freshness and begin reviewing the Block Inventory from the readiness panel.

== Development ==

The distributed JavaScript and CSS files in `build/` are generated from the human-readable sources in `src/ui/`.

To reproduce the production assets:

1. Install the Node.js dependencies with `npm install`.
2. Run `npm run build`.

PHP dependencies are declared in `composer.json` and locked in `composer.lock`. Install the production dependencies with `composer install --no-dev --optimize-autoloader`.

== Changelog ==

= 1.0.3 =

- Harden dynamic inventory queries by preparing table identifiers and all filter values through the WordPress database API.
- Preserve block and source pagination behavior while avoiding nested query interpolation.

= 1.0.2 =

- Preserve Lite as a complete current-site inventory by moving network-wide reporting and export implementations entirely into the separate Pro add-on.
- Prepare all filtered inventory queries through the WordPress database API.
- Add automated release-boundary checks and improve admin table actions across supported WordPress versions.

= 1.0.1 =

- Address WordPress.org review feedback: refresh Action Scheduler, harden internal identifier prefixes, and align namespaces.

= 1.0.0 =

- Initial DXM Block Toolkit release with complete indexing, inventory, basic drill-down, attribute filters, recurring scans, comparisons, recent history, and scan health.
