=== AddonLogic Typing Effect Headline ===
Contributors: snehalpancholi
Tags: typing effect, typewriter, animated headline, shortcode, text animation
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A [typing] shortcode that animates rotating phrases as a typewriter effect — type in, pause, erase, repeat. No libraries, no CDN.

== Description ==

AddonLogic Typing Effect Headline adds a smooth typewriter animation to any post, page, or widget using the `[typing]` shortcode. Phrases rotate in a loop: each phrase is typed character by character, paused, then deleted before the next one begins — the classic "We build [Fast | Reliable | Secure]" pattern.

**Features:**

* Pipe-separated phrases list: `phrases="Hello|World|WordPress"`
* Optional static prefix and suffix text
* Per-shortcode overrides for all timing values
* Output as any HTML tag: `span`, `h1`, `h2`, `h3`, `h4`, `div`, `p`
* Custom text color
* Blinking cursor with configurable character
* `start_on="visible"` — starts animation only when scrolled into view (IntersectionObserver)
* `loop="0"` — type once and stop
* Respects `prefers-reduced-motion` — shows all phrases as static text instead
* Zero external dependencies

== Installation ==

1. Upload the `typing-effect-headline/` folder to `/wp-content/plugins/`.
2. Activate via **Plugins → Installed Plugins**.
3. Set global defaults at **Settings → Typing Effect**.
4. Add `[typing phrases="Hello|World"]` to any post or page.

== Shortcodes ==

`[typing phrases="Designer|Developer|Creator"]`
Animates between three phrases.

`[typing phrases="Fast|Reliable|Secure" prefix="We are "]`
Static prefix with animated changing word.

`[typing phrases="Hello World" loop="0"]`
Types once and stops — no deletion.

`[typing phrases="Fast|Affordable" tag="h2" color="#e74c3c"]`
Outputs as `<h2>` with red animated text.

`[typing phrases="Service A|Service B" start_on="visible"]`
Waits until the element is scrolled into view before starting.

== Shortcode Attributes ==

| Attribute      | Default         | Description |
|----------------|-----------------|-------------|
| phrases        | (required)      | Pipe-separated list of phrases |
| prefix         | (empty)         | Static text before animated part |
| suffix         | (empty)         | Static text after animated part |
| type_speed     | 80              | Milliseconds per character while typing |
| delete_speed   | 40              | Milliseconds per character while deleting |
| pause_typed    | 1800            | Pause in ms after fully typed |
| pause_deleted  | 400             | Pause in ms after fully deleted |
| cursor         | \|              | Cursor character |
| cursor_blink   | 1               | 1 = blink, 0 = static |
| loop           | 1               | 1 = loop forever, 0 = type once |
| tag            | span            | HTML wrapper tag |
| color          | (inherit)       | CSS hex color for animated text |
| class          | (empty)         | Extra CSS class |
| start_on       | load            | load = immediate, visible = on scroll |

== Frequently Asked Questions ==

= Can I place the typing effect inside a heading? =
Yes. Either set `tag="h2"` on the shortcode, or wrap the shortcode inside a heading block — the shortcode outputs a `span` by default which is valid inside headings.

= Does it work with page builders? =
Yes. Use the shortcode in any page builder text/shortcode widget.

= Is it accessible? =
The wrapper receives an `aria-label` with all phrases joined, so screen readers read the full list. The animation is bypassed when `prefers-reduced-motion` is set.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
