=== VedIntel Astro Widgets ===
Contributors: swankydigitaltools
Tags: vedic astrology, kundali, horoscope, panchang, birth chart
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.2.3
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed live Vedic birth charts, dashas, panchang, compatibility scores, and AI chart readings anywhere in WordPress.

== Description ==

**VedIntel™ AstroAPI** brings Swiss Ephemeris-powered Vedic astrology to every WordPress site — as shortcodes, Gutenberg blocks, and interactive visitor forms.

The plugin connects to the VedIntel™ AstroAPI (vedintelastroapi.com), which provides 147 API endpoints covering Vedic astrology, Panchang, Kundali matching, Dashas, divisional charts, and more — in 23 languages. Calculations run on VedIntel's own infrastructure using Swiss Ephemeris; no astronomical computation happens inside WordPress.

= What you get =

* **6 Shortcodes** — drop Vedic astrology anywhere in posts, pages, or widgets
* **6 Gutenberg Blocks** — drag-and-drop in the block editor with live inspector controls
* **Interactive forms** — visitors enter their own birth data, result renders inline. No page reload.
* **Vedic birth chart** — planets, houses, degrees, nakshatra, and pada
* **Vimshottari Dashas** — Mahadasha, Antardasha, and Pratyantardasha
* **Optional tabbed chart view** — Natal, Navamsa (D9), Dashamsha (D10), Dashas, and Transits in one widget
* **Panchang** — Tithi, Nakshatra, Yoga, Karana, Sunrise, Sunset, and more
* **Compatibility** — Ashtakoot kundali matching with score and koot breakdown
* **AI chart reading** — your connected AI provider (OpenAI or Anthropic, BYOK) streams a full chart interpretation
* **3 visual themes** — Cosmic Dark, Clean Light, Minimal — match any site design
* **City autocomplete** — type a city name, lat/lon/timezone auto-fill
* **Secure proxy** — your API key never reaches the browser. All calls go server-to-server.

= Shortcodes =

**Interactive form (recommended for public sites):**
`[vedintel_form widget="chart"]`

**Static widgets (hardcoded birth data):**
`[vedintel_chart dob="01/10/1977" tob="11:40" lat="11" lon="77" tz="5.5"]`
`[vedintel_chart dob="01/10/1977" tob="11:40" lat="11" lon="77" tz="5.5" show_tabs="1"]`
`[vedintel_dasha dob="01/10/1977" tob="11:40" lat="11" lon="77" tz="5.5"]`
`[vedintel_panchang lat="28.61" lon="77.20" tz="5.5"]`
`[vedintel_compatibility m_dob="01/10/1977" m_tob="11:40" m_lat="11" m_lon="77" m_tz="5.5" f_dob="15/03/1980" f_tob="10:00" f_lat="19.07" f_lon="72.87" f_tz="5.5"]`
`[vedintel_ai_chart dob="01/10/1977" tob="11:40" lat="11" lon="77" tz="5.5"]`

Adding `show_tabs="1"` to `[vedintel_chart]` activates the tabbed view with Natal, Navamsa (D9), Dashamsha (D10), Dashas, and Transits panels. Tabs load on demand. Which tabs appear depends on the connected VedIntel account plan.

= Gutenberg Blocks =

All 6 shortcodes are also available as native Gutenberg blocks with live inspector controls — no shortcode syntax required. Add a **VedIntel Birth Chart**, **Dashas**, **Panchang**, **Compatibility**, **AI Chart**, or **Form** block from the block inserter and configure it directly in the sidebar.

= Get an API Key =

1. Sign up at [vedintelastroapi.com](https://vedintelastroapi.com) — a free 7-day trial is available
2. Go to **Dashboard → API Keys** and copy your key
3. Paste it in **Settings → VedIntel Astro** in your WordPress admin
4. Click **Test Key** to verify the connection

Paid plans are available from the VedIntel™ AstroAPI website. The Developer plan starts at $9/month.

The free 7-day trial unlocks 128 of the 147 endpoints so you can validate your use case before subscribing (AI features and PDF reports need a paid plan; 8 advanced technique endpoints need the Starter plan or above).

AI chart readings (`[vedintel_ai_chart]`) require a paid plan and a connected AI provider (OpenAI or Anthropic) configured in your VedIntel dashboard. VedIntel does not pay for AI inference on your behalf — you connect your own provider key (BYOK).

= Powered by =

* Swiss Ephemeris — commercially licensed astronomical calculation engine running on VedIntel's own servers
* Lahiri Ayanamsa (default) — most common in Indian Vedic practice; other ayanamsas available via API
* 147 API endpoints covering Vedic astrology, Panchang, Dashas, Divisional Charts, Compatibility, and more
* 23 supported languages: English, Hindi, Tamil, Telugu, Sanskrit, Kannada, Malayalam, Bengali, Gujarati, Marathi, Punjabi, Urdu, Spanish, French, German, Portuguese, Arabic, Indonesian, Italian, Dutch, Russian, Japanese, Chinese

== Installation ==

1. Upload the `vedintel-astro` folder to `/wp-content/plugins/`
2. Activate the plugin in **Plugins → Installed Plugins**
3. Go to **Settings → VedIntel Astro**
4. Paste your API key and click **Test Key** to verify
5. Add a shortcode or block to any post or page

== Frequently Asked Questions ==

= Is my API key secure? =
Yes. Your API key is stored in `wp_options` (same as any WordPress setting) and all API calls are made server-to-server via the WordPress REST API proxy. It is never exposed in the browser or JavaScript source.

= Do visitors see my API key? =
No. The plugin includes a REST proxy (`/wp-json/vedintel/v1/proxy`) that adds your API key on the server before calling the VedIntel API.

= Which plan do I need? =
The free 7-day trial works with all standard widgets (birth chart, dashas, panchang, compatibility). AI chart reading (`[vedintel_ai_chart]`) requires a paid plan and a connected AI provider configured in your VedIntel dashboard.

= How does the AI chart reading work? =
The plugin calls the VedIntel AI endpoint, which uses your own connected OpenAI or Anthropic API key (BYOK — Bring Your Own Key). You configure this in your VedIntel dashboard under AI Providers. VedIntel does not provide or pay for AI inference; you control and pay for your own AI usage directly.

= What is the tabbed chart view? =
Add `show_tabs="1"` to any `[vedintel_chart]` shortcode (or enable it in the Gutenberg block inspector). This displays the birth chart alongside Navamsa (D9), Dashamsha (D10), Dashas, and Transits panels in a tabbed layout. Panels load on demand. Availability depends on your VedIntel account plan.

= Does this work with page builders? =
Yes. The shortcodes work in any context that supports WordPress shortcodes — Elementor, Beaver Builder, Divi, WPBakery, etc.

= Can visitors enter their own birth data? =
Yes. Use `[vedintel_form widget="chart"]` (or any other widget type). A form renders, and when the visitor submits, the result appears inline with no page reload.

= Is there an MCP server for AI assistants? =
Yes. VedIntel™ AstroAPI publishes an MCP server (`@vedintelastroapi/mcp-server` on npm) for use with Claude Desktop and other MCP-compatible AI clients. This is separate from the WordPress plugin.

== Screenshots ==

1. Admin settings page — API key configuration, theme picker, shortcode reference
2. Cosmic Dark theme — birth chart with planet table and dasha card
3. Clean Light theme — same widget on a light site
4. Interactive form — visitor enters birth data, chart renders instantly
5. Compatibility widget — Ashtakoot score ring + koot breakdown
6. Gutenberg block editor — birth chart block with inspector controls
7. AI narrative widget — VedIntel™ AstroAPI streaming chart reading

== External Services ==

This plugin connects to the VedIntel™ AstroAPI (vedintelastroapi.com) to compute and retrieve Vedic astrology data.

**What the service does:** Performs server-side Vedic astronomical computation (planetary positions, houses, dashas, panchang, kundali matching, divisional charts, AI chart narratives) using Swiss Ephemeris running on VedIntel's own infrastructure. No calculations happen inside WordPress.

**What data is sent and when:**
- Birth date, time, latitude, longitude, and timezone — sent when a shortcode or block renders astrology data, or when a visitor submits the interactive birth-data form.
- City name — sent when a visitor uses the city autocomplete field to look up coordinates.
- Your API key — sent with every request to authenticate your account. It is added server-side and never exposed to the browser.

Birth date, time, and location are personal data. By using this plugin you are responsible for ensuring your site's privacy policy discloses their transmission to VedIntel™ AstroAPI and complies with applicable regulations (GDPR, DPDPA, etc.).

**Service provider:** VedIntel (vedintelastroapi.com)
**Terms of Service:** https://vedintelastroapi.com/terms
**Privacy Policy:** https://vedintelastroapi.com/privacy

== Changelog ==

= 1.2.3 =
* Panchang and Dasha widgets now show a clear message when the API returns an error (monthly quota exhausted, trial ended, invalid key, invalid input or a server error) instead of rendering an empty widget.
* Quota-exhausted messages now show the API's detail (calls used and reset date) instead of "Too Many Requests".
* Dasha form widget now shows the current Mahadasha, Antardasha and Pratyantardasha (it rendered an empty tree); Panchang form widget shows tithi, nakshatra, yoga and karana names instead of "[object Object]".
* AI chart widget shows the API's error detail instead of a generic status text.
* AI chart loading text is now "Preparing your reading…".
* Admin shortcode list and AI Chart block description: removed leftover third-party branding.
* Readme: endpoint count corrected to 147.

= 1.2.2 =
* Clearer error messages when your site cannot reach the VedIntel API (e.g. host blocking outbound connections), instead of a misleading plan message.
* Clearer messages for missing, invalid or expired API keys and plan limits.
* Clearer message when no AI provider is configured.
* Works correctly with page caching plugins.
* Fixed panchang values (tithi, nakshatra, etc.) showing as "Array".

= 1.2.1 =
* Fixed city autocomplete picking the wrong place: suggestions now show "City, State, Country" (e.g. "Jodhpur, Rajasthan, India").
* Fixed stale coordinates: editing the Birth City text now clears the previously selected latitude, longitude and timezone, so an earlier city's coordinates are never reused.
* Keyboard support for city suggestions: Arrow Up/Down to highlight, Enter to select (Enter no longer submits the form while suggestions are open).
* On submit, if no suggestion was clicked but exactly one suggestion's city name matches the typed text, it is selected automatically; otherwise the "please select a city" message is shown.
* Timezone is always taken from the numeric UTC offset (tz); the IANA zone name is display-only.
* New: optional Accent colour and Background colour pickers under Settings → VedIntel Astro → Widget Defaults, plus accent="#hex" and bg="#hex" shortcode attributes. Empty keeps the theme's colours, so existing sites are unchanged.
* Fixed the settings page not loading its own CSS/JS (the Test Key and Copy buttons now work).

= 1.2.0 =
* Added optional tabbed chart view with Natal, Navamsa (D9), Dashamsha (D10), Dashas and Transits panels.
* Added plan-aware capability handling via new entitlements class.
* Added planetary degrees and nakshatra pada display.
* Fixed Vimshottari Dasha response rendering.
* Improved mobile widget layout.

= 1.0.8 =
* Fixed city autocomplete: the Birth City field's suggestion dropdown never appeared, always showing "Please select a city from the suggestions to auto-fill coordinates" regardless of the city typed. Caused by the widget JS reading the wrong field from the geocode API's response shape (results were nested under response.results, not response directly).

= 1.0.7 =
* Fixed branding: replaced "Vedika" with "VedIntel™ AstroAPI" throughout
* Removed invalid contributor username from readme

= 1.0.6 =
* Documented intentional public permission_callback on REST proxy and geocode routes — both are read-only public endpoints serving unauthenticated front-end visitors; security enforced via strict endpoint allowlist and server-side API key injection

= 1.0.5 =
* Fixed unescaped output in block render callback: retro symbol now passed through wp_kses()

= 1.0.4 =
* Fixed text domain: all 75 elements now use 'vedintel-astro-widgets' matching the plugin slug

= 1.0.3 =
* Fixed translators comment position — moved directly above esc_html__() call inside printf()

= 1.0.2 =
* Added translators comment for i18n compliance
* Added wp_unslash() before sanitize_text_field() on POST input
* Replaced date() with gmdate() to avoid timezone issues
* Reduced tags to 5 (Plugin Check compliance)

= 1.0.1 =
* Renamed plugin to VedIntel Astro Widgets
* Changed attribution branding default to opt-in (off by default)
* Added External Services disclosure to readme
* Added swankydigitaltools to contributors list

= 1.0.0 =
* Initial release
* 6 shortcodes: vedintel_chart, vedintel_dasha, vedintel_panchang, vedintel_compatibility, vedintel_ai_chart, vedintel_form
* 6 Gutenberg blocks with inspector controls
* 3 visual themes: Cosmic Dark, Clean Light, Minimal
* City autocomplete via geo-search endpoint
* Secure server-side REST proxy
* AI narrative streaming (NDJSON)
* Admin settings page with API key tester and shortcode reference
