@roxyapi/ui-react 0.43.0 → 0.44.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 (162) hide show
  1. package/AGENTS.md +3 -1
  2. package/README.md +3 -3
  3. package/dist/components/almanac-day.js +1 -1
  4. package/dist/components/almanac-day.js.map +1 -1
  5. package/dist/components/angel-number-card.js +1 -1
  6. package/dist/components/angel-number-card.js.map +1 -1
  7. package/dist/components/angel-number-lookup.js +1 -1
  8. package/dist/components/angel-number-lookup.js.map +1 -1
  9. package/dist/components/arudha-padas.js +1 -1
  10. package/dist/components/arudha-padas.js.map +1 -1
  11. package/dist/components/ashtakavarga-grid.js +1 -1
  12. package/dist/components/ashtakavarga-grid.js.map +1 -1
  13. package/dist/components/aspects-table.js +1 -1
  14. package/dist/components/aspects-table.js.map +1 -1
  15. package/dist/components/astrocartography-map.js +1 -1
  16. package/dist/components/astrocartography-map.js.map +1 -1
  17. package/dist/components/bazi-chart.js +1 -1
  18. package/dist/components/bazi-chart.js.map +1 -1
  19. package/dist/components/bhav-chalit-table.js +1 -1
  20. package/dist/components/bhav-chalit-table.js.map +1 -1
  21. package/dist/components/bhava-bala-table.js +1 -1
  22. package/dist/components/bhava-bala-table.js.map +1 -1
  23. package/dist/components/biorhythm-chart.js +1 -1
  24. package/dist/components/biorhythm-chart.js.map +1 -1
  25. package/dist/components/bodygraph.js +1 -1
  26. package/dist/components/bodygraph.js.map +1 -1
  27. package/dist/components/chara-karakas.js +1 -1
  28. package/dist/components/chara-karakas.js.map +1 -1
  29. package/dist/components/choghadiya-grid.js +1 -1
  30. package/dist/components/choghadiya-grid.js.map +1 -1
  31. package/dist/components/compatibility-card.js +1 -1
  32. package/dist/components/compatibility-card.js.map +1 -1
  33. package/dist/components/crystal-card.js +1 -1
  34. package/dist/components/crystal-card.js.map +1 -1
  35. package/dist/components/crystal-grid.js +1 -1
  36. package/dist/components/crystal-grid.js.map +1 -1
  37. package/dist/components/dasha-timeline.js +1 -1
  38. package/dist/components/dasha-timeline.js.map +1 -1
  39. package/dist/components/data.js +1 -1
  40. package/dist/components/data.js.map +1 -1
  41. package/dist/components/divisional-chart.js +1 -1
  42. package/dist/components/divisional-chart.js.map +1 -1
  43. package/dist/components/dosha-card.js +1 -1
  44. package/dist/components/dosha-card.js.map +1 -1
  45. package/dist/components/dosha-constitution.js +1 -1
  46. package/dist/components/dosha-constitution.js.map +1 -1
  47. package/dist/components/dream-card.js +1 -1
  48. package/dist/components/dream-card.js.map +1 -1
  49. package/dist/components/dream-search.js +1 -1
  50. package/dist/components/dream-search.js.map +1 -1
  51. package/dist/components/endpoint-form.js +1 -1
  52. package/dist/components/endpoint-form.js.map +1 -1
  53. package/dist/components/ephemeris-table.js +1 -1
  54. package/dist/components/ephemeris-table.js.map +1 -1
  55. package/dist/components/fixed-stars.js +1 -1
  56. package/dist/components/fixed-stars.js.map +1 -1
  57. package/dist/components/flying-star-chart.js +1 -1
  58. package/dist/components/flying-star-chart.js.map +1 -1
  59. package/dist/components/forecast-digest.js +1 -1
  60. package/dist/components/forecast-digest.js.map +1 -1
  61. package/dist/components/forecast-timeline.js +1 -1
  62. package/dist/components/forecast-timeline.js.map +1 -1
  63. package/dist/components/gematria.js +1 -1
  64. package/dist/components/gematria.js.map +1 -1
  65. package/dist/components/gochara-table.js +1 -1
  66. package/dist/components/gochara-table.js.map +1 -1
  67. package/dist/components/guna-milan.js +1 -1
  68. package/dist/components/guna-milan.js.map +1 -1
  69. package/dist/components/hd-connection.js +1 -1
  70. package/dist/components/hd-connection.js.map +1 -1
  71. package/dist/components/hd-penta.js +1 -1
  72. package/dist/components/hd-penta.js.map +1 -1
  73. package/dist/components/hd-type-card.js +1 -1
  74. package/dist/components/hd-type-card.js.map +1 -1
  75. package/dist/components/hd-variables.js +1 -1
  76. package/dist/components/hd-variables.js.map +1 -1
  77. package/dist/components/heliacal-table.js +1 -1
  78. package/dist/components/heliacal-table.js.map +1 -1
  79. package/dist/components/hexagram.js +1 -1
  80. package/dist/components/hexagram.js.map +1 -1
  81. package/dist/components/hora-table.js +1 -1
  82. package/dist/components/hora-table.js.map +1 -1
  83. package/dist/components/horoscope-card.js +1 -1
  84. package/dist/components/horoscope-card.js.map +1 -1
  85. package/dist/components/kp-chart.js +1 -1
  86. package/dist/components/kp-chart.js.map +1 -1
  87. package/dist/components/kp-finance-card.js +1 -1
  88. package/dist/components/kp-finance-card.js.map +1 -1
  89. package/dist/components/kp-planets-table.js +1 -1
  90. package/dist/components/kp-planets-table.js.map +1 -1
  91. package/dist/components/kp-ruling-planets.js +1 -1
  92. package/dist/components/kp-ruling-planets.js.map +1 -1
  93. package/dist/components/kua-card.js +1 -1
  94. package/dist/components/kua-card.js.map +1 -1
  95. package/dist/components/local-space-compass.js +1 -1
  96. package/dist/components/local-space-compass.js.map +1 -1
  97. package/dist/components/location-search.js +1 -1
  98. package/dist/components/location-search.js.map +1 -1
  99. package/dist/components/luck-pillars.js +1 -1
  100. package/dist/components/luck-pillars.js.map +1 -1
  101. package/dist/components/mayan-day-sign.js +1 -1
  102. package/dist/components/mayan-day-sign.js.map +1 -1
  103. package/dist/components/moon-phase.js +1 -1
  104. package/dist/components/moon-phase.js.map +1 -1
  105. package/dist/components/nakshatra-card.js +1 -1
  106. package/dist/components/nakshatra-card.js.map +1 -1
  107. package/dist/components/natal-chart.js +1 -1
  108. package/dist/components/natal-chart.js.map +1 -1
  109. package/dist/components/numerology-card.js +1 -1
  110. package/dist/components/numerology-card.js.map +1 -1
  111. package/dist/components/panchang-table.js +1 -1
  112. package/dist/components/panchang-table.js.map +1 -1
  113. package/dist/components/positions-table.js +1 -1
  114. package/dist/components/positions-table.js.map +1 -1
  115. package/dist/components/profection-card.js +1 -1
  116. package/dist/components/profection-card.js.map +1 -1
  117. package/dist/components/reference-card.js +1 -1
  118. package/dist/components/reference-card.js.map +1 -1
  119. package/dist/components/relocation-wheel.js +1 -1
  120. package/dist/components/relocation-wheel.js.map +1 -1
  121. package/dist/components/shadbala-table.js +1 -1
  122. package/dist/components/shadbala-table.js.map +1 -1
  123. package/dist/components/synastry-chart.js +1 -1
  124. package/dist/components/synastry-chart.js.map +1 -1
  125. package/dist/components/tarot-card.js +1 -1
  126. package/dist/components/tarot-card.js.map +1 -1
  127. package/dist/components/tarot-catalog.js +1 -1
  128. package/dist/components/tarot-catalog.js.map +1 -1
  129. package/dist/components/tarot-spread.js +1 -1
  130. package/dist/components/tarot-spread.js.map +1 -1
  131. package/dist/components/transit-wheel.js +1 -1
  132. package/dist/components/transit-wheel.js.map +1 -1
  133. package/dist/components/transits-table.js +1 -1
  134. package/dist/components/transits-table.js.map +1 -1
  135. package/dist/components/upagraha-table.js +1 -1
  136. package/dist/components/upagraha-table.js.map +1 -1
  137. package/dist/components/vastu-mandala.js +1 -1
  138. package/dist/components/vastu-mandala.js.map +1 -1
  139. package/dist/components/vedic-aspects.js +1 -1
  140. package/dist/components/vedic-aspects.js.map +1 -1
  141. package/dist/components/vedic-daily.js +1 -1
  142. package/dist/components/vedic-daily.js.map +1 -1
  143. package/dist/components/vedic-kundli.js +1 -1
  144. package/dist/components/vedic-kundli.js.map +1 -1
  145. package/dist/components/vedic-planets-table.js +1 -1
  146. package/dist/components/vedic-planets-table.js.map +1 -1
  147. package/dist/components/western-planets-table.js +1 -1
  148. package/dist/components/western-planets-table.js.map +1 -1
  149. package/dist/components/yoga-list.js +1 -1
  150. package/dist/components/yoga-list.js.map +1 -1
  151. package/dist/components/zodiac-card.js +1 -1
  152. package/dist/components/zodiac-card.js.map +1 -1
  153. package/dist/index.cjs +1 -1
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.js +1 -1
  156. package/dist/index.js.map +1 -1
  157. package/dist/load-ui.d.ts +1 -1
  158. package/dist/load-ui.js +1 -1
  159. package/dist/load-ui.js.map +1 -1
  160. package/dist/types/types.gen.d.ts +38 -34
  161. package/dist/types/types.gen.d.ts.map +1 -1
  162. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -428,12 +428,13 @@ When you do not want a backend at all, mint a **publishable key** (`pk_live_*` /
428
428
  ></roxy-natal-chart>
429
429
  ```
430
430
 
431
- That single element renders a schema-driven form (a zodiac/enum tile picker, a boolean toggle, native date and time inputs, and a city search for endpoints that need coordinates), fetches on submit, and shows a loading then error-or-result state. Optional fields collapse under one Advanced disclosure, and a form whose only required field is an enum submits on selection (tap a sign, get a reading, no button). The result keeps a re-query affordance: a single-enum picker stays above the result and refetches when the selection changes, any other form gets a compact Edit query control that restores it with the previous values. `method` defaults to `POST`; set `method="GET"` for GET endpoints. Set `data-endpoint` to the spec path without the leading slash (`dreams/symbols/{id}`, `astrology/horoscope/{sign}/daily`).
431
+ That single element renders a schema-driven form (a zodiac/enum tile picker, a boolean toggle, native date and time inputs, a city search for endpoints that need coordinates, and one card per record for a request that takes several, such as the members of a penta, with `Add` and `Remove` inside the bounds the API declares), fetches on submit, and shows a loading then error-or-result state. Optional fields collapse under one Advanced disclosure, and a form whose only required field is an enum submits on selection (tap a sign, pick a nakshatra, get a reading, no button). When the API rejects a request it names the fields it rejected, and the form prints each message under that input, marks it, opens the Advanced disclosure if the field sits there, and summarises the rejections by field label above the form; editing a field clears its message. The result keeps a re-query affordance: a single-enum picker stays above the result and refetches when the selection changes, any other form gets a compact Edit query control that restores it with the previous values. `method` defaults to `POST`; set `method="GET"` for GET endpoints. Set `data-endpoint` to the spec path without the leading slash (`dreams/symbols/{id}`, `astrology/horoscope/{sign}/daily`).
432
432
 
433
433
  **Key handling is the contract. The component enforces it, not you:**
434
434
 
435
435
  - The publishable key is safe in client code: it is origin-restricted (any other origin gets 403) and cannot read your account.
436
436
  - A **secret key never works here.** If `publishable-key` is not a `pk_` key the component refuses to fetch, sends nothing, and emits a `roxy-validation-error` event. A secret key cannot leak through self-fetch even by mistake.
437
+ - A component that cannot draw a response it received (a shape it was not written for) falls back to the generic `<roxy-data>` table for that response and emits a `roxy-render-error` event with the exception, so a page never keeps a loading placeholder on screen.
437
438
  - For production with a backend, prefer controlled mode (Patterns 1, 6, 7): the server fetches with the `sk_` key and injects the response, so no key of any kind reaches the browser.
438
439
 
439
440
  In React, the same props are typed: `<RoxyNatalChart endpoint="astrology/natal-chart" publishableKey={process.env.NEXT_PUBLIC_ROXY_PK} />`.
@@ -667,6 +668,7 @@ Both are off by default. `hide-sections` takes a comma-separated list, is case-i
667
668
  | `readings` | The interpretation accordion |
668
669
  | `reading` | One disclosure card inside it |
669
670
  | `hint` | The help text under a field of the built-in form, which quotes the API reference for that field. Hide it with `::part(hint)` on a page written for a reader who did not come for the reference; the label, the input and the validation stay |
671
+ | `field-error` | One message the API returned about one input of the built-in form, printed under it, or about one record card, printed on it |
670
672
  | `form`, `loading`, `error`, `edit-bar`, `attribution` | The built-in states, on every component |
671
673
 
672
674
  That table is the shared vocabulary, not the whole list. **`components-catalog.json` carries a `parts` array for every component, so read the exact names a component answers to instead of guessing or inspecting the DOM.** A name means the same block wherever it appears, which is what makes one rule enough: `::part(aspects)` reaches the aspect grid on a natal chart, the aspect list on an aspects table and the transit aspects on a transits table alike. Parts reach exactly one shadow root deep, and a component that draws another re-exports its parts, so `roxy-relocation-wheel::part(readings)` reaches the wheel it nests.
package/README.md CHANGED
@@ -589,7 +589,7 @@ const { data: timeline } = await roxy.forecast.generateTimeline({
589
589
 
590
590
  A self-knowledge system computed from the same ephemeris as Western astrology, laid over the I Ching gate wheel and nine chakra-style centers. Self-discovery apps, dating and compatibility products, and AI coaching bots render the full bodygraph. No coordinates needed; Human Design uses the birth instant, not the observer location.
591
591
 
592
- The response is a reading, not a set of labels: the type, strategy, authority, profile, and definition each arrive with the text that explains them, every defined channel and every center carry their own interpretation, and each of the activations carries a gate meaning and the meaning of its line. `<RoxyBodygraph>` lays that out for you. The chart and the identity read at a glance, and every body of prose sits behind a disclosure, so one component renders a complete reading without becoming a wall of text.
592
+ The response is a reading, not a set of labels: the type, strategy, authority, profile, and definition each arrive with the text that explains them, every defined channel and every center carry their own interpretation, and each of the activations carries a gate meaning and the meaning of its line. `<RoxyBodygraph>` lays that out for you. The chart and the identity read at a glance, the Design moment prints in the header on the UTC clock so the chart can be checked against any other calculator on the instant itself, and every body of prose sits behind a disclosure, so one component renders a complete reading without becoming a wall of text.
593
593
 
594
594
  ```tsx
595
595
  import { RoxyBodygraph } from '@roxyapi/ui-react';
@@ -826,7 +826,7 @@ Two ways to feed a component, and the key rule for each:
826
826
 
827
827
  Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK examples on this page. For self-fetch embedding with no backend, use a publishable key (see the fully client-side pattern in [`AGENTS.md`](AGENTS.md)).
828
828
 
829
- The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean toggle, native date and time, a city search), collapses optional fields under one Advanced disclosure, and reads a `lang` attribute for localized responses. When the page routes RoxyAPI traffic through your own server instead, `submit-url` names the route that answers the submitted request and `location-url` names the one that answers the city search, so both halves of a birth-data form go to your server and no key of any kind reaches the browser. `submit-context` takes a JSON object of your own and hands it to that route as `context` beside the request, which is where a page attaches its own verification data to a submission. For the simplest embed, load `dist/cdn/widgets.js` and drop one `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`: with the required attributes present it fetches on mount, otherwise it renders the form. That tag takes `data-submit-url`, `data-location-url` and `data-submit-context` too, so a one-tag embed can route both its requests through your server and carry no key at all. A single `<link>` to the [practitioner theme preset](https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css) restyles every widget on the page.
829
+ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean toggle, native date and time, a city search, and one card per record for a request that takes several, with `Add` and `Remove` inside the bounds the API declares), collapses optional fields under one Advanced disclosure, reads a `lang` attribute for localized responses, and prints what the API rejects under the input it rejected, marked and summarised by label. When the page routes RoxyAPI traffic through your own server instead, `submit-url` names the route that answers the submitted request and `location-url` names the one that answers the city search, so both halves of a birth-data form go to your server and no key of any kind reaches the browser. `submit-context` takes a JSON object of your own and hands it to that route as `context` beside the request, which is where a page attaches its own verification data to a submission. For the simplest embed, load `dist/cdn/widgets.js` and drop one `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`: with the required attributes present it fetches on mount, otherwise it renders the form. That tag takes `data-submit-url`, `data-location-url` and `data-submit-context` too, so a one-tag embed can route both its requests through your server and carry no key at all. A single `<link>` to the [practitioner theme preset](https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css) restyles every widget on the page.
830
830
 
831
831
  ## Distribution
832
832
 
@@ -972,7 +972,7 @@ roxy-natal-chart::part(card) {
972
972
  }
973
973
  ```
974
974
 
975
- The parts: `card`, `header`, `chart`, `legend`, `details`, `table`, `tablist`, `tab`, `panel`, `section`, `readings`, `reading`, plus `form`, `hint`, `loading`, `error`, `edit-bar` and `attribution` on the built-in states. `hint` is the help text under a field of the built-in form, which quotes the API reference for that field: hide it with `::part(hint)` when the page is written for a reader who did not come for the reference, and the label, the input and its validation stay. A `section` also carries its own name, which is what `::part(patterns)` above targets, so any single block can be dropped or restyled on its own.
975
+ The parts: `card`, `header`, `chart`, `legend`, `details`, `table`, `tablist`, `tab`, `panel`, `section`, `readings`, `reading`, plus `form`, `hint`, `field-error`, `loading`, `error`, `edit-bar` and `attribution` on the built-in states. `hint` is the help text under a field of the built-in form, which quotes the API reference for that field: hide it with `::part(hint)` when the page is written for a reader who did not come for the reference, and the label, the input and its validation stay. A `section` also carries its own name, which is what `::part(patterns)` above targets, so any single block can be dropped or restyled on its own.
976
976
 
977
977
  That list is the shared vocabulary, not the whole set. **[`components-catalog.json`](https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/components-catalog.json) carries a `parts` array for every component**, so you can read the exact names a component answers to instead of guessing or inspecting the DOM. A name means the same block wherever it appears, which is what makes one rule enough: `::part(aspects)` reaches the aspect grid on a natal chart, the aspect list on an aspects table and the transit aspects on a transits table alike.
978
978
 
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.43.0",b="roxyapi-ui-loader",M="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",$="/dist/cdn",d=null;function C(a){return!a||a==="latest"?M:`${_}${a}${$}`}function v(a=I,i){return typeof document>"u"?Promise.resolve():d||(d=new Promise((o,c)=>{let u=`${i??C(a)}/roxy-ui.js`,r=document.getElementById(b);if(r){r.dataset.loaded==="true"?o():(r.addEventListener("load",()=>o()),r.addEventListener("error",()=>c(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=b,r.src=u,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",o()}),r.addEventListener("error",()=>c(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),d)}var B=n.forwardRef(function({data:i,className:o,style:c,mode:u,endpoint:r,method:l,publishableKey:f,baseUrl:m,submitUrl:E,submitContext:p,locationUrl:R,specUrl:g,lang:y,submitLabel:w,remember:L,attribution:x,hideReadings:k,hideSections:h,...P},T){let t=n.useRef(null);n.useImperativeHandle(T,()=>t.current,[]);let[s,D]=n.useState(!1),[A,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&D(!0)}).catch(S=>{e&&H(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&i!==void 0&&(e.data=i)},[i,s]),n.useEffect(()=>{let e=t.current;e&&u!==void 0&&(e.mode=u)},[u,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.endpoint=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.method=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.publishableKey=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.baseUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.submitContext=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.locationUrl=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.lang=y)},[y,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.remember=L)},[L,s]),n.useEffect(()=>{let e=t.current;e&&x!==void 0&&(e.attribution=x)},[x,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.hideReadings=k)},[k,s]),n.useEffect(()=>{let e=t.current;e&&h!==void 0&&(e.hideSections=h)},[h,s]),A?n.createElement("div",{role:"alert",className:o,style:c},`Roxy UI script load failed: ${A.message}`):n.createElement("roxy-almanac-day",{ref:t,className:o,style:c,...P})});export{B as RoxyAlmanacDay};
1
+ import*as n from"react";var I="0.44.0",b="roxyapi-ui-loader",M="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",$="/dist/cdn",d=null;function C(a){return!a||a==="latest"?M:`${_}${a}${$}`}function v(a=I,i){return typeof document>"u"?Promise.resolve():d||(d=new Promise((o,c)=>{let u=`${i??C(a)}/roxy-ui.js`,r=document.getElementById(b);if(r){r.dataset.loaded==="true"?o():(r.addEventListener("load",()=>o()),r.addEventListener("error",()=>c(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=b,r.src=u,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",o()}),r.addEventListener("error",()=>c(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),d)}var B=n.forwardRef(function({data:i,className:o,style:c,mode:u,endpoint:r,method:l,publishableKey:f,baseUrl:m,submitUrl:E,submitContext:p,locationUrl:R,specUrl:g,lang:y,submitLabel:w,remember:L,attribution:x,hideReadings:k,hideSections:h,...P},T){let t=n.useRef(null);n.useImperativeHandle(T,()=>t.current,[]);let[s,D]=n.useState(!1),[A,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&D(!0)}).catch(S=>{e&&H(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&i!==void 0&&(e.data=i)},[i,s]),n.useEffect(()=>{let e=t.current;e&&u!==void 0&&(e.mode=u)},[u,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.endpoint=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.method=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.publishableKey=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.baseUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.submitContext=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.locationUrl=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.lang=y)},[y,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.remember=L)},[L,s]),n.useEffect(()=>{let e=t.current;e&&x!==void 0&&(e.attribution=x)},[x,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.hideReadings=k)},[k,s]),n.useEffect(()=>{let e=t.current;e&&h!==void 0&&(e.hideSections=h)},[h,s]),A?n.createElement("div",{role:"alert",className:o,style:c},`Roxy UI script load failed: ${A.message}`):n.createElement("roxy-almanac-day",{ref:t,className:o,style:c,...P})});export{B as RoxyAlmanacDay};
2
2
  //# sourceMappingURL=almanac-day.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/almanac-day.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAlmanacDayResponse, GetMonthlyAlmanacResponse, LookupAuspiciousDaysResponse } from '../types/index.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAlmanacDayProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAlmanacDayResponse | GetMonthlyAlmanacResponse | LookupAuspiciousDaysResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which read the response is: one almanac day as a card, a whole month of them as rows, or the days a search returned for one activity. */\n\tmode?: 'day' | 'month' | 'auspicious';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAlmanacDay = React.forwardRef<HTMLElement | null, RoxyAlmanacDayProps>(\n\tfunction RoxyAlmanacDay({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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: 'day' | 'month' | 'auspicious' }).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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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-almanac-day', {\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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.43.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAlmanacDayResponse, GetMonthlyAlmanacResponse, LookupAuspiciousDaysResponse } from '../types/index.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyAlmanacDayProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAlmanacDayResponse | GetMonthlyAlmanacResponse | LookupAuspiciousDaysResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Which read the response is: one almanac day as a card, a whole month of them as rows, or the days a search returned for one activity. */\n\tmode?: 'day' | 'month' | 'auspicious';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAlmanacDay = React.forwardRef<HTMLElement | null, RoxyAlmanacDayProps>(\n\tfunction RoxyAlmanacDay({ data, className, style, mode, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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: 'day' | 'month' | 'auspicious' }).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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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-almanac-day', {\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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.44.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCwBhB,IAAMC,EAAkB,SAEzBC,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,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAWH,EAAUC,CAAO,CAAC,cACxCM,EAAW,SAAS,eAAeZ,CAAS,EAChD,GAAIY,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,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rB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMhB,IAAS,SACjBgB,EAAmC,KAAOhB,EAE7C,EAAG,CAACA,EAAMS,CAAM,CAAC,EAEX,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMf,IAAgB,SACxBe,EAA0C,YAAcf,EAE3D,EAAG,CAACA,EAAaQ,CAAM,CAAC,EAElB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMd,IAAa,SACrBc,EAAwC,SAAWd,EAEtD,EAAG,CAACA,EAAUO,CAAM,CAAC,EAEf,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAgB,SACxBa,EAA0C,YAAcb,EAE3D,EAAG,CAACA,EAAaM,CAAM,CAAC,EAElB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAiB,SACzBY,EAA4C,aAAeZ,EAE9D,EAAG,CAACA,EAAcK,CAAM,CAAC,EAEnB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAiB,SACzBW,EAA2C,aAAeX,EAE7D,EAAG,CAACA,EAAcI,CAAM,CAAC,EAErBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAAtB,EAAW,MAAAC,CAAM,EAClC,+BAA+BqB,EAAM,OAAO,EAC7C,EAGY,gBAAc,mBAAoB,CAC9C,IAAKH,EACL,UAAAnB,EACA,MAAAC,EACA,GAAGgB,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAlmanacDay", "data", "className", "style", "mode", "endpoint", "method", "publishableKey", "baseUrl", "submitUrl", "submitContext", "locationUrl", "specUrl", "lang", "submitLabel", "remember", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import*as n from"react";var H="0.43.0",h="roxyapi-ui-loader",I="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",$="/dist/cdn",c=null;function N(o){return!o||o==="latest"?I:`${_}${o}${$}`}function v(o=H,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,d)=>{let u=`${a??N(o)}/roxy-ui.js`,t=document.getElementById(h);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=h,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var U=n.forwardRef(function({data:a,className:i,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:x,hideSections:b,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[k,C]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&A(!0)}).catch(S=>{e&&C(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&b!==void 0&&(e.hideSections=b)},[b,s]),k?n.createElement("div",{role:"alert",className:i,style:d},`Roxy UI script load failed: ${k.message}`):n.createElement("roxy-angel-number-card",{ref:r,className:i,style:d,...P})});export{U as RoxyAngelNumberCard};
1
+ import*as n from"react";var H="0.44.0",h="roxyapi-ui-loader",I="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",$="/dist/cdn",c=null;function N(o){return!o||o==="latest"?I:`${_}${o}${$}`}function v(o=H,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,d)=>{let u=`${a??N(o)}/roxy-ui.js`,t=document.getElementById(h);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=h,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var U=n.forwardRef(function({data:a,className:i,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:x,hideSections:b,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[k,C]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&A(!0)}).catch(S=>{e&&C(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&b!==void 0&&(e.hideSections=b)},[b,s]),k?n.createElement("div",{role:"alert",className:i,style:d},`Roxy UI script load failed: ${k.message}`):n.createElement("roxy-angel-number-card",{ref:r,className:i,style:d,...P})});export{U as RoxyAngelNumberCard};
2
2
  //# sourceMappingURL=angel-number-card.js.map
@@ -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 '../types/index.js';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAngelNumberCard = React.forwardRef<HTMLElement | null, RoxyAngelNumberCardProps>(\n\tfunction RoxyAngelNumberCard({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.43.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAngelNumberResponse } from '../types/index.js';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAngelNumberCard = React.forwardRef<HTMLElement | null, RoxyAngelNumberCardProps>(\n\tfunction RoxyAngelNumberCard({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.44.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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/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AeX,EAE7D,EAAG,CAACA,EAAcI,CAAM,CAAC,EAErBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAArB,EAAW,MAAAC,CAAM,EAClC,+BAA+BoB,EAAM,OAAO,EAC7C,EAGY,gBAAc,yBAA0B,CACpD,IAAKH,EACL,UAAAlB,EACA,MAAAC,EACA,GAAGe,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAngelNumberCard", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "submitUrl", "submitContext", "locationUrl", "specUrl", "lang", "submitLabel", "remember", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.43.0",h="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function N(o){return!o||o==="latest"?_:`${$}${o}${C}`}function v(o=I,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,t=document.getElementById(h);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=h,t.src=d,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var U=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:t,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:p,specUrl:g,lang:R,submitLabel:L,remember:w,attribution:y,hideReadings:x,hideSections:k,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[S,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&A(!0)}).catch(b=>{e&&H(b instanceof Error?b:new Error(String(b)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=r.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.locationUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.submitLabel=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.remember=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.attribution=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&k!==void 0&&(e.hideSections=k)},[k,s]),S?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${S.message}`):n.createElement("roxy-angel-number-lookup",{ref:r,className:i,style:u,...P})});export{U as RoxyAngelNumberLookup};
1
+ import*as n from"react";var I="0.44.0",h="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function N(o){return!o||o==="latest"?_:`${$}${o}${C}`}function v(o=I,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,t=document.getElementById(h);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=h,t.src=d,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var U=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:t,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:p,specUrl:g,lang:R,submitLabel:L,remember:w,attribution:y,hideReadings:x,hideSections:k,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[S,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return v().then(()=>{e&&A(!0)}).catch(b=>{e&&H(b instanceof Error?b:new Error(String(b)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=r.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.locationUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.submitLabel=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.remember=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.attribution=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&k!==void 0&&(e.hideSections=k)},[k,s]),S?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${S.message}`):n.createElement("roxy-angel-number-lookup",{ref:r,className:i,style:u,...P})});export{U as RoxyAngelNumberLookup};
2
2
  //# sourceMappingURL=angel-number-lookup.js.map
@@ -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 '../types/index.js';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAngelNumberLookup = React.forwardRef<HTMLElement | null, RoxyAngelNumberLookupProps>(\n\tfunction RoxyAngelNumberLookup({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.43.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AnalyzeNumberSequenceResponse } from '../types/index.js';\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyAngelNumberLookup = React.forwardRef<HTMLElement | null, RoxyAngelNumberLookupProps>(\n\tfunction RoxyAngelNumberLookup({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.44.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCwBhB,IAAMC,EAAkB,SAEzBC,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,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAWH,EAAUC,CAAO,CAAC,cACxCM,EAAW,SAAS,eAAeZ,CAAS,EAChD,GAAIY,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAA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O,EAAKR,EAAS,QAChBQ,GAAMf,IAAgB,SACxBe,EAA0C,YAAcf,EAE3D,EAAG,CAACA,EAAaQ,CAAM,CAAC,EAElB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMd,IAAa,SACrBc,EAAwC,SAAWd,EAEtD,EAAG,CAACA,EAAUO,CAAM,CAAC,EAEf,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMb,IAAgB,SACxBa,EAA0C,YAAcb,EAE3D,EAAG,CAACA,EAAaM,CAAM,CAAC,EAElB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMZ,IAAiB,SACzBY,EAA4C,aAAeZ,EAE9D,EAAG,CAACA,EAAcK,CAAM,CAAC,EAEnB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMX,IAAiB,SACzBW,EAA2C,aAAeX,EAE7D,EAAG,CAACA,EAAcI,CAAM,CAAC,EAErBE,EACU,gBACZ,MACA,CAAE,KAAM,QAAS,UAAArB,EAAW,MAAAC,CAAM,EAClC,+BAA+BoB,EAAM,OAAO,EAC7C,EAGY,gBAAc,2BAA4B,CACtD,IAAKH,EACL,UAAAlB,EACA,MAAAC,EACA,GAAGe,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAngelNumberLookup", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "submitUrl", "submitContext", "locationUrl", "specUrl", "lang", "submitLabel", "remember", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.43.0",k="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function M(a){return!a||a==="latest"?_:`${$}${a}${C}`}function b(a=I,i){return typeof document>"u"?Promise.resolve():c||(c=new Promise((o,d)=>{let u=`${i??M(a)}/roxy-ui.js`,t=document.getElementById(k);if(t){t.dataset.loaded==="true"?o():(t.addEventListener("load",()=>o()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=k,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",o()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var B=n.forwardRef(function({data:i,className:o,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:E,submitContext:m,locationUrl:p,specUrl:g,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:x,hideSections:h,...v},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[S,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return b().then(()=>{e&&A(!0)}).catch(P=>{e&&H(P instanceof Error?P:new Error(String(P)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&i!==void 0&&(e.data=i)},[i,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitContext=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.locationUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&h!==void 0&&(e.hideSections=h)},[h,s]),S?n.createElement("div",{role:"alert",className:o,style:d},`Roxy UI script load failed: ${S.message}`):n.createElement("roxy-arudha-padas",{ref:r,className:o,style:d,...v})});export{B as RoxyArudhaPadas};
1
+ import*as n from"react";var I="0.44.0",k="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function M(a){return!a||a==="latest"?_:`${$}${a}${C}`}function b(a=I,i){return typeof document>"u"?Promise.resolve():c||(c=new Promise((o,d)=>{let u=`${i??M(a)}/roxy-ui.js`,t=document.getElementById(k);if(t){t.dataset.loaded==="true"?o():(t.addEventListener("load",()=>o()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=k,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",o()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var B=n.forwardRef(function({data:i,className:o,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:E,submitContext:m,locationUrl:p,specUrl:g,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:x,hideSections:h,...v},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[S,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return b().then(()=>{e&&A(!0)}).catch(P=>{e&&H(P instanceof Error?P:new Error(String(P)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&i!==void 0&&(e.data=i)},[i,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.submitContext=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.locationUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.specUrl=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideReadings=x)},[x,s]),n.useEffect(()=>{let e=r.current;e&&h!==void 0&&(e.hideSections=h)},[h,s]),S?n.createElement("div",{role:"alert",className:o,style:d},`Roxy UI script load failed: ${S.message}`):n.createElement("roxy-arudha-padas",{ref:r,className:o,style:d,...v})});export{B as RoxyArudhaPadas};
2
2
  //# sourceMappingURL=arudha-padas.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/arudha-padas.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { ArudhaResponse } from '../types/index.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyArudhaPadasProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ArudhaResponse;\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyArudhaPadas = React.forwardRef<HTMLElement | null, RoxyArudhaPadasProps>(\n\tfunction RoxyArudhaPadas({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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-arudha-padas', {\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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.43.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { ArudhaResponse } from '../types/index.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyArudhaPadasProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ArudhaResponse;\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. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n\n}\n\nexport const RoxyArudhaPadas = React.forwardRef<HTMLElement | null, RoxyArudhaPadasProps>(\n\tfunction RoxyArudhaPadas({ data, className, style, endpoint, method, publishableKey, baseUrl, submitUrl, submitContext, locationUrl, specUrl, lang, submitLabel, remember, attribution, hideReadings, hideSections, ...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 && submitUrl !== undefined) {\n\t\t\t\t(el as unknown as { submitUrl: string }).submitUrl = submitUrl;\n\t\t\t}\n\t\t}, [submitUrl, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitContext !== undefined) {\n\t\t\t\t(el as unknown as { submitContext: Record<string, unknown> }).submitContext = submitContext;\n\t\t\t}\n\t\t}, [submitContext, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && locationUrl !== undefined) {\n\t\t\t\t(el as unknown as { locationUrl: string }).locationUrl = locationUrl;\n\t\t\t}\n\t\t}, [locationUrl, 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\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && lang !== undefined) {\n\t\t\t\t(el as unknown as { lang: string }).lang = lang;\n\t\t\t}\n\t\t}, [lang, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && submitLabel !== undefined) {\n\t\t\t\t(el as unknown as { submitLabel: string }).submitLabel = submitLabel;\n\t\t\t}\n\t\t}, [submitLabel, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && remember !== undefined) {\n\t\t\t\t(el as unknown as { remember: boolean }).remember = remember;\n\t\t\t}\n\t\t}, [remember, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && attribution !== undefined) {\n\t\t\t\t(el as unknown as { attribution: string }).attribution = attribution;\n\t\t\t}\n\t\t}, [attribution, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideReadings !== undefined) {\n\t\t\t\t(el as unknown as { hideReadings: boolean }).hideReadings = hideReadings;\n\t\t\t}\n\t\t}, [hideReadings, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tif (el && hideSections !== undefined) {\n\t\t\t\t(el as unknown as { hideSections: string }).hideSections = hideSections;\n\t\t\t}\n\t\t}, [hideSections, 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-arudha-padas', {\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 * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime: it is a fixed version rather than a moving alias, so a later\n * @roxyapi/ui release cannot change the elements under an existing install.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.44.0\";\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(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): 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 = `${baseUrl ?? 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/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-react';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\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.\n"],
5
5
  "mappings": "AAAA,UAAYA,MAAW,QCwBhB,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B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AC/C,IAAKH,EACL,UAAAlB,EACA,MAAAC,EACA,GAAGe,CACJ,CAAC,CACF,CACD",
6
6
  "names": ["React", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyArudhaPadas", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "submitUrl", "submitContext", "locationUrl", "specUrl", "lang", "submitLabel", "remember", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.43.0",S="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function M(a){return!a||a==="latest"?_:`${$}${a}${C}`}function b(a=I,o){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,d)=>{let u=`${o??M(a)}/roxy-ui.js`,t=document.getElementById(S);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=S,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var B=n.forwardRef(function({data:o,className:i,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:E,submitContext:g,locationUrl:m,specUrl:p,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:k,hideSections:x,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[v,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return b().then(()=>{e&&A(!0)}).catch(h=>{e&&H(h instanceof Error?h:new Error(String(h)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&o!==void 0&&(e.data=o)},[o,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.submitContext=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.locationUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&k!==void 0&&(e.hideReadings=k)},[k,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideSections=x)},[x,s]),v?n.createElement("div",{role:"alert",className:i,style:d},`Roxy UI script load failed: ${v.message}`):n.createElement("roxy-ashtakavarga-grid",{ref:r,className:i,style:d,...P})});export{B as RoxyAshtakavargaGrid};
1
+ import*as n from"react";var I="0.44.0",S="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",c=null;function M(a){return!a||a==="latest"?_:`${$}${a}${C}`}function b(a=I,o){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,d)=>{let u=`${o??M(a)}/roxy-ui.js`,t=document.getElementById(S);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=S,t.src=u,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),c)}var B=n.forwardRef(function({data:o,className:i,style:d,endpoint:u,method:t,publishableKey:l,baseUrl:f,submitUrl:E,submitContext:g,locationUrl:m,specUrl:p,lang:R,submitLabel:w,remember:y,attribution:L,hideReadings:k,hideSections:x,...P},T){let r=n.useRef(null);n.useImperativeHandle(T,()=>r.current,[]);let[s,A]=n.useState(!1),[v,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return b().then(()=>{e&&A(!0)}).catch(h=>{e&&H(h instanceof Error?h:new Error(String(h)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=r.current;e&&o!==void 0&&(e.data=o)},[o,s]),n.useEffect(()=>{let e=r.current;e&&u!==void 0&&(e.endpoint=u)},[u,s]),n.useEffect(()=>{let e=r.current;e&&t!==void 0&&(e.method=t)},[t,s]),n.useEffect(()=>{let e=r.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=r.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=r.current;e&&E!==void 0&&(e.submitUrl=E)},[E,s]),n.useEffect(()=>{let e=r.current;e&&g!==void 0&&(e.submitContext=g)},[g,s]),n.useEffect(()=>{let e=r.current;e&&m!==void 0&&(e.locationUrl=m)},[m,s]),n.useEffect(()=>{let e=r.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=r.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=r.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=r.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=r.current;e&&L!==void 0&&(e.attribution=L)},[L,s]),n.useEffect(()=>{let e=r.current;e&&k!==void 0&&(e.hideReadings=k)},[k,s]),n.useEffect(()=>{let e=r.current;e&&x!==void 0&&(e.hideSections=x)},[x,s]),v?n.createElement("div",{role:"alert",className:i,style:d},`Roxy UI script load failed: ${v.message}`):n.createElement("roxy-ashtakavarga-grid",{ref:r,className:i,style:d,...P})});export{B as RoxyAshtakavargaGrid};
2
2
  //# sourceMappingURL=ashtakavarga-grid.js.map