=== SeaLegs AI ===
Contributors: sealegsai
Tags: tide chart, tides, noaa, marine, fishing
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free NOAA tide charts for any page or post. Adds a Tide Chart block and a [sealegs_tides] shortcode. No API key or signup.

== Description ==

Add a tide chart for any US coastal location to a page or post in under a minute. Pick a spot by latitude and longitude and the chart snaps to the nearest NOAA tide station, or pin a station by its ID.

The plugin adds:

* A **Tide Chart (SeaLegs AI)** block that shows the live chart while you edit, with location and display settings in the block sidebar.
* A **[sealegs_tides]** shortcode for the classic editor and page builders.

= Features =

* **Free, no API key** — install, add the block, publish.
* **NOAA predictions** — the same harmonic predictions as the official NOAA tide tables.
* **Several charts per page** — list every marina, ramp or charter dock on one page.
* **Style-isolated** — each chart renders in its own Shadow DOM, so your theme and the chart cannot break each other.
* **Loads only where used** — the widget script is added only to pages that contain a chart.

The free chart covers US waters. International coverage is available on a paid plan; see [sealegs.ai/tide-widget](https://www.sealegs.ai/tide-widget).

== External services ==

This plugin is an interface to the SeaLegs AI tide widget, a hosted service. On pages that contain a tide chart, the visitor's browser connects to these services:

* **SeaLegs AI widget CDN** (`cdn.sealegs.ai`) — loads the tide widget script and its styles. Sent: a standard browser request, including the page address as the referrer.
* **SeaLegs AI API** (`api.sealegs.ai`) — returns tide predictions and nearby stations. Sent: the latitude, longitude and optional station ID set in the block or shortcode, and the page address as the referrer.
* **NOAA CO-OPS API** (`api.tidesandcurrents.noaa.gov`) — for many US locations the widget fetches the public station list and predictions directly from NOAA. Sent: the station ID and date range. [NOAA privacy policy](https://www.noaa.gov/protecting-your-privacy)
* **SeaLegs AI website** (`www.sealegs.ai`) — serves the small logo in the chart's credit line.

As with any web request, each of these services receives the visitor's IP address and browser type. The widget sets no cookies and does not track visitors. It stores the visitor's favorite stations in their own browser (localStorage) so favorites persist between visits; this never leaves the browser.

SeaLegs AI [Widget Terms](https://www.sealegs.ai/widget-terms), [Terms of Service](https://www.sealegs.ai/terms-of-service) and [Privacy Policy](https://www.sealegs.ai/privacy-policy) apply.

The chart shows a "Powered by SeaLegs AI" credit inside the widget. It is rendered by the service, not added by this plugin.

== Installation ==

1. In WordPress admin, go to **Plugins → Add New Plugin** and search for "SeaLegs AI".
2. Click **Install Now**, then **Activate**.
3. Add the **Tide Chart (SeaLegs AI)** block to a page, or paste the shortcode into a Shortcode block or the classic editor.

= Shortcode =

`[sealegs_tides lat="39.355" lon="-74.418" height="540"]`

Attributes:

* `lat` — latitude, -90 to 90. Default 39.355 (Atlantic City).
* `lon` — longitude, -180 to 180. Default -74.418.
* `station_id` — optional NOAA station ID. Leave out to use the nearest station.
* `days` — days to show, 1 to 14. Default 8.
* `units` — `imperial` (feet, default) or `metric` (metres).
* `theme` — `dark` (default) or `light`.
* `height` — height in pixels, 240 to 1200. Default 540.
* `width` — `100%` (default) or a width in pixels.

== Frequently Asked Questions ==

= Is it really free? =

Yes. The tide chart is free for any website, with no API key or signup. Paid plans add international coverage and white-label options.

= Can I put more than one chart on a page? =

Yes. Each chart mounts separately and the widget shares its fonts and styles between them.

= Can I see the chart while editing? =

Yes. The block shows the live chart in the editor and redraws it as you change the location, theme, units or height.

= How do I find a NOAA station ID? =

You usually don't need one; the chart snaps to the nearest station. To pin a specific station, look it up at [tidesandcurrents.noaa.gov](https://tidesandcurrents.noaa.gov/).

= Does it work outside the United States? =

The free chart covers US waters. International coverage is on a paid plan; contact support@sealegs.ai.

= Where do I get help? =

Use the plugin's support forum on WordPress.org, or email support@sealegs.ai.

== Screenshots ==

1. A tide chart on a published page, light theme.
2. The Tide Chart block in the editor, with the live chart and its settings.
3. The dark theme.

== Changelog ==

= 1.0.0 =
* Initial release: Tide Chart block and [sealegs_tides] shortcode.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
