=== SiteCare – Builder Tools for Breakdance ===
Contributors: fstab
Donate link: https://buymeacoffee.com/mchncd
Tags: breakdance, page builder, keyboard shortcuts, topbar, sidebar
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 2.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A workflow toolkit for the Breakdance builder: hide the topbar, auto-open the sidebars, and move around with W/A/D keyboard shortcuts.

== Description ==

**SiteCare – Builder Tools for Breakdance** is a lightweight companion for the [Breakdance](https://breakdance.com/) page builder that gives you back screen space and speeds up your editing workflow. Everything happens right inside the builder toolbar - no reloads, no external services, no jQuery, no CDN. It only runs when Breakdance is active.

If you build with Breakdance every day, the fixed topbar and the constant clicking to open panels add up. This plugin removes that friction.

**What it does**

* **Hide the topbar for more canvas space** - click the eye button in the toolbar (or press `W`) to hide the Breakdance topbar and reclaim that strip of vertical space. Click again to bring it back, no page reload.
* **Floating restore button** - when the topbar is hidden, a small eye-off button stays exactly where the eye button was, so restoring the topbar is always one click away.
* **Hide topbar by default** - an option to start every builder session with the topbar already hidden. The setting decides the state on each load, so it is never overridden by a stale value.
* **W / A / D keyboard shortcuts** - `W` toggles the topbar, `A` toggles the left elements (Add) panel, `D` toggles the right structure (layers) panel. The shortcuts work whether your cursor is in the toolbar or inside the canvas preview.
* **Open sidebars on load** - an option to automatically open both the elements panel and the structure panel every time the builder loads, so both sidebars are ready the moment you start. They still toggle normally afterwards.
* **Open in new tab** - a toolbar button that opens the page you are editing in a clean browser tab, without any Breakdance query parameters - handy for a quick real preview.
* **Buy me a coffee** - a small, unobtrusive coffee button in the toolbar if you would like to support development.

**Lightweight and safe**

* Pure vanilla JavaScript, loaded only inside the Breakdance builder.
* No external requests, no CDN, no tracking.
* Does nothing on the front end or on non-Breakdance sites.

This plugin requires the **Breakdance** page builder to be installed and active. It is an independent third-party tool and is not affiliated with or endorsed by Breakdance or Soflyy.

== Installation ==

= From your WordPress dashboard (recommended) =
1. Go to **Plugins -> Add New** and search for "SiteCare Builder Tools for Breakdance".
2. Click **Install Now**, then **Activate**.

= Manual upload =
1. Download the plugin .zip file.
2. Go to **Plugins -> Add New -> Upload Plugin** and choose the .zip.
3. Click **Install Now**, then **Activate**.

= Getting started =
Open the Breakdance builder on any page - the toolbar buttons appear automatically. Press **W** to toggle the topbar, **A** to toggle the left panel, **D** to toggle the right structure panel. Adjust all options under **Breakdance -> Builder Tools** in the WordPress admin.

== Frequently Asked Questions ==

= Does this work without Breakdance? =

No. This plugin is a companion tool for the Breakdance page builder only. Without Breakdance installed and active it does nothing visible.

= Where is the topbar toggle button? =

It appears in the Breakdance builder toolbar, to the left of the undo/redo section. Click the eye icon to hide the topbar; a floating eye-off button appears at the same position so you can restore it.

= What are the keyboard shortcuts? =

* **W** - toggle the topbar on/off
* **A** - toggle the left elements panel on/off
* **D** - toggle the right structure panel on/off

Shortcuts work whether your cursor is in the canvas or the toolbar, and are ignored when focus is inside a text input or editable field.

= Where are the plugin settings? =

When Breakdance is active the settings appear under **Breakdance -> Builder Tools** in the WordPress admin menu. If Breakdance is not active they appear under **Settings -> Breakdance Builder Tools**.

= What does "Open sidebars on load" do? =

When enabled, the elements panel and the structure panel open automatically every time you open the Breakdance builder, so both sidebars are ready to use. They still toggle normally - click a panel's toolbar button again to close it.

= Is this compatible with all Breakdance versions? =

It has been tested with recent Breakdance releases. Because it hooks into the builder UI via CSS selectors, major UI changes in Breakdance may occasionally require an update.

= Can I support plugin development? =

Yes, via [Buy Me a Coffee](https://buymeacoffee.com/mchncd).

== Screenshots ==
1. The Breakdance builder toolbar with the topbar toggle button (eye icon) and additional buttons added automatically.
2. The plugin settings page under Breakdance -> Builder Tools.

== Changelog ==
= 2.3.0 =
* Renamed to "SiteCare – Builder Tools for Breakdance".
* Moved all inline scripts to external files loaded via wp_enqueue_script and wp_localize_script.
* Removed bundled translation files; translations are now managed via translate.wordpress.org.

= 2.2.0 =
* Renamed the plugin to "SiteCare - Breakdance Builder Tools" with a clearer, feature-focused description.
* Added translations for Czech, German, Spanish, French, Brazilian Portuguese and Russian.
* Removed the responsive breakpoint badge.
* Added keyboard shortcuts: W toggles the topbar, A toggles the left panel, D toggles the right structure panel.
* Shortcuts work inside both the builder shell and the preview iframe.
* Floating restore button now appears at the exact position of the eye button when the topbar is hidden.
* Added "Buy me a coffee" button to the builder toolbar.
* Settings page moved under the Breakdance admin menu when Breakdance is active.
* Fixed script injection: builder script now loads correctly via the breakdance_builder_head hook.
* Reworked "Always display sidebars" into "Open sidebars on load": the elements and structure panels now open automatically when the builder loads and still close normally when you click their toolbar buttons.
* The "Hide topbar by default" setting is now authoritative on load, so it is no longer overridden by a stale saved state.
* Removed the "Hide WordPress admin bar", "Auto-close panels on canvas click" and "Compact panel mode" options.

= 2.1.0 =
* Added keyboard shortcut: press T in the builder to toggle the topbar.
* Topbar state is now remembered in localStorage across page reloads.
* New setting: auto-close the left panel when clicking on the canvas.
* New setting: compact panel mode to reduce padding and font size in the element list.
* Breakpoint indicator badge appears when the topbar is hidden.
* Settings page redesigned to match the SiteCare plugin family style.

= 2.0.0 =
* Complete rewrite with SiteCare branding, proper security (escaping, nonces, sanitization via the WordPress Settings API) and no external CDN dependencies.
* Builder script rewritten in vanilla JavaScript - no jQuery loaded from an external CDN.
* Settings page redesigned to match the SiteCare plugin family.
* Existing settings from v1.x are migrated automatically on first activation.

= 1.4 =
* Original release by Codestormer.com.

== Upgrade Notice ==
= 2.2.0 =
Adds keyboard shortcuts (W/A/D), fixes script loading, moves settings under the Breakdance menu, and adds a coffee button to the toolbar.

= 2.0.0 =
Major rewrite with better security and no external CDN dependencies. Your existing settings are migrated automatically.
