== Changelog ==

= 2.1.2 =
* **DEV:** Tested Up To WordPress 7.0.

= 2.1.1 =
* **FIX:** The sticky navigation now remains visible when the list is expanded, preventing it from disappearing unexpectedly during use.

= 2.1.0 =
* **FEATURE:** **Scroll-Up-To-Reveal:** Introduced optional "Smart Sticky" behavior. The sticky table of contents can now hide automatically when scrolling down to save screen space and reappear when scrolling up.
* **NEW:** Added a "Plain Text" style option for horizontal layouts, offering a minimalist alternative to the default button style.
* **NEW:** Added visual separators (Middle Dot, Pipe, and Slash) for text-based link lists.
* **ENHANCEMENT:** Introduced CSS transitions for sticky elements for a smooth visual experience for Scroll-Up-To-Reveal jump links.
* **ENHANCEMENT:** Optimized editor controls to conditionally display relevant settings, keeping the sidebar clean.
* **FIX:** Added dynamic border calculation to resolve an issue where thick borders could prevent the navigation bar from sticking or hiding correctly.

= 2.0.1 =
* **TWEAK:** To avoid the bottom of horizontal link "buttons" from ever being cut off when the menu is collapsed, the styling has been finetuned to include a defined line-height for list items.

= 2.0.0 =
* **FEATURE:** **Sticky Positioning:** Keep your table of contents visible while users scroll. Includes a "Top Offset" slider to clear sticky headers, a "Jump Offset" slider to ensure that the sticky header does not cover the heading text, and a "Disable on Mobile" toggle to preserve screen space on small devices.
* **FEATURE:** **Auto-Hide Title:** Implemented a smart "sticky state" detection. When the block sticks, the title gently collapses and fades out to keep the interface clean (this occurs when a block title is used alongside sticky positioning).
* **FEATURE:** **Smart Indentation:** Added a "Create Visual Hierarchy" toggle. When enabled, H3 and H4 sub-headings are visually indented to create a clear, nested outline structure.
* **FEATURE:** **Block Background:** You can now set a background color for the entire block container, perfect for creating "card-style" floating navigation.
* **FEATURE:** **ScrollSpy:** Automatically highlights the active link in the table of contents as the user scrolls through the corresponding section of the post.

= 1.9.2 =
* **FEATURE:** Added support for Border and Spacing controls. You can now add borders, rounded corners, margins, and padding to the Jump Links block directly from the editor settings.
* **FEATURE:** Added a "Heading Level" control. You can now choose the specific HTML tag (H2, H3, H4, H5, Paragraph, or Div) for the "On This Page" heading to better match your document structure.
* **REFACTOR:** Optimized the block's styling logic to use CSS variables on the parent container instead of inline styles for every link. This reduces the block's HTML size and improves rendering performance.
* **FIX:** Resolved an accessibility and HTML validation issue where using multiple Jump Links blocks on a single page created duplicate element IDs. Each block now generates a unique instance ID.
* **PERFORMANCE:** Refactored the front-end JavaScript to use event delegation for smooth scrolling. This reduces memory usage by attaching a single event listener to the block instead of individual listeners for every link.
* **TWEAK:** Reorganized the sidebar settings for better clarity between Block Title settings and Content Inclusion settings.

= 1.9.1 =
* **FIX** (readme): Fixed a small typo in the readme.txt file.

= 1.9.0 =
* **HELLO WORLD:** Initial release to the WordPress Plugin Directory.

= 1.8.0 =
* **ENHANCEMENT:** Implemented a robust de-duping engine to prevent invalid HTML from duplicate headings. The block now automatically appends a number (e.g., `my-heading-2`) to any heading with a conflicting text or manual anchor ID.
* **FEATURE:** Added a snackbar warning that notifies the user when duplicate headings have been found and auto-corrected, prompting them to review their content for clarity.
* **FIX:** Ensured that all user customizations (custom link text, visibility, and ordering) are correctly preserved during the new de-duping and reconciliation process.

= 1.7.0 =
* **ENHANCEMENT:** Improved semantics and accessibility by wrapping the block's content in a `<nav>` landmark with a translatable aria-label.
* **ENHANCEMENT:** Added full ARIA support to the collapsible button, including aria-expanded, aria-controls, and a dynamic "Show More" / "Show Less" label.

= 1.6.0 =
* **TWEAK:** Renamed plugin to "Jump Links Block (SEO 44)" to align with the new branding in coordination with the SEO suite plugin, Search Appearance Toolkit (SEO)
* **TWEAK:** Updated the Text Domain to `jump-links-block-seo-44` to match the new plugin slug.

= 1.5.0 =
* **FEATURE:** Added a new "Background Hover" color setting in the Inspector Controls for links in the horizontal layout.
* **ENHANCEMENT:** Improved the out-of-the-box appearance by setting default colors and a default border-radius in block.json, ensuring the block looks great immediately upon being added.
* **REFACTOR:** Removed hardcoded default styles from the stylesheets, making the block's settings the single source of truth for its design and improving consistency.
* **CODE QUALITY:** Refactored editor.scss to import style.scss, eliminating code duplication and making the styles easier to maintain.
* **CODE QUALITY:** Performed a comprehensive review and refactor of all block source files (.js, .scss, .json). This improves the block's stability, maintainability, and alignment with modern WordPress development best practices.

= 1.4.0 =
* **STATE RECONCILIATION ENGINE:**  Completely overhauled the core useEffect logic to robustly handle all state changes. The new "reconciliation" engine correctly adds and removes headings as the document is edited, while intelligently preserving all user customizations (custom text, visibility, and custom order) without conflict.
* **BUG FIX:**  Resolved bugs related to component rendering and various JavaScript "race conditions."

= 1.3.0 =
* **NEW: Smooth scrolling:**  Implemented a front-end script (view.js) that enables smooth scrolling when a user clicks on a jump link.
* **NEW: Collapsible sections:**  For long lists, the front-end script can now automatically collapse the block and add a "Show More" / "Show Less" button for a cleaner appearance.

= 1.2.0 =
* **NEW: "Appearance" Panel:**  Reorganized the sidebar controls for a cleaner user experience.
* **Layout Control:** Added a ButtonGroup to switch between a standard vertical list and a modern horizontal layout.
* **List Style Control:** Added a dropdown to select a bulleted (ul), numbered (ol), or unstyled (none) list format. The control is intelligently disabled when in the horizontal layout.
* **Typography & Color Controls:** Added a FontSizePicker with a reset button. Added PanelColorSettings for "Link Color" and "Other Text Color."
* **Conditional Horizontal Styles:** Added a dedicated section that appears only for the horizontal layout, allowing users to customize the link background color, border color, and border radius.

= 1.1.0 =
* **"Viewing" vs. "Editing" Modes:** Introduced a presentation toggle in the sidebar to switch between a clean preview and a detailed editing interface.
* **Editable Link Text:** In "Editing Mode," users can now customize the text of each link (e.g., change "Frequently Asked Questions" to "FAQ").
* **Visibility Toggles:** Added an "Included" / "Exclude" toggle for each link in "Editing Mode," allowing users to hide specific headings from the list.
* **Custom Reordering:** Implemented up and down arrow buttons for each link, allowing users to set a custom order that is different from the document's top-to-bottom order. The buttons use robust SVG icons.

= 1.0.0 =
* **Initial Block Setup:** Established the basic block structure and registration.
* **Real-time Heading Scan:** Implemented the core logic to automatically scan the editor content for H2, H3, and H4 headings.
* **Live Editor Preview:** The block displays a live preview of the generated link list directly in the editor.
* **Smart Anchor ID Generation:** The block intelligently adds unique anchor IDs to heading blocks that are missing them, while respecting any custom IDs that have already been set by the user.
* **Basic Sidebar Controls:** Added checkboxes to allow users to select which heading levels (H2, H3, H4) to include in the list.
