@roxyapi/ui-react 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/AGENTS.md +22 -5
  2. package/README.md +24 -5
  3. package/dist/components/angel-number-card.js.map +1 -1
  4. package/dist/components/angel-number-lookup.js.map +1 -1
  5. package/dist/components/ashtakavarga-grid.js.map +1 -1
  6. package/dist/components/aspects-table.js.map +1 -1
  7. package/dist/components/astrocartography-map.js.map +1 -1
  8. package/dist/components/biorhythm-chart.js.map +1 -1
  9. package/dist/components/bodygraph.js.map +1 -1
  10. package/dist/components/choghadiya-grid.js.map +1 -1
  11. package/dist/components/compatibility-card.js.map +1 -1
  12. package/dist/components/crystal-card.js.map +1 -1
  13. package/dist/components/crystal-grid.js.map +1 -1
  14. package/dist/components/dasha-timeline.js.map +1 -1
  15. package/dist/components/data.js.map +1 -1
  16. package/dist/components/divisional-chart.js.map +1 -1
  17. package/dist/components/dosha-card.js.map +1 -1
  18. package/dist/components/dream-card.js.map +1 -1
  19. package/dist/components/dream-search.js.map +1 -1
  20. package/dist/components/endpoint-form.js.map +1 -1
  21. package/dist/components/fixed-stars.js.map +1 -1
  22. package/dist/components/forecast-digest.js.map +1 -1
  23. package/dist/components/forecast-timeline.js.map +1 -1
  24. package/dist/components/guna-milan.js.map +1 -1
  25. package/dist/components/hd-connection.js.map +1 -1
  26. package/dist/components/hd-penta.js.map +1 -1
  27. package/dist/components/hd-type-card.js.map +1 -1
  28. package/dist/components/hd-variables.js.map +1 -1
  29. package/dist/components/hexagram.js.map +1 -1
  30. package/dist/components/hora-table.js.map +1 -1
  31. package/dist/components/horoscope-card.js.map +1 -1
  32. package/dist/components/kp-chart.js.map +1 -1
  33. package/dist/components/kp-planets-table.js.map +1 -1
  34. package/dist/components/kp-ruling-planets.js.map +1 -1
  35. package/dist/components/local-space-compass.js.map +1 -1
  36. package/dist/components/location-search.js.map +1 -1
  37. package/dist/components/moon-phase.js.map +1 -1
  38. package/dist/components/nakshatra-card.js.map +1 -1
  39. package/dist/components/natal-chart.js.map +1 -1
  40. package/dist/components/numerology-card.js.map +1 -1
  41. package/dist/components/panchang-table.js.map +1 -1
  42. package/dist/components/positions-table.js.map +1 -1
  43. package/dist/components/profection-card.js.map +1 -1
  44. package/dist/components/reference-card.js.map +1 -1
  45. package/dist/components/relocation-wheel.js.map +1 -1
  46. package/dist/components/shadbala-table.js.map +1 -1
  47. package/dist/components/synastry-chart.js.map +1 -1
  48. package/dist/components/tarot-card.js.map +1 -1
  49. package/dist/components/tarot-catalog.js.map +1 -1
  50. package/dist/components/tarot-spread.js.map +1 -1
  51. package/dist/components/transits-table.js.map +1 -1
  52. package/dist/components/vedic-aspects.js.map +1 -1
  53. package/dist/components/vedic-kundli.js.map +1 -1
  54. package/dist/components/vedic-planets-table.js.map +1 -1
  55. package/dist/components/western-planets-table.js.map +1 -1
  56. package/dist/components/yoga-list.js.map +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/load-ui.d.ts +1 -1
  62. package/dist/load-ui.js +1 -1
  63. package/dist/load-ui.js.map +1 -1
  64. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This file teaches AI coding agents (Claude Code, Cursor, Copilot, Codex, Gemini CLI, and any MCP-compatible client) how to use Roxy UI when integrating RoxyAPI into a project.
4
4
 
5
- This file ships inside both `@roxyapi/ui` and `@roxyapi/ui-react` on npm. After install, read it at `node_modules/@roxyapi/ui/AGENTS.md`.
5
+ This file ships inside `@roxyapi/ui`, `@roxyapi/ui-react`, and `@roxyapi/ui-vue` on npm. After install, read it at `node_modules/@roxyapi/ui/AGENTS.md`.
6
6
 
7
7
  Live preview: <https://roxyapi.github.io/ui/>. Source of truth for component types: the combined OpenAPI spec at `https://roxyapi.com/api/v2/openapi.json`, regenerated into `packages/ui/src/types/types.gen.ts`. Per-product specs live at `https://roxyapi.com/api/v2/{slug}/openapi.json`.
8
8
 
@@ -96,7 +96,7 @@ Use the table below for the formal endpoint to component mapping.
96
96
  | `<roxy-forecast-timeline>` | Forecast | POST /forecast/timeline | Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance |
97
97
  | `<roxy-forecast-digest>` | Forecast | POST /forecast/digest | Per-window event counts, domain breakdown, and the highest-significance events |
98
98
  | `<roxy-biorhythm-chart>` | Biorhythm | POST /biorhythm/{daily,forecast,critical-days} | Daily bars, forecast cycle lines, critical days |
99
- | `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram with trigrams, judgment, image, changing lines |
99
+ | `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram |
100
100
  | `<roxy-crystal-card>` | Crystals | GET /crystals/{id} | Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings |
101
101
  | `<roxy-crystal-grid>` | Crystals | GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search | Crystal gallery tiles with photo, name, and colour swatches |
102
102
  | `<roxy-dream-card>` | Dreams | GET /dreams/symbols/{id} | Symbol name, interpretation body, and letter chip |
@@ -201,7 +201,24 @@ Several components select a view, mode, or chart layout in addition to `data`. T
201
201
  <RoxyPanchangTable data={panchang} detail="detailed" />
202
202
  ```
203
203
 
204
- The full set: `RoxyNatalChart` `houseSystem`, `RoxyHoroscopeCard` `period`, `RoxyMoonPhase` `mode`, `RoxyCompatibilityCard` `mode`, `RoxyVedicKundli` and `RoxyDivisionalChart` `chartStyle`, `RoxyPanchangTable` `detail`, `RoxyDashaTimeline` `period`, `RoxyDoshaCard` `type`, `RoxyNumerologyCard` `type`, `RoxyTarotSpread` `spread`, `RoxyBiorhythmChart` `mode`, `RoxyHexagram` `mode`. Outside React, set the same value as a kebab-case attribute or a JS property on the element (for example `chart-style="south"` or `el.chartStyle = 'south'`).
204
+ The full set: `RoxyNatalChart` `houseSystem`, `RoxyHoroscopeCard` `period`, `RoxyMoonPhase` `mode`, `RoxyCompatibilityCard` `mode`, `RoxyVedicKundli` and `RoxyDivisionalChart` `chartStyle`, `RoxyPanchangTable` `detail`, `RoxyDashaTimeline` `period`, `RoxyDoshaCard` `type`, `RoxyNumerologyCard` `type`, `RoxyTarotSpread` `spread`, `RoxyBiorhythmChart` `mode`, `RoxyHexagram` `mode`. Outside React and Vue, set the same value as a kebab-case attribute or a JS property on the element (for example `chart-style="south"` or `el.chartStyle = 'south'`).
205
+
206
+ ### 6c. Vue and Nuxt
207
+
208
+ `@roxyapi/ui-vue` exposes the same components with the same prop names. Bind `data` and the config props normally; the package sets them as DOM properties for you, so an object payload never gets stringified into an attribute. Listen to widget events with the usual `@` syntax.
209
+
210
+ ```vue
211
+ <script setup lang="ts">
212
+ import { RoxyVedicKundli, RoxyLocationSearch } from '@roxyapi/ui-vue';
213
+ </script>
214
+
215
+ <template>
216
+ <RoxyVedicKundli :data="chart" chart-style="south" />
217
+ <RoxyLocationSearch @roxy-location-select="onCity" />
218
+ </template>
219
+ ```
220
+
221
+ In Nuxt, render these in a client context (`<ClientOnly>` or a `.client.vue` component): they mount Custom Elements and need the DOM, the same constraint as `'use client'` in the Next.js App Router.
205
222
 
206
223
  ### 7. Local response interface drift
207
224
 
@@ -451,8 +468,8 @@ When listing domains in user-visible copy, use the canonical order: Western astr
451
468
 
452
469
  ## What not to ship
453
470
 
454
- - Do not bundle `@roxyapi/ui` and `@roxyapi/ui-react` together; they ship independently.
455
- - Use `@roxyapi/ui-react` for React projects. Use `@roxyapi/ui` directly elsewhere.
471
+ - Do not bundle `@roxyapi/ui` with `@roxyapi/ui-react` or `@roxyapi/ui-vue`; they ship independently.
472
+ - Use `@roxyapi/ui-react` for React projects and `@roxyapi/ui-vue` for Vue and Nuxt projects. Use `@roxyapi/ui` directly elsewhere.
456
473
  - Do not write your own kundli component. The lifted layout in `<roxy-vedic-kundli>` is the canonical RoxyAPI render path.
457
474
  - Do not call astrology endpoints with hardcoded coordinates. Always geocode first via `<roxy-location-search>` or `roxy.location.searchCities()`.
458
475
  - Do not declare a local `interface XyzData` to describe a RoxyAPI response. Import the type from the spec-derived bundle: `import type { XyzResponse } from '@roxyapi/sdk'`. Local interfaces drift the moment the spec changes.
package/README.md CHANGED
@@ -196,7 +196,7 @@ Every chart, table, and card adapts to light and dark automatically. Hover any i
196
196
  <td width="50%"><strong>I Ching hexagram</strong> · <code>&lt;roxy-hexagram&gt;</code><br><sub>GET /iching/hexagrams/&lbrace;number&rbrace;, /iching/cast</sub><br>
197
197
  <picture>
198
198
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/hexagram-dark.png">
199
- <img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/hexagram-light.png" alt="Hexagram with trigrams, judgment, image, changing lines">
199
+ <img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/hexagram-light.png" alt="Hexagram figure with trigrams, judgment, image, and a reading for every line">
200
200
  </picture>
201
201
  </td>
202
202
  <td width="50%"><strong>Numerology</strong> · <code>&lt;roxy-numerology-card&gt;</code><br><sub>POST /numerology/&lbrace;life-path,expression,personal-year,chart&rbrace;</sub><br>
@@ -256,7 +256,7 @@ export function Chart({ data }: { data: NatalChart }) {
256
256
  }
257
257
  ```
258
258
 
259
- For frameworks that consume custom elements directly (Vue, Svelte, Angular, Solid, vanilla HTML, WordPress) install `@roxyapi/ui` instead.
259
+ For frameworks that consume custom elements directly (Svelte, Angular, Solid, vanilla HTML, WordPress) install `@roxyapi/ui` instead.
260
260
 
261
261
  ```bash
262
262
  npm install @roxyapi/ui
@@ -292,6 +292,24 @@ Serialize with the shipped helper, never a bare `JSON.stringify`. `@roxyapi/ui`
292
292
 
293
293
  Load the bundle once anywhere on the page. It registers every `roxy-*` element and loads the design tokens, so every component on the page renders themed, in light or dark, from that single tag. Nothing else to add.
294
294
 
295
+ ### No-JavaScript fallback
296
+
297
+ The two modes degrade differently, and only one of them can be rescued.
298
+
299
+ **Controlled mode** (the `<script class="roxy-data">` island above) already holds the reading in the page. Render it server-side as ordinary HTML alongside the island and put that markup *inside* the element. Components render into a shadow root and none of them expose a `<slot>`, so light-DOM children are painted only while the element is un-upgraded, and disappear the moment the bundle registers it. You get the server HTML without JavaScript and the live component with it, from the same markup, with no flash of both.
300
+
301
+ **Form mode** (`data-endpoint` + a `pk_` key) is a self-fetch widget: it cannot work without JavaScript, because there is nothing to render until the visitor submits the form. Give it a light-DOM fallback that says so and links out.
302
+
303
+ ```html
304
+ <roxy-natal-chart data-endpoint="astrology/natal-chart" publishable-key="pk_live_…">
305
+ <!-- Painted only when JavaScript is off. Replaced by the component otherwise. -->
306
+ <p>JavaScript is required to generate this chart.
307
+ <a href="https://roxyapi.com/products/astrology">Open it on roxyapi.com</a>.</p>
308
+ </roxy-natal-chart>
309
+ ```
310
+
311
+ A `<noscript>` block works too, and is the safer choice if you also need to hide the fallback from screen readers once the component takes over.
312
+
295
313
  ```ts
296
314
  import { roxyDataScript } from '@roxyapi/ui';
297
315
 
@@ -564,6 +582,7 @@ Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK
564
582
  |---|---|
565
583
  | npm `@roxyapi/ui` | `npmjs.com/package/@roxyapi/ui` |
566
584
  | npm `@roxyapi/ui-react` | `npmjs.com/package/@roxyapi/ui-react` |
585
+ | npm `@roxyapi/ui-vue` | `npmjs.com/package/@roxyapi/ui-vue` |
567
586
  | jsDelivr CDN (full bundle) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/roxy-ui.js` |
568
587
  | jsDelivr CDN (per component) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/components/{name}.js` |
569
588
  | Widgets auto-mount (with browser keys, coming soon) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/widgets.js` |
@@ -618,7 +637,7 @@ Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK
618
637
  | `<roxy-forecast-timeline>` | Forecast | POST /forecast/timeline | Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance |
619
638
  | `<roxy-forecast-digest>` | Forecast | POST /forecast/digest | Per-window event counts, domain breakdown, and the highest-significance events |
620
639
  | `<roxy-biorhythm-chart>` | Biorhythm | POST /biorhythm/{daily,forecast,critical-days} | Daily bars, forecast cycle lines, critical days |
621
- | `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram with trigrams, judgment, image, changing lines |
640
+ | `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram |
622
641
  | `<roxy-crystal-card>` | Crystals | GET /crystals/{id} | Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings |
623
642
  | `<roxy-crystal-grid>` | Crystals | GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search | Crystal gallery tiles with photo, name, and colour swatches |
624
643
  | `<roxy-dream-card>` | Dreams | GET /dreams/symbols/{id} | Symbol name, interpretation body, and letter chip |
@@ -667,7 +686,7 @@ roxy-natal-chart {
667
686
 
668
687
  ## Built for AI agents
669
688
 
670
- [`AGENTS.md`](AGENTS.md) is bundled inside both npm packages. Once installed, agents can read it from `node_modules/@roxyapi/ui/AGENTS.md` (or `@roxyapi/ui-react/AGENTS.md`) for the component decision tree, integration patterns, and rules.
689
+ [`AGENTS.md`](AGENTS.md) is bundled inside every npm package. Once installed, agents can read it from `node_modules/@roxyapi/ui/AGENTS.md` (or `@roxyapi/ui-react/AGENTS.md`, `@roxyapi/ui-vue/AGENTS.md`) for the component decision tree, integration patterns, and rules.
671
690
 
672
691
  - Works with Claude Code, Cursor, Copilot, Codex, Gemini CLI, and any MCP-compatible client.
673
692
  - Component decision tree maps each RoxyAPI endpoint to the component that renders its response.
@@ -726,7 +745,7 @@ Persist the choice in `localStorage` from your own code; the components do not o
726
745
  <details>
727
746
  <summary><strong>How big is each component? What is the bundle cost?</strong></summary>
728
747
 
729
- Per-component bundles run 9-21 KB gzipped, capped at 30 KB by CI. The full bundle (every component, helpers, base styles, and the inlined design tokens) stays well under the 150 KB CI cap, around 85 KB gzipped today. The React package loads the runtime on mount, so a route that renders one chart pays for one component, not the whole catalog. Pin a concrete version in production for byte-stable cache hits.
748
+ Per-component bundles run 9-21 KB gzipped, capped at 30 KB by CI. The full bundle (every component, helpers, base styles, and the inlined design tokens) stays well under the 150 KB CI cap, around 85 KB gzipped today. The React and Vue packages load the runtime on mount, so a route that renders one chart pays for one component, not the whole catalog. Pin a concrete version in production for byte-stable cache hits.
730
749
  </details>
731
750
 
732
751
  <details>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/angel-number-card.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAngelNumberResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAngelNumberCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAngelNumberResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAngelNumberCard = React.forwardRef<HTMLElement | null, RoxyAngelNumberCardProps>(\n\tfunction RoxyAngelNumberCard({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-angel-number-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAngelNumberResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAngelNumberCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAngelNumberResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAngelNumberCard = React.forwardRef<HTMLElement | null, RoxyAngelNumberCardProps>(\n\tfunction RoxyAngelNumberCard({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-angel-number-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EAAmBD,EAAkB,SAAyB,CAC7E,OAAI,OAAO,SAAa,IAAoB,QAA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CAC7D,CAAC,EACK,IAAM,CACZF,EAAS,EACV,CACD,EAAG,CAAC,CAAC,EAEC,YAAU,IAAM,CACrB,IAAMG,EAAKR,EAAS,QAChBQ,GAAMlB,IAAS,SACjBkB,EAAoC,KAAOlB,EAE9C,EAAG,CAACA,EAAMW,CAAM,CAAC,EAEX,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMf,IAAa,SACrBe,EAAuC,SAAWf,EAErD,EAAG,CAACA,EAAUQ,CAAM,CAAC,EAEf,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMd,IAAW,SACnBc,EAA6C,OAASd,EAEzD,EAAG,CAACA,EAAQO,CAAM,CAAC,EAEb,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAmB,SAC3Ba,EAA6C,eAAiBb,EAEjE,EAAG,CAACA,EAAgBM,CAAM,CAAC,EAErB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAY,SACpBY,EAAsC,QAAUZ,EAEnD,EAAG,CAACA,EAASK,CAAM,CAAC,EAEd,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAY,SACpBW,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAZ,EAAW,MAAAC,CAAM,EAClC,+BAA+BW,EAAM,OAAO,EAC7C,EAGY,gBAAc,yBAA0B,CACpD,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyAngelNumberCard", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/angel-number-lookup.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AnalyzeNumberSequenceResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAngelNumberLookupProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AnalyzeNumberSequenceResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAngelNumberLookup = React.forwardRef<HTMLElement | null, RoxyAngelNumberLookupProps>(\n\tfunction RoxyAngelNumberLookup({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-angel-number-lookup', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AnalyzeNumberSequenceResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAngelNumberLookupProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AnalyzeNumberSequenceResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAngelNumberLookup = React.forwardRef<HTMLElement | null, RoxyAngelNumberLookupProps>(\n\tfunction RoxyAngelNumberLookup({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-angel-number-lookup', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EAAmBD,EAAkB,SAAyB,CAC7E,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDF,IAEJA,EAAS,IAAI,QAAc,CAACI,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGL,EAAUC,CAAO,CAAC,cAC7BK,EAAW,SAAS,eAAeX,CAAS,EAChD,GAAIW,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,SAAS,cAAc,QAAQ,EAC1CA,EAAS,GAAKX,EACdW,EAAS,IAAMD,EACfC,EAAS,MAAQ,GACjBA,EAAS,YAAc,YACvBA,EAAS,iBAAiB,OAAQ,IAAM,CACvCA,EAAU,QAAQ,OAAS,OAC3BH,EAAQ,CACT,CAAC,EACDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAA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B,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAY,SACpBY,EAAsC,QAAUZ,EAEnD,EAAG,CAACA,EAASK,CAAM,CAAC,EAEd,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAY,SACpBW,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAZ,EAAW,MAAAC,CAAM,EAClC,+BAA+BW,EAAM,OAAO,EAC7C,EAGY,gBAAc,2BAA4B,CACtD,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyAngelNumberLookup", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/ashtakavarga-grid.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AshtakavargaResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAshtakavargaGridProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AshtakavargaResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAshtakavargaGrid = React.forwardRef<HTMLElement | null, RoxyAshtakavargaGridProps>(\n\tfunction RoxyAshtakavargaGrid({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-ashtakavarga-grid', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AshtakavargaResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAshtakavargaGridProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AshtakavargaResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAshtakavargaGrid = React.forwardRef<HTMLElement | null, RoxyAshtakavargaGridProps>(\n\tfunction RoxyAshtakavargaGrid({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-ashtakavarga-grid', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EAAmB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e,MAAQA,EAAM,IAAI,MAAM,OAAOA,CAAG,CAAC,CAAC,CAC7D,CAAC,EACK,IAAM,CACZF,EAAS,EACV,CACD,EAAG,CAAC,CAAC,EAEC,YAAU,IAAM,CACrB,IAAMG,EAAKR,EAAS,QAChBQ,GAAMlB,IAAS,SACjBkB,EAAoC,KAAOlB,EAE9C,EAAG,CAACA,EAAMW,CAAM,CAAC,EAEX,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMf,IAAa,SACrBe,EAAuC,SAAWf,EAErD,EAAG,CAACA,EAAUQ,CAAM,CAAC,EAEf,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMd,IAAW,SACnBc,EAA6C,OAASd,EAEzD,EAAG,CAACA,EAAQO,CAAM,CAAC,EAEb,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAmB,SAC3Ba,EAA6C,eAAiBb,EAEjE,EAAG,CAACA,EAAgBM,CAAM,CAAC,EAErB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAY,SACpBY,EAAsC,QAAUZ,EAEnD,EAAG,CAACA,EAASK,CAAM,CAAC,EAEd,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAY,SACpBW,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAZ,EAAW,MAAAC,CAAM,EAClC,+BAA+BW,EAAM,OAAO,EAC7C,EAGY,gBAAc,yBAA0B,CACpD,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyAshtakavargaGrid", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/aspects-table.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateAspectsResponse, CalculateTransitAspectsResponse, DetectAspectPatternsResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAspectsTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateAspectsResponse | CalculateTransitAspectsResponse | DetectAspectPatternsResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAspectsTable = React.forwardRef<HTMLElement | null, RoxyAspectsTableProps>(\n\tfunction RoxyAspectsTable({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-aspects-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateAspectsResponse, CalculateTransitAspectsResponse, DetectAspectPatternsResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAspectsTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateAspectsResponse | CalculateTransitAspectsResponse | DetectAspectPatternsResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAspectsTable = React.forwardRef<HTMLElement | null, RoxyAspectsTableProps>(\n\tfunction RoxyAspectsTable({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-aspects-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EAAmBD,EAAkB,SAAyB,CAC7E,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDF,IAEJA,EAAS,IAAI,QAAc,CAACI,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGL,EAAUC,CAAO,CAAC,cAC7BK,EAAW,SAAS,eAAeX,CAAS,EAChD,GAAIW,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,SAAS,cAAc,QAAQ,EAC1CA,EAAS,GAAKX,EACdW,EAAS,IAAMD,EACfC,EAAS,MAAQ,GACjBA,EAAS,YAAc,YACvBA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AAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAmB,SAC3Ba,EAA6C,eAAiBb,EAEjE,EAAG,CAACA,EAAgBM,CAAM,CAAC,EAErB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAY,SACpBY,EAAsC,QAAUZ,EAEnD,EAAG,CAACA,EAASK,CAAM,CAAC,EAEd,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAY,SACpBW,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAZ,EAAW,MAAAC,CAAM,EAClC,+BAA+BW,EAAM,OAAO,EAC7C,EAGY,gBAAc,qBAAsB,CAChD,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyAspectsTable", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/astrocartography-map.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AstrocartographyResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAstrocartographyMapProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AstrocartographyResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAstrocartographyMap = React.forwardRef<HTMLElement | null, RoxyAstrocartographyMapProps>(\n\tfunction RoxyAstrocartographyMap({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-astrocartography-map', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AstrocartographyResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAstrocartographyMapProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AstrocartographyResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyAstrocartographyMap = React.forwardRef<HTMLElement | null, RoxyAstrocartographyMapProps>(\n\tfunction RoxyAstrocartographyMap({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-astrocartography-map', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,C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LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyAstrocartographyMap", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/biorhythm-chart.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCriticalDaysResponse, GetDailyBiorhythmResponse, GetForecastResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyBiorhythmChartProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyBiorhythmResponse | GetForecastResponse | GetCriticalDaysResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which biorhythm response shape to render: a single day, a multi-day forecast, or the critical days list. */\n\tmode?: 'daily' | 'forecast' | 'critical-days';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyBiorhythmChart = React.forwardRef<HTMLElement | null, RoxyBiorhythmChartProps>(\n\tfunction RoxyBiorhythmChart({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && mode !== undefined) {\n\t\t\t\t(el as unknown as { mode: 'daily' | 'forecast' | 'critical-days' }).mode = mode;\n\t\t\t}\n\t\t}, [mode, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-biorhythm-chart', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCriticalDaysResponse, GetDailyBiorhythmResponse, GetForecastResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyBiorhythmChartProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyBiorhythmResponse | GetForecastResponse | GetCriticalDaysResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which biorhythm response shape to render: a single day, a multi-day forecast, or the critical days list. */\n\tmode?: 'daily' | 'forecast' | 'critical-days';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyBiorhythmChart = React.forwardRef<HTMLElement | null, RoxyBiorhythmChartProps>(\n\tfunction RoxyBiorhythmChart({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && mode !== undefined) {\n\t\t\t\t(el as unknown as { mode: 'daily' | 'forecast' | 'critical-days' }).mode = mode;\n\t\t\t}\n\t\t}, [mode, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-biorhythm-chart', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C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7C,EAGY,gBAAc,uBAAwB,CAClD,IAAKH,EACL,UAAAV,EACA,MAAAC,EACA,GAAGO,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyBiorhythmChart", "data", "className", "style", "mode", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/bodygraph.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GenerateBodygraphResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyBodygraphProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GenerateBodygraphResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyBodygraph = React.forwardRef<HTMLElement | null, RoxyBodygraphProps>(\n\tfunction RoxyBodygraph({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-bodygraph', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GenerateBodygraphResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyBodygraphProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GenerateBodygraphResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyBodygraph = React.forwardRef<HTMLElement | null, RoxyBodygraphProps>(\n\tfunction RoxyBodygraph({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-bodygraph', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCSvB,IAAMC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EAAmBD,EAAkB,SAAyB,CAC7E,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDF,IAEJA,EAAS,IAAI,QAAc,CAACI,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGL,EAAUC,CAAO,CAAC,cAC7BK,EAAW,SAAS,eAAeX,CAAS,EAChD,GAAIW,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,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MO,EAAKR,EAAS,QAChBQ,GAAMd,IAAW,SACnBc,EAA6C,OAASd,EAEzD,EAAG,CAACA,EAAQO,CAAM,CAAC,EAEb,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAmB,SAC3Ba,EAA6C,eAAiBb,EAEjE,EAAG,CAACA,EAAgBM,CAAM,CAAC,EAErB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAY,SACpBY,EAAsC,QAAUZ,EAEnD,EAAG,CAACA,EAASK,CAAM,CAAC,EAEd,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAY,SACpBW,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAZ,EAAW,MAAAC,CAAM,EAClC,+BAA+BW,EAAM,OAAO,EAC7C,EAGY,gBAAc,iBAAkB,CAC5C,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyBodygraph", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/choghadiya-grid.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetChoghadiyaResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyChoghadiyaGridProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetChoghadiyaResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyChoghadiyaGrid = React.forwardRef<HTMLElement | null, RoxyChoghadiyaGridProps>(\n\tfunction RoxyChoghadiyaGrid({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-choghadiya-grid', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetChoghadiyaResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyChoghadiyaGridProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetChoghadiyaResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyChoghadiyaGrid = React.forwardRef<HTMLElement | null, RoxyChoghadiyaGridProps>(\n\tfunction RoxyChoghadiyaGrid({ data, className, style, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-choghadiya-grid', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\";\n"],
5
5
  "mappings": "AAAA,U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,uBAAwB,CAClD,IAAKH,EACL,UAAAT,EACA,MAAAC,EACA,GAAGM,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyChoghadiyaGrid", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/compatibility-card.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateBioCompatibilityResponse, CalculateCompatibilityResponse, CalculateNumCompatibilityResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyCompatibilityCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateCompatibilityResponse | CalculateNumCompatibilityResponse | CalculateBioCompatibilityResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which compatibility domain the response is from. Themes the card and labels the category breakdown. */\n\tmode?: 'astrology' | 'numerology' | 'biorhythm';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyCompatibilityCard = React.forwardRef<HTMLElement | null, RoxyCompatibilityCardProps>(\n\tfunction RoxyCompatibilityCard({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && mode !== undefined) {\n\t\t\t\t(el as unknown as { mode: 'astrology' | 'numerology' | 'biorhythm' }).mode = mode;\n\t\t\t}\n\t\t}, [mode, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-compatibility-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.13.0\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateBioCompatibilityResponse, CalculateCompatibilityResponse, CalculateNumCompatibilityResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyCompatibilityCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateCompatibilityResponse | CalculateNumCompatibilityResponse | CalculateBioCompatibilityResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which compatibility domain the response is from. Themes the card and labels the category breakdown. */\n\tmode?: 'astrology' | 'numerology' | 'biorhythm';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\n}\n\nexport const RoxyCompatibilityCard = React.forwardRef<HTMLElement | null, RoxyCompatibilityCardProps>(\n\tfunction RoxyCompatibilityCard({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, specUrl, ...rest }, ref) {\n\t\tconst internal = React.useRef<HTMLElement | null>(null);\n\t\tReact.useImperativeHandle<HTMLElement | null, HTMLElement | null>(\n\t\t\tref,\n\t\t\t() => internal.current,\n\t\t\t[],\n\t\t);\n\t\tconst [loaded, setLoaded] = React.useState(false);\n\t\tconst [error, setError] = React.useState<Error | null>(null);\n\n\t\tReact.useEffect(() => {\n\t\t\tlet active = true;\n\t\t\tensureScriptLoaded()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (active) setLoaded(true);\n\t\t\t\t})\n\t\t\t\t.catch((err: unknown) => {\n\t\t\t\t\tif (!active) return;\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t});\n\t\t\treturn () => {\n\t\t\t\tactive = false;\n\t\t\t};\n\t\t}, []);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && data !== undefined) {\n\t\t\t\t(el as unknown as { data: unknown }).data = data;\n\t\t\t}\n\t\t}, [data, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && mode !== undefined) {\n\t\t\t\t(el as unknown as { mode: 'astrology' | 'numerology' | 'biorhythm' }).mode = mode;\n\t\t\t}\n\t\t}, [mode, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && endpoint !== undefined) {\n\t\t\t\t(el as unknown as { endpoint: string }).endpoint = endpoint;\n\t\t\t}\n\t\t}, [endpoint, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && method !== undefined) {\n\t\t\t\t(el as unknown as { method: 'GET' | 'POST' }).method = method;\n\t\t\t}\n\t\t}, [method, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && publishableKey !== undefined) {\n\t\t\t\t(el as unknown as { publishableKey: string }).publishableKey = publishableKey;\n\t\t\t}\n\t\t}, [publishableKey, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && baseUrl !== undefined) {\n\t\t\t\t(el as unknown as { baseUrl: string }).baseUrl = baseUrl;\n\t\t\t}\n\t\t}, [baseUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && specUrl !== undefined) {\n\t\t\t\t(el as unknown as { specUrl: string }).specUrl = specUrl;\n\t\t\t}\n\t\t}, [specUrl, loaded]);\n\n\t\tif (error) {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ role: 'alert', className, style },\n\t\t\t\t`Roxy UI script load failed: ${error.message}`,\n\t\t\t);\n\t\t}\n\n\t\treturn React.createElement('roxy-compatibility-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.14.0\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W,EAAsC,QAAUX,EAEnD,EAAG,CAACA,EAASI,CAAM,CAAC,EAEhBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAb,EAAW,MAAAC,CAAM,EAClC,+BAA+BY,EAAM,OAAO,EAC7C,EAGY,gBAAc,0BAA2B,CACrD,IAAKH,EACL,UAAAV,EACA,MAAAC,EACA,GAAGO,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "resolve", "reject", "url", "existing", "RoxyCompatibilityCard", "data", "className", "style", "mode", "endpoint", "method", "publishableKey", "baseUrl", "specUrl", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }