# `PhiaUi.Components.Editor.Academic`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phia_ui/components/editor/academic.ex#L1)

Editor Academic Suite — 6 components for academic and scholarly writing tools.

Provides citation style selection, structure validation, abbreviation management,
readability scoring, page numbering, and margin notes for building full-featured
academic editors.

## Components

- `citation_style_selector/1`  — dropdown to choose citation format (APA, MLA, Chicago, etc.)
- `structure_validator/1`      — panel displaying document structure rule violations
- `abbreviation_manager/1`     — table of abbreviation definitions with delete actions
- `reading_level_indicator/1`  — progress bar showing readability score with color coding
- `page_numbering/1`           — "Page N of M" display with numeric/roman/letter formats
- `margin_note/1`              — absolutely positioned aside for side annotations

# `abbreviation_manager`

Renders a table of abbreviation definitions with delete actions.

Each abbreviation is a map with `:short` and `:full` keys.

## Example

    <.abbreviation_manager
      id="abbr-mgr"
      abbreviations={[
        %{short: "HTML", full: "HyperText Markup Language"},
        %{short: "CSS", full: "Cascading Style Sheets"}
      ]}
    />

## Attributes

* `id` (`:string`) (required)
* `abbreviations` (`:list`) - Defaults to `[]`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `citation_style_selector`

Renders a `<select>` dropdown for choosing a citation style.

## Example

    <.citation_style_selector id="cite-style" value={:apa} />

## Attributes

* `id` (`:string`) (required)
* `value` (`:atom`) - Defaults to `:apa`. Must be one of `:apa`, `:abnt`, `:mla`, `:chicago`, `:harvard`, or `:ieee`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `margin_note`

Renders an absolutely positioned `<aside>` for side annotations.

Must be placed inside a `position: relative` parent container. The note
appears on the specified side of the content area.

## Example

    <div class="relative">
      <p>Main content here...</p>
      <.margin_note id="note-1" side={:right}>
        This is a side annotation.
      </.margin_note>
    </div>

## Attributes

* `id` (`:string`) (required)
* `side` (`:atom`) - Defaults to `:right`. Must be one of `:left`, or `:right`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block` (required)

# `page_numbering`

Renders a "Page N of M" text display with configurable number format.

Formats:
- `:numeric` — "Page 1 of 10"
- `:roman`   — "Page I of X"
- `:letter`  — "Page A of J"

## Example

    <.page_numbering current={3} total={15} format={:roman} />

## Attributes

* `current` (`:integer`) - Defaults to `1`.
* `total` (`:integer`) - Defaults to `1`.
* `format` (`:atom`) - Defaults to `:numeric`. Must be one of `:numeric`, `:roman`, or `:letter`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `reading_level_indicator`

Renders a 0-100 progress bar showing readability score with color coding.

- Red (score < 30): Difficult to read
- Amber (score 30-59): Moderate readability
- Green (score >= 60): Easy to read

When no score is provided, shows "Not calculated" placeholder.

## Example

    <.reading_level_indicator score={72} label="Grade 8" />

## Attributes

* `score` (`:any`) - Defaults to `nil`.
* `label` (`:string`) - Defaults to `nil`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `structure_validator`

Renders a panel showing document structure rule violations.

Each violation is a map with `:rule`, `:message`, and `:severity` keys.
Severity values: `:error`, `:warning`, `:info`.

## Example

    <.structure_validator
      id="validator"
      violations={[
        %{rule: "abstract", message: "Missing abstract section", severity: :error},
        %{rule: "heading", message: "Consider adding sub-headings", severity: :warning}
      ]}
    />

## Attributes

* `id` (`:string`) (required)
* `rules` (`:list`) - Defaults to `[]`.
* `violations` (`:list`) - Defaults to `[]`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
