"""
Grid Editor helper functions — barrel re-export module.

This file re-exports all public symbols from the split sub-modules
so that existing ``from grid.editor.helpers import ...`` statements
continue to work without changes.

Sub-modules:
  - columns  — column detection, cross-column splitting, marker merging
  - filters  — word/zone filtering, border ghosts, decorative margins
  - headers  — header/heading detection, colspan detection
  - zones    — vertical dividers, zone splitting/merging, zone grid building

Lizenz: Apache 2.0 (kommerziell nutzbar)
DATENSCHUTZ: Alle Verarbeitung erfolgt lokal.
"""

# --- Re-export: columns ---------------------------------------------------
from .columns import (  # noqa: F401
    _is_recognized_word,
    _split_cross_column_words,
    _cluster_columns_by_alignment,
    _MARKER_CHARS,
    _merge_inline_marker_columns,
)

# --- Re-export: filters ----------------------------------------------------
from .filters import (  # noqa: F401
    _filter_border_strip_words,
    _GRID_GHOST_CHARS,
    _filter_border_ghosts,
    _flatten_word_boxes,
    _words_in_zone,
    _get_content_bounds,
    _filter_decorative_margin,
    _filter_footer_words,
    _filter_header_junk,
)

# --- Re-export: headers ----------------------------------------------------
from .headers import (  # noqa: F401
    _detect_heading_rows_by_color,
    _detect_heading_rows_by_single_cell,
    _detect_header_rows,
    _detect_colspan_cells,
)

# --- Re-export: zones -------------------------------------------------------
from .zones import (  # noqa: F401
    _PIPE_RE_VSPLIT,
    _detect_vertical_dividers,
    _split_zone_at_vertical_dividers,
    _merge_content_zones_across_boxes,
    _build_zone_grid,
)

# --- Re-export from cv_words_first (used by cv_box_layout.py) ---------------
from ocr.words_first import _cluster_rows  # noqa: F401
