@roxyapi/ui-react 0.53.1 → 0.53.3

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 (315) hide show
  1. package/AGENTS.md +12 -9
  2. package/README.md +14 -4
  3. package/dist/components/almanac-day.d.ts +4 -4
  4. package/dist/components/almanac-day.d.ts.map +1 -1
  5. package/dist/components/almanac-day.js +1 -1
  6. package/dist/components/almanac-day.js.map +1 -1
  7. package/dist/components/angel-number-card.d.ts +4 -4
  8. package/dist/components/angel-number-card.d.ts.map +1 -1
  9. package/dist/components/angel-number-card.js +1 -1
  10. package/dist/components/angel-number-card.js.map +1 -1
  11. package/dist/components/angel-number-lookup.d.ts +4 -4
  12. package/dist/components/angel-number-lookup.d.ts.map +1 -1
  13. package/dist/components/angel-number-lookup.js +1 -1
  14. package/dist/components/angel-number-lookup.js.map +1 -1
  15. package/dist/components/arudha-padas.d.ts +4 -4
  16. package/dist/components/arudha-padas.d.ts.map +1 -1
  17. package/dist/components/arudha-padas.js +1 -1
  18. package/dist/components/arudha-padas.js.map +1 -1
  19. package/dist/components/ashtakavarga-grid.d.ts +4 -4
  20. package/dist/components/ashtakavarga-grid.d.ts.map +1 -1
  21. package/dist/components/ashtakavarga-grid.js +1 -1
  22. package/dist/components/ashtakavarga-grid.js.map +1 -1
  23. package/dist/components/aspects-table.d.ts +4 -4
  24. package/dist/components/aspects-table.d.ts.map +1 -1
  25. package/dist/components/aspects-table.js +1 -1
  26. package/dist/components/aspects-table.js.map +1 -1
  27. package/dist/components/astrocartography-map.d.ts +4 -4
  28. package/dist/components/astrocartography-map.d.ts.map +1 -1
  29. package/dist/components/astrocartography-map.js +1 -1
  30. package/dist/components/astrocartography-map.js.map +1 -1
  31. package/dist/components/bazi-chart.d.ts +4 -4
  32. package/dist/components/bazi-chart.d.ts.map +1 -1
  33. package/dist/components/bazi-chart.js +1 -1
  34. package/dist/components/bazi-chart.js.map +1 -1
  35. package/dist/components/bhav-chalit-table.d.ts +4 -4
  36. package/dist/components/bhav-chalit-table.d.ts.map +1 -1
  37. package/dist/components/bhav-chalit-table.js +1 -1
  38. package/dist/components/bhav-chalit-table.js.map +1 -1
  39. package/dist/components/bhava-bala-table.d.ts +4 -4
  40. package/dist/components/bhava-bala-table.d.ts.map +1 -1
  41. package/dist/components/bhava-bala-table.js +1 -1
  42. package/dist/components/bhava-bala-table.js.map +1 -1
  43. package/dist/components/biorhythm-chart.d.ts +4 -4
  44. package/dist/components/biorhythm-chart.d.ts.map +1 -1
  45. package/dist/components/biorhythm-chart.js +1 -1
  46. package/dist/components/biorhythm-chart.js.map +1 -1
  47. package/dist/components/bodygraph.d.ts +4 -4
  48. package/dist/components/bodygraph.d.ts.map +1 -1
  49. package/dist/components/bodygraph.js +1 -1
  50. package/dist/components/bodygraph.js.map +1 -1
  51. package/dist/components/chara-karakas.d.ts +4 -4
  52. package/dist/components/chara-karakas.d.ts.map +1 -1
  53. package/dist/components/chara-karakas.js +1 -1
  54. package/dist/components/chara-karakas.js.map +1 -1
  55. package/dist/components/choghadiya-grid.d.ts +4 -4
  56. package/dist/components/choghadiya-grid.d.ts.map +1 -1
  57. package/dist/components/choghadiya-grid.js +1 -1
  58. package/dist/components/choghadiya-grid.js.map +1 -1
  59. package/dist/components/compatibility-card.d.ts +4 -4
  60. package/dist/components/compatibility-card.d.ts.map +1 -1
  61. package/dist/components/compatibility-card.js +1 -1
  62. package/dist/components/compatibility-card.js.map +1 -1
  63. package/dist/components/compound-number.d.ts +4 -4
  64. package/dist/components/compound-number.d.ts.map +1 -1
  65. package/dist/components/compound-number.js +1 -1
  66. package/dist/components/compound-number.js.map +1 -1
  67. package/dist/components/crystal-card.d.ts +4 -4
  68. package/dist/components/crystal-card.d.ts.map +1 -1
  69. package/dist/components/crystal-card.js +1 -1
  70. package/dist/components/crystal-card.js.map +1 -1
  71. package/dist/components/crystal-grid.d.ts +4 -4
  72. package/dist/components/crystal-grid.d.ts.map +1 -1
  73. package/dist/components/crystal-grid.js +1 -1
  74. package/dist/components/crystal-grid.js.map +1 -1
  75. package/dist/components/dasha-timeline.d.ts +4 -4
  76. package/dist/components/dasha-timeline.d.ts.map +1 -1
  77. package/dist/components/dasha-timeline.js +1 -1
  78. package/dist/components/dasha-timeline.js.map +1 -1
  79. package/dist/components/data.d.ts +4 -4
  80. package/dist/components/data.d.ts.map +1 -1
  81. package/dist/components/data.js +1 -1
  82. package/dist/components/data.js.map +1 -1
  83. package/dist/components/divisional-chart.d.ts +4 -4
  84. package/dist/components/divisional-chart.d.ts.map +1 -1
  85. package/dist/components/divisional-chart.js +1 -1
  86. package/dist/components/divisional-chart.js.map +1 -1
  87. package/dist/components/dosha-card.d.ts +4 -4
  88. package/dist/components/dosha-card.d.ts.map +1 -1
  89. package/dist/components/dosha-card.js +1 -1
  90. package/dist/components/dosha-card.js.map +1 -1
  91. package/dist/components/dosha-constitution.d.ts +4 -4
  92. package/dist/components/dosha-constitution.d.ts.map +1 -1
  93. package/dist/components/dosha-constitution.js +1 -1
  94. package/dist/components/dosha-constitution.js.map +1 -1
  95. package/dist/components/dream-card.d.ts +4 -4
  96. package/dist/components/dream-card.d.ts.map +1 -1
  97. package/dist/components/dream-card.js +1 -1
  98. package/dist/components/dream-card.js.map +1 -1
  99. package/dist/components/dream-search.d.ts +4 -4
  100. package/dist/components/dream-search.d.ts.map +1 -1
  101. package/dist/components/dream-search.js +1 -1
  102. package/dist/components/dream-search.js.map +1 -1
  103. package/dist/components/endpoint-form.js +1 -1
  104. package/dist/components/endpoint-form.js.map +1 -1
  105. package/dist/components/ephemeris-table.d.ts +4 -4
  106. package/dist/components/ephemeris-table.d.ts.map +1 -1
  107. package/dist/components/ephemeris-table.js +1 -1
  108. package/dist/components/ephemeris-table.js.map +1 -1
  109. package/dist/components/fixed-stars.d.ts +4 -4
  110. package/dist/components/fixed-stars.d.ts.map +1 -1
  111. package/dist/components/fixed-stars.js +1 -1
  112. package/dist/components/fixed-stars.js.map +1 -1
  113. package/dist/components/flying-star-chart.d.ts +4 -4
  114. package/dist/components/flying-star-chart.d.ts.map +1 -1
  115. package/dist/components/flying-star-chart.js +1 -1
  116. package/dist/components/flying-star-chart.js.map +1 -1
  117. package/dist/components/forecast-digest.d.ts +4 -4
  118. package/dist/components/forecast-digest.d.ts.map +1 -1
  119. package/dist/components/forecast-digest.js +1 -1
  120. package/dist/components/forecast-digest.js.map +1 -1
  121. package/dist/components/forecast-timeline.d.ts +4 -4
  122. package/dist/components/forecast-timeline.d.ts.map +1 -1
  123. package/dist/components/forecast-timeline.js +1 -1
  124. package/dist/components/forecast-timeline.js.map +1 -1
  125. package/dist/components/gematria.d.ts +4 -4
  126. package/dist/components/gematria.d.ts.map +1 -1
  127. package/dist/components/gematria.js +1 -1
  128. package/dist/components/gematria.js.map +1 -1
  129. package/dist/components/gochara-table.d.ts +4 -4
  130. package/dist/components/gochara-table.d.ts.map +1 -1
  131. package/dist/components/gochara-table.js +1 -1
  132. package/dist/components/gochara-table.js.map +1 -1
  133. package/dist/components/guna-milan.d.ts +4 -4
  134. package/dist/components/guna-milan.d.ts.map +1 -1
  135. package/dist/components/guna-milan.js +1 -1
  136. package/dist/components/guna-milan.js.map +1 -1
  137. package/dist/components/hd-connection.d.ts +4 -4
  138. package/dist/components/hd-connection.d.ts.map +1 -1
  139. package/dist/components/hd-connection.js +1 -1
  140. package/dist/components/hd-connection.js.map +1 -1
  141. package/dist/components/hd-penta.d.ts +4 -4
  142. package/dist/components/hd-penta.d.ts.map +1 -1
  143. package/dist/components/hd-penta.js +1 -1
  144. package/dist/components/hd-penta.js.map +1 -1
  145. package/dist/components/hd-type-card.d.ts +4 -4
  146. package/dist/components/hd-type-card.d.ts.map +1 -1
  147. package/dist/components/hd-type-card.js +1 -1
  148. package/dist/components/hd-type-card.js.map +1 -1
  149. package/dist/components/hd-variables.d.ts +4 -4
  150. package/dist/components/hd-variables.d.ts.map +1 -1
  151. package/dist/components/hd-variables.js +1 -1
  152. package/dist/components/hd-variables.js.map +1 -1
  153. package/dist/components/heliacal-table.d.ts +4 -4
  154. package/dist/components/heliacal-table.d.ts.map +1 -1
  155. package/dist/components/heliacal-table.js +1 -1
  156. package/dist/components/heliacal-table.js.map +1 -1
  157. package/dist/components/hexagram.d.ts +4 -4
  158. package/dist/components/hexagram.d.ts.map +1 -1
  159. package/dist/components/hexagram.js +1 -1
  160. package/dist/components/hexagram.js.map +1 -1
  161. package/dist/components/hora-table.d.ts +4 -4
  162. package/dist/components/hora-table.d.ts.map +1 -1
  163. package/dist/components/hora-table.js +1 -1
  164. package/dist/components/hora-table.js.map +1 -1
  165. package/dist/components/horoscope-card.d.ts +4 -4
  166. package/dist/components/horoscope-card.d.ts.map +1 -1
  167. package/dist/components/horoscope-card.js +1 -1
  168. package/dist/components/horoscope-card.js.map +1 -1
  169. package/dist/components/kp-chart.d.ts +4 -4
  170. package/dist/components/kp-chart.d.ts.map +1 -1
  171. package/dist/components/kp-chart.js +1 -1
  172. package/dist/components/kp-chart.js.map +1 -1
  173. package/dist/components/kp-finance-card.d.ts +4 -4
  174. package/dist/components/kp-finance-card.d.ts.map +1 -1
  175. package/dist/components/kp-finance-card.js +1 -1
  176. package/dist/components/kp-finance-card.js.map +1 -1
  177. package/dist/components/kp-planets-table.d.ts +4 -4
  178. package/dist/components/kp-planets-table.d.ts.map +1 -1
  179. package/dist/components/kp-planets-table.js +1 -1
  180. package/dist/components/kp-planets-table.js.map +1 -1
  181. package/dist/components/kp-ruling-planets.d.ts +4 -4
  182. package/dist/components/kp-ruling-planets.d.ts.map +1 -1
  183. package/dist/components/kp-ruling-planets.js +1 -1
  184. package/dist/components/kp-ruling-planets.js.map +1 -1
  185. package/dist/components/kua-card.d.ts +4 -4
  186. package/dist/components/kua-card.d.ts.map +1 -1
  187. package/dist/components/kua-card.js +1 -1
  188. package/dist/components/kua-card.js.map +1 -1
  189. package/dist/components/local-space-compass.d.ts +4 -4
  190. package/dist/components/local-space-compass.d.ts.map +1 -1
  191. package/dist/components/local-space-compass.js +1 -1
  192. package/dist/components/local-space-compass.js.map +1 -1
  193. package/dist/components/location-search.d.ts +6 -2
  194. package/dist/components/location-search.d.ts.map +1 -1
  195. package/dist/components/location-search.js +1 -1
  196. package/dist/components/location-search.js.map +3 -3
  197. package/dist/components/luck-pillars.d.ts +4 -4
  198. package/dist/components/luck-pillars.d.ts.map +1 -1
  199. package/dist/components/luck-pillars.js +1 -1
  200. package/dist/components/luck-pillars.js.map +1 -1
  201. package/dist/components/mayan-day-sign.d.ts +4 -4
  202. package/dist/components/mayan-day-sign.d.ts.map +1 -1
  203. package/dist/components/mayan-day-sign.js +1 -1
  204. package/dist/components/mayan-day-sign.js.map +1 -1
  205. package/dist/components/moon-phase.d.ts +4 -4
  206. package/dist/components/moon-phase.d.ts.map +1 -1
  207. package/dist/components/moon-phase.js +1 -1
  208. package/dist/components/moon-phase.js.map +1 -1
  209. package/dist/components/nakshatra-card.d.ts +4 -4
  210. package/dist/components/nakshatra-card.d.ts.map +1 -1
  211. package/dist/components/nakshatra-card.js +1 -1
  212. package/dist/components/nakshatra-card.js.map +1 -1
  213. package/dist/components/natal-chart.d.ts +4 -4
  214. package/dist/components/natal-chart.d.ts.map +1 -1
  215. package/dist/components/natal-chart.js +1 -1
  216. package/dist/components/natal-chart.js.map +1 -1
  217. package/dist/components/numerology-card.d.ts +4 -4
  218. package/dist/components/numerology-card.d.ts.map +1 -1
  219. package/dist/components/numerology-card.js +1 -1
  220. package/dist/components/numerology-card.js.map +1 -1
  221. package/dist/components/panchang-table.d.ts +4 -4
  222. package/dist/components/panchang-table.d.ts.map +1 -1
  223. package/dist/components/panchang-table.js +1 -1
  224. package/dist/components/panchang-table.js.map +1 -1
  225. package/dist/components/positions-table.d.ts +4 -4
  226. package/dist/components/positions-table.d.ts.map +1 -1
  227. package/dist/components/positions-table.js +1 -1
  228. package/dist/components/positions-table.js.map +1 -1
  229. package/dist/components/profection-card.d.ts +4 -4
  230. package/dist/components/profection-card.d.ts.map +1 -1
  231. package/dist/components/profection-card.js +1 -1
  232. package/dist/components/profection-card.js.map +1 -1
  233. package/dist/components/reference-card.d.ts +4 -4
  234. package/dist/components/reference-card.d.ts.map +1 -1
  235. package/dist/components/reference-card.js +1 -1
  236. package/dist/components/reference-card.js.map +1 -1
  237. package/dist/components/relocation-wheel.d.ts +4 -4
  238. package/dist/components/relocation-wheel.d.ts.map +1 -1
  239. package/dist/components/relocation-wheel.js +1 -1
  240. package/dist/components/relocation-wheel.js.map +1 -1
  241. package/dist/components/shadbala-table.d.ts +4 -4
  242. package/dist/components/shadbala-table.d.ts.map +1 -1
  243. package/dist/components/shadbala-table.js +1 -1
  244. package/dist/components/shadbala-table.js.map +1 -1
  245. package/dist/components/synastry-chart.d.ts +4 -4
  246. package/dist/components/synastry-chart.d.ts.map +1 -1
  247. package/dist/components/synastry-chart.js +1 -1
  248. package/dist/components/synastry-chart.js.map +1 -1
  249. package/dist/components/tarot-card.d.ts +4 -4
  250. package/dist/components/tarot-card.d.ts.map +1 -1
  251. package/dist/components/tarot-card.js +1 -1
  252. package/dist/components/tarot-card.js.map +1 -1
  253. package/dist/components/tarot-catalog.d.ts +4 -4
  254. package/dist/components/tarot-catalog.d.ts.map +1 -1
  255. package/dist/components/tarot-catalog.js +1 -1
  256. package/dist/components/tarot-catalog.js.map +1 -1
  257. package/dist/components/tarot-spread.d.ts +4 -4
  258. package/dist/components/tarot-spread.d.ts.map +1 -1
  259. package/dist/components/tarot-spread.js +1 -1
  260. package/dist/components/tarot-spread.js.map +1 -1
  261. package/dist/components/transit-wheel.d.ts +4 -4
  262. package/dist/components/transit-wheel.d.ts.map +1 -1
  263. package/dist/components/transit-wheel.js +1 -1
  264. package/dist/components/transit-wheel.js.map +1 -1
  265. package/dist/components/transits-table.d.ts +4 -4
  266. package/dist/components/transits-table.d.ts.map +1 -1
  267. package/dist/components/transits-table.js +1 -1
  268. package/dist/components/transits-table.js.map +1 -1
  269. package/dist/components/upagraha-table.d.ts +4 -4
  270. package/dist/components/upagraha-table.d.ts.map +1 -1
  271. package/dist/components/upagraha-table.js +1 -1
  272. package/dist/components/upagraha-table.js.map +1 -1
  273. package/dist/components/vastu-mandala.d.ts +4 -4
  274. package/dist/components/vastu-mandala.d.ts.map +1 -1
  275. package/dist/components/vastu-mandala.js +1 -1
  276. package/dist/components/vastu-mandala.js.map +1 -1
  277. package/dist/components/vedic-aspects.d.ts +4 -4
  278. package/dist/components/vedic-aspects.d.ts.map +1 -1
  279. package/dist/components/vedic-aspects.js +1 -1
  280. package/dist/components/vedic-aspects.js.map +1 -1
  281. package/dist/components/vedic-daily.d.ts +4 -4
  282. package/dist/components/vedic-daily.d.ts.map +1 -1
  283. package/dist/components/vedic-daily.js +1 -1
  284. package/dist/components/vedic-daily.js.map +1 -1
  285. package/dist/components/vedic-kundli.d.ts +4 -4
  286. package/dist/components/vedic-kundli.d.ts.map +1 -1
  287. package/dist/components/vedic-kundli.js +1 -1
  288. package/dist/components/vedic-kundli.js.map +1 -1
  289. package/dist/components/vedic-planets-table.d.ts +4 -4
  290. package/dist/components/vedic-planets-table.d.ts.map +1 -1
  291. package/dist/components/vedic-planets-table.js +1 -1
  292. package/dist/components/vedic-planets-table.js.map +1 -1
  293. package/dist/components/western-planets-table.d.ts +4 -4
  294. package/dist/components/western-planets-table.d.ts.map +1 -1
  295. package/dist/components/western-planets-table.js +1 -1
  296. package/dist/components/western-planets-table.js.map +1 -1
  297. package/dist/components/yoga-list.d.ts +4 -4
  298. package/dist/components/yoga-list.d.ts.map +1 -1
  299. package/dist/components/yoga-list.js +1 -1
  300. package/dist/components/yoga-list.js.map +1 -1
  301. package/dist/components/zodiac-card.d.ts +4 -4
  302. package/dist/components/zodiac-card.d.ts.map +1 -1
  303. package/dist/components/zodiac-card.js +1 -1
  304. package/dist/components/zodiac-card.js.map +1 -1
  305. package/dist/index.cjs +1 -1
  306. package/dist/index.cjs.map +3 -3
  307. package/dist/index.js +1 -1
  308. package/dist/index.js.map +3 -3
  309. package/dist/jsx.d.ts +10 -6
  310. package/dist/jsx.d.ts.map +1 -1
  311. package/dist/load-ui.d.ts +1 -1
  312. package/dist/load-ui.js +1 -1
  313. package/dist/load-ui.js.map +1 -1
  314. package/dist/types/types.gen.d.ts +10 -10
  315. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -402,7 +402,7 @@ For a static chart with no picker, fetch in a Server Component and pass `data` t
402
402
 
403
403
  `<roxy-endpoint-form>` reads the OpenAPI spec and renders the inputs for any endpoint. On `roxy-submit`, POST the validated values to your own route, which calls the SDK with the secret key, then set the returned data on the target component. For an endpoint that needs coordinates, add `publishable-key="pk_live_..."` so the built-in city search can geocode.
404
404
 
405
- The city search is the one request the form issues on its own, while a visitor is still typing. When the page routes RoxyAPI traffic through your own server, give it a route for that search and name it with `location-url` (absolute, or relative to the page). Then the form calls your server for cities too, and no key of any kind reaches the browser. The same attribute works on any component in self-fetch mode, alongside `submit-url`, and on a one-tag widget as `data-location-url`.
405
+ The city search is the one request the form issues on its own, while a visitor is still typing. When the page routes RoxyAPI traffic through your own server, give it a route for that search and name it with `location-url` (absolute, or relative to the page). Then the form calls your server for cities too, and no key of any kind reaches the browser. A component in self-fetch mode needs none of this: its `submit-url` route answers the city search too, and `location-url` (`data-location-url` on a one-tag widget) only sends the search somewhere else.
406
406
 
407
407
  A rendering component in self-fetch mode (Pattern 4) can also send data of your own with what it submits, which the bare form above does not need because your own code writes that request. Give it `submit-context` with a JSON object and your `submit-url` route receives that object as `context` beside the request, which is where a page attaches its own verification data to a submission. The component passes it through untouched and reads no key of it, so its shape is yours to choose; leave the attribute off and your route receives exactly the request it always did. A one-tag widget takes it as `data-submit-context`.
408
408
 
@@ -427,16 +427,19 @@ A rendering component in self-fetch mode (Pattern 4) can also send data of your
427
427
 
428
428
  ### Pattern 4: fully client-side with a publishable key (no server, no script)
429
429
 
430
- When you do not want a backend at all, mint a **publishable key** (`pk_live_*` / `pk_test_*`) at `roxyapi.com/account`, register the origins you embed on, and let the component fetch itself. Every rendering component is self-fetching: give it a `data-endpoint` and a `publishable-key` and it renders its own input form, calls RoxyAPI on submit, and displays the result. No script, no separate location wiring, no envelope handling.
430
+ When you do not want a backend at all, mint a **publishable key** (`pk_live_*` / `pk_test_*`) at `roxyapi.com/account`, register the origins you embed on, and let the component fetch itself. Every rendering component is self-fetching: give it a `publishable-key` and it renders its own input form, calls RoxyAPI on submit, and displays the result. No script, no separate location wiring, no envelope handling.
431
431
 
432
432
  ```html
433
- <roxy-natal-chart
434
- data-endpoint="astrology/natal-chart"
433
+ <roxy-natal-chart publishable-key="pk_live_..."></roxy-natal-chart>
434
+
435
+ <!-- Any other endpoint the component renders -->
436
+ <roxy-positions-table
437
+ data-endpoint="astrology/lilith"
435
438
  publishable-key="pk_live_..."
436
- ></roxy-natal-chart>
439
+ ></roxy-positions-table>
437
440
  ```
438
441
 
439
- 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 or a timezone, 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`).
442
+ 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 or a timezone, 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. `data-endpoint` is optional. Without it the component fetches its default endpoint, and its config attribute (`mode`, `period`, `type`, `spread`, `detail`) picks another of the endpoints it renders, method included. Set `data-endpoint` to the spec path without the leading slash (`dreams/symbols/{id}`, `astrology/horoscope/{sign}/daily`) to choose any endpoint the component renders; beside it, `method` defaults to `POST`, so set `method="GET"` for a GET endpoint.
440
443
 
441
444
  **Key handling is the contract. The component enforces it, not you:**
442
445
 
@@ -445,11 +448,11 @@ That single element renders a schema-driven form (a zodiac/enum tile picker, a b
445
448
  - 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.
446
449
  - 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.
447
450
 
448
- In React, the same props are typed: `<RoxyNatalChart endpoint="astrology/natal-chart" publishableKey={process.env.NEXT_PUBLIC_ROXY_PK} />`.
451
+ In React, the same props are typed: `<RoxyNatalChart publishableKey={process.env.NEXT_PUBLIC_ROXY_PK} />`.
449
452
 
450
453
  **Three optional attributes on the self-fetch element.** `lang` sets the response language (`en`, `tr`, `de`, `es`, `hi`, `pt`, `fr`, `ru`, `zh-Hans`, `zh-Hant`): put it on the element (`<roxy-horoscope-card lang="de" ...>`) and the form routes it to the `?lang=` query on submit, so visitors never see a language field. `submit-label` overrides the derived button label. `attribution` renders a small "Spiritual data by RoxyAPI" credit under the result: off by default on every path. The one-tag script below forwards `data-submit-label`, `data-attribution`, `data-hide-sections` and `data-hide-readings` to the element and never sends them as request parameters. None of these apply in controlled mode. A list that shows one entry per tile (the dream search, the crystal grid) opens the picked entry in place under its tiles when it holds the key, and every pick also emits `roxy-symbol-select` for a page that pairs its own card. Any element that carries a key exposes `load({ path, method, query })`, which fetches one request into it and renders the result as assigned data.
451
454
 
452
- **One tag, no element wiring.** For the simplest embed, load `dist/cdn/widgets.js` and drop a `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`. The script mounts the matching component from a generated slug map: with every path parameter supplied as a `data-*` attribute (`data-sign`, `data-id`) it fetches on mount, otherwise it renders the same input form. A second `data-*` attribute picks a variant (`data-period`, `data-mode`, `data-type`, `data-spread`). To keep every key on your own server instead, drop the publishable key and give the tag `data-submit-url` and `data-location-url`: the widget renders the form and routes both its requests there. `data-submit-context` rides along with the submitted one.
455
+ **One tag, no element wiring.** For the simplest embed, load `dist/cdn/widgets.js` and drop a `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`. The script mounts the matching component from a generated slug map: with every path parameter supplied as a `data-*` attribute (`data-sign`, `data-id`) it fetches on mount, otherwise it renders the same input form. A second `data-*` attribute picks a variant (`data-period`, `data-mode`, `data-type`, `data-spread`). To keep every key on your own server instead, drop the publishable key and give the tag `data-submit-url`: the widget renders the form and routes every request there, the city search included, and `data-location-url` sends the city search somewhere else. `data-submit-context` rides along with each proxied request.
453
456
 
454
457
  **Theme every widget in one link.** Add `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css">` for a warm rosewater serif look, or set the `--roxy-font-display` token alone to swap result headings to a display face (it defaults to the body font, so nothing changes until you set it). See [THEMING.md](packages/ui/THEMING.md).
455
458
 
@@ -704,7 +707,7 @@ When listing domains in user-visible copy, use the canonical order: Western astr
704
707
  - Do not call astrology endpoints with hardcoded coordinates. Always geocode first via `<roxy-location-search>` or `roxy.location.searchCities()`.
705
708
  - Do not declare a local `interface XyzData` to describe a RoxyAPI response. Import the type from the component package you already installed: `import type { XyzResponse } from '@roxyapi/ui-react'` (or `@roxyapi/ui-vue`, or `@roxyapi/ui`). Local interfaces drift the moment the spec changes. You do not need `@roxyapi/sdk` for types.
706
709
  - Do not write Tailwind utility classes inside a component. The Shadow DOM boundary stops them at the door. Theme through `--roxy-*` CSS custom properties on `:root` or per element instead.
707
- - Two ways to feed a component, no third. Controlled (default, recommended for production): pass `data` as a prop or hydrate from a child `roxy-data` JSON island; your server holds the secret key. Self-fetch (no backend): set `data-endpoint` + a `pk_` `publishable-key` and the component renders its own form and fetches in the browser (a secret key is refused client-side). Do not wrap a component in your own fetch loop or call a chart/table/card's internals.
710
+ - Two ways to feed a component, no third. Controlled (default, recommended for production): pass `data` as a prop or hydrate from a child `roxy-data` JSON island; your server holds the secret key. Self-fetch (no backend): set a `pk_` `publishable-key` (or a `submit-url` route) and the component renders its own form for its default endpoint and fetches in the browser; `data-endpoint` picks any other endpoint it renders (a secret key is refused client-side). Do not wrap a component in your own fetch loop or call a chart/table/card's internals.
708
711
  - Do not redefine theme tokens or invent your own naming. Override the existing `--roxy-*` custom properties; the full list is in `THEMING.md`.
709
712
 
710
713
  ## Where to look next
package/README.md CHANGED
@@ -424,10 +424,10 @@ The two modes degrade differently, and only one of them can be rescued.
424
424
 
425
425
  **Controlled mode** (the `<script class="roxy-data">` island above) already holds the reading in the page. Render it server-side as ordinary HTML alongside the island and put that markup *inside* the element. Components render into a shadow root and none of them expose a `<slot>`, so light-DOM children are painted only while the element is un-upgraded, and disappear the moment the bundle registers it. You get the server HTML without JavaScript and the live component with it, from the same markup, with no flash of both.
426
426
 
427
- **Form mode** (`data-endpoint` + a `pk_` key) is a self-fetch widget: it cannot work without JavaScript, because there is nothing to render until the visitor submits the form. Give it a light-DOM fallback that says so and links out.
427
+ **Form mode** (a `pk_` key or a `submit-url`, no data) is a self-fetch widget: it cannot work without JavaScript, because there is nothing to render until the visitor submits the form. Give it a light-DOM fallback that says so and links out.
428
428
 
429
429
  ```html
430
- <roxy-natal-chart data-endpoint="astrology/natal-chart" publishable-key="pk_live_…">
430
+ <roxy-natal-chart publishable-key="pk_live_…">
431
431
  <!-- Painted only when JavaScript is off. Replaced by the component otherwise. -->
432
432
  <p>JavaScript is required to generate this chart.
433
433
  <a href="https://roxyapi.com/products/astrology">Open it on roxyapi.com</a>.</p>
@@ -822,11 +822,11 @@ Two key types. **Secret keys** (`sk_*`) grant full account access: use them serv
822
822
  Two ways to feed a component, and the key rule for each:
823
823
 
824
824
  - **Controlled (recommended for production).** Your server fetches with the secret key and passes the response in via the `data` property or a `roxy-data` JSON island. No key of any kind reaches the browser. This is what the WordPress plugin and the server-rendered patterns do.
825
- - **Self-fetch (no backend).** Give the component a `data-endpoint` and a `publishable-key` and it renders its own form and fetches in the browser. Only publishable keys work here: a secret key, or the `pk_live_YOUR_KEY` sample left in a copied snippet, is refused client-side, so the component shows the reason in place of its form, sends nothing and raises a validation error. A secret key cannot leak through self-fetch.
825
+ - **Self-fetch (no backend).** Give the component a `publishable-key` and it renders its own form and fetches in the browser. `data-endpoint` is optional: without it the component fetches its default endpoint, its config attribute (`mode`, `period`, `type`, `spread`, `detail`) picks another of the endpoints it renders, and `data-endpoint` set to a spec path (`astrology/lilith` on `<roxy-positions-table>`) chooses any endpoint it renders. Only publishable keys work here: a secret key, or the `pk_live_YOUR_KEY` sample left in a copied snippet, is refused client-side, so the component shows the reason in place of its form, sends nothing and raises a validation error. A secret key cannot leak through self-fetch.
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 wherever the request takes coordinates or a timezone, 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. A list that shows one entry per tile (the dream search, the crystal grid) opens the picked entry in place under its tiles when it holds the key, and every pick also emits `roxy-symbol-select` for a page that pairs its own card. Any element that carries a key exposes `load({ path, method, query })`, which fetches one request into it and renders the result as assigned data.
829
+ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean toggle, native date and time, a city search wherever the request takes coordinates or a timezone, 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` alone names the route that answers every request the component makes, the city search included, so no key of any kind reaches the browser; add `location-url` only to send the city search somewhere else. `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 every request 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. A list that shows one entry per tile (the dream search, the crystal grid) opens the picked entry in place under its tiles when it holds the key, and every pick also emits `roxy-symbol-select` for a page that pairs its own card. Any element that carries a key exposes `load({ path, method, query })`, which fetches one request into it and renders the result as assigned data.
830
830
 
831
831
  ## Distribution
832
832
 
@@ -842,6 +842,16 @@ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean
842
842
  | shadcn registry | `npx shadcn@latest add https://cdn.jsdelivr.net/gh/RoxyAPI/ui@latest/registry/{name}.json` |
843
843
  | Components catalog (JSON: every component, domain, and endpoint) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/components-catalog.json` |
844
844
 
845
+ ### Serve from your own domain
846
+
847
+ Every file a page loads ships in the package `dist` folder, and each [GitHub release](https://github.com/RoxyAPI/ui/releases) attaches the same package as a tarball (`package/dist`): download `roxyapi-ui-{version}.tgz` from the [latest release](https://github.com/RoxyAPI/ui/releases/latest), or open any single file in the [current `dist/cdn` folder](https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/). Copy `dist/cdn` and `dist/schemas` to your server side by side, as they ship, and load `cdn/roxy-ui.js` (or `cdn/widgets.js`, or one file from `cdn/components/`) from there: forms read their schemas from beside the script, and the language files sit in `cdn/locales/`. Add `submit-url` and the page talks only to your own domain.
848
+
849
+ ```html
850
+ <script src="/roxy/cdn/roxy-ui.js" defer></script>
851
+ <script src="/roxy/cdn/locales/es.js" defer></script>
852
+ <roxy-natal-chart submit-url="/roxy/proxy"></roxy-natal-chart>
853
+ ```
854
+
845
855
  ## Components
846
856
 
847
857
  <!-- BEGIN:COMPONENTS -->
@@ -8,19 +8,19 @@ export interface RoxyAlmanacDayProps extends ElementAttrs {
8
8
  style?: React.CSSProperties;
9
9
  /** 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. */
10
10
  mode?: 'day' | 'month' | 'auspicious';
11
- /** 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`). */
11
+ /** Endpoint path for built-in self-fetch, e.g. "astrology/natal-chart". Optional: with a publishableKey or submitUrl and no endpoint, the component fetches its default endpoint, or the one its config prop (mode, period, type, spread, detail) selects. Set it to render any other endpoint the component draws. Pass `data` and no key for controlled mode. */
12
12
  endpoint?: string;
13
- /** HTTP method for the self-fetch request. Defaults to POST. */
13
+ /** HTTP method for the self-fetch request. Defaults to the method of the endpoint in use, and to POST beside an explicit endpoint. */
14
14
  method?: 'GET' | 'POST';
15
15
  /** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */
16
16
  publishableKey?: string;
17
17
  /** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */
18
18
  baseUrl?: string;
19
- /** 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. */
19
+ /** Your own backend route, which holds the secret key. Every request the component makes, the city search included, is POSTed there as `{ path, method, body, query }` instead of calling RoxyAPI directly, and the component renders the JSON your route returns, so no key of any kind reaches the browser. */
20
20
  submitUrl?: string;
21
21
  /** 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. */
22
22
  submitContext?: Record<string, unknown>;
23
- /** 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. */
23
+ /** Where the self-fetch form city search sends its GET, absolute or relative to the page. Optional beside submitUrl, which carries the city search too; set it only to send the city search somewhere else. Unset with no submitUrl, the search calls the public location endpoint. */
24
24
  locationUrl?: string;
25
25
  /** Override the OpenAPI spec URL the self-fetch form introspects. */
26
26
  specUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"almanac-day.d.ts","sourceRoot":"","sources":["../../src/components/almanac-day.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC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;IACnB,wMAAwM;IACxM,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+MAA+M;IAC/M,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0PAA0P;IAC1P,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+gBAA+gB;IAC/gB,YAAY,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,eAAO,MAAM,cAAc,gGAgK1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.53.1",v="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",d=null;function O(a){return!a||a==="latest"?_:`${$}${a}${C}`}function P(a=I,i){return typeof document>"u"?Promise.resolve():d||(d=new Promise((o,c)=>{let u=`${i??O(a)}/roxy-ui.js`,r=document.getElementById(v);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=v,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 G=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,errorMessage:x,attribution:k,hideReadings:h,hideSections:S,...T},D){let t=n.useRef(null);n.useImperativeHandle(D,()=>t.current,[]);let[s,M]=n.useState(!1),[b,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&M(!0)}).catch(A=>{e&&H(A instanceof Error?A:new Error(String(A)))}),()=>{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.errorMessage=x)},[x,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.attribution=k)},[k,s]),n.useEffect(()=>{let e=t.current;e&&h!==void 0&&(e.hideReadings=h)},[h,s]),n.useEffect(()=>{let e=t.current;e&&S!==void 0&&(e.hideSections=S)},[S,s]),b?n.createElement("div",{role:"alert",className:o,style:c},`Roxy UI script load failed: ${b.message}`):n.createElement("roxy-almanac-day",{ref:t,className:o,style:c,...T})});export{G as RoxyAlmanacDay};
1
+ import*as n from"react";var I="0.53.3",v="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",C="/dist/cdn",d=null;function O(a){return!a||a==="latest"?_:`${$}${a}${C}`}function P(a=I,i){return typeof document>"u"?Promise.resolve():d||(d=new Promise((o,c)=>{let u=`${i??O(a)}/roxy-ui.js`,r=document.getElementById(v);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=v,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 G=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,errorMessage:x,attribution:k,hideReadings:h,hideSections:S,...T},D){let t=n.useRef(null);n.useImperativeHandle(D,()=>t.current,[]);let[s,M]=n.useState(!1),[b,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&M(!0)}).catch(A=>{e&&H(A instanceof Error?A:new Error(String(A)))}),()=>{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.errorMessage=x)},[x,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.attribution=k)},[k,s]),n.useEffect(()=>{let e=t.current;e&&h!==void 0&&(e.hideReadings=h)},[h,s]),n.useEffect(()=>{let e=t.current;e&&S!==void 0&&(e.hideSections=S)},[S,s]),b?n.createElement("div",{role:"alert",className:o,style:c},`Roxy UI script load failed: ${b.message}`):n.createElement("roxy-almanac-day",{ref:t,className:o,style:c,...T})});export{G 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/** Your own words for a failed self-fetch the API did not explain (a dropped connection, a response with no message). A failure the API explains, such as a spent quota, reads as the API worded it. */\n\terrorMessage?: string;\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, errorMessage, 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 && errorMessage !== undefined) {\n\t\t\t\t(el as unknown as { errorMessage: string }).errorMessage = errorMessage;\n\t\t\t}\n\t\t}, [errorMessage, 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.53.1\";\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, e.g. \"astrology/natal-chart\". Optional: with a publishableKey or submitUrl and no endpoint, the component fetches its default endpoint, or the one its config prop (mode, period, type, spread, detail) selects. Set it to render any other endpoint the component draws. Pass `data` and no key for controlled mode. */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to the method of the endpoint in use, and to POST beside an explicit endpoint. */\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. Every request the component makes, the city search included, is POSTed there as `{ path, method, body, query }` instead of calling RoxyAPI directly, and the component 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 GET, absolute or relative to the page. Optional beside submitUrl, which carries the city search too; set it only to send the city search somewhere else. Unset with no submitUrl, 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/** Your own words for a failed self-fetch the API did not explain (a dropped connection, a response with no message). A failure the API explains, such as a spent quota, reads as the API worded it. */\n\terrorMessage?: string;\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, errorMessage, 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 && errorMessage !== undefined) {\n\t\t\t\t(el as unknown as { errorMessage: string }).errorMessage = errorMessage;\n\t\t\t}\n\t\t}, [errorMessage, 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.53.3\";\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,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,SAAS,cAAc,QAAQ,EAC1CA,EAAS,GAAKZ,EACdY,EAAS,IAAMD,EACfC,EAAS,MAAQ,GACjBA,EAAS,YAAc,YACvB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R,EAAS,QAChBQ,GAAMhB,IAAgB,SACxBgB,EAA0C,YAAchB,EAE3D,EAAG,CAACA,EAAaS,CAAM,CAAC,EAElB,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMf,IAAa,SACrBe,EAAwC,SAAWf,EAEtD,EAAG,CAACA,EAAUQ,CAAM,CAAC,EAEf,YAAU,IAAM,CACrB,IAAMO,EAAKR,EAAS,QAChBQ,GAAMd,IAAiB,SACzBc,EAA2C,aAAed,EAE7D,EAAG,CAACA,EAAcO,CAAM,CAAC,EAEnB,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,UAAAvB,EAAW,MAAAC,CAAM,EAClC,+BAA+BsB,EAAM,OAAO,EAC7C,EAGY,gBAAc,mBAAoB,CAC9C,IAAKH,EACL,UAAApB,EACA,MAAAC,EACA,GAAGiB,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", "errorMessage", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -6,19 +6,19 @@ export interface RoxyAngelNumberCardProps extends ElementAttrs {
6
6
  data?: GetAngelNumberResponse;
7
7
  className?: string;
8
8
  style?: React.CSSProperties;
9
- /** 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`). */
9
+ /** Endpoint path for built-in self-fetch, e.g. "astrology/natal-chart". Optional: with a publishableKey or submitUrl and no endpoint, the component fetches its default endpoint, or the one its config prop (mode, period, type, spread, detail) selects. Set it to render any other endpoint the component draws. Pass `data` and no key for controlled mode. */
10
10
  endpoint?: string;
11
- /** HTTP method for the self-fetch request. Defaults to POST. */
11
+ /** HTTP method for the self-fetch request. Defaults to the method of the endpoint in use, and to POST beside an explicit endpoint. */
12
12
  method?: 'GET' | 'POST';
13
13
  /** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */
14
14
  publishableKey?: string;
15
15
  /** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */
16
16
  baseUrl?: string;
17
- /** 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. */
17
+ /** Your own backend route, which holds the secret key. Every request the component makes, the city search included, is POSTed there as `{ path, method, body, query }` instead of calling RoxyAPI directly, and the component renders the JSON your route returns, so no key of any kind reaches the browser. */
18
18
  submitUrl?: string;
19
19
  /** 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. */
20
20
  submitContext?: Record<string, unknown>;
21
- /** 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. */
21
+ /** Where the self-fetch form city search sends its GET, absolute or relative to the page. Optional beside submitUrl, which carries the city search too; set it only to send the city search somewhere else. Unset with no submitUrl, the search calls the public location endpoint. */
22
22
  locationUrl?: string;
23
23
  /** Override the OpenAPI spec URL the self-fetch form introspects. */
24
24
  specUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"angel-number-card.d.ts","sourceRoot":"","sources":["../../src/components/angel-number-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,GAAG,MAAM,CACnB,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC7D,oEAAoE;IACpE,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,mPAAmP;IACnP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,6GAA6G;IAC7G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iIAAiI;IACjI,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yOAAyO;IACzO,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qbAAqb;IACrb,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,0VAA0V;IAC1V,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+MAA+M;IAC/M,IAAI,CAAC,EAAE,MAAM,CAAC;IAC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AAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+MAA+M;IAC/M,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uJAAuJ;IACvJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mJAAmJ;IACnJ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wMAAwM;IACxM,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+MAA+M;IAC/M,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0PAA0P;IAC1P,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+gBAA+gB;IAC/gB,YAAY,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,eAAO,MAAM,mBAAmB,qGAyJ/B,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as n from"react";var I="0.53.1",v="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",M="/dist/cdn",c=null;function N(o){return!o||o==="latest"?_:`${$}${o}${M}`}function P(o=I,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,r=document.getElementById(v);if(r){r.dataset.loaded==="true"?i():(r.addEventListener("load",()=>i()),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=v,r.src=d,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",i()}),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),c)}var B=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:r,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:w,remember:y,errorMessage:L,attribution:x,hideReadings:b,hideSections:k,...T},A){let t=n.useRef(null);n.useImperativeHandle(A,()=>t.current,[]);let[s,C]=n.useState(!1),[h,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&C(!0)}).catch(S=>{e&&H(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=t.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.method=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.errorMessage=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&&b!==void 0&&(e.hideReadings=b)},[b,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.hideSections=k)},[k,s]),h?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${h.message}`):n.createElement("roxy-angel-number-card",{ref:t,className:i,style:u,...T})});export{B as RoxyAngelNumberCard};
1
+ import*as n from"react";var I="0.53.3",v="roxyapi-ui-loader",_="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",M="/dist/cdn",c=null;function N(o){return!o||o==="latest"?_:`${$}${o}${M}`}function P(o=I,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,r=document.getElementById(v);if(r){r.dataset.loaded==="true"?i():(r.addEventListener("load",()=>i()),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=v,r.src=d,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",i()}),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),c)}var B=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:r,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:w,remember:y,errorMessage:L,attribution:x,hideReadings:b,hideSections:k,...T},A){let t=n.useRef(null);n.useImperativeHandle(A,()=>t.current,[]);let[s,C]=n.useState(!1),[h,H]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&C(!0)}).catch(S=>{e&&H(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=t.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.method=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.submitLabel=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.remember=y)},[y,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.errorMessage=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&&b!==void 0&&(e.hideReadings=b)},[b,s]),n.useEffect(()=>{let e=t.current;e&&k!==void 0&&(e.hideSections=k)},[k,s]),h?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${h.message}`):n.createElement("roxy-angel-number-card",{ref:t,className:i,style:u,...T})});export{B 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/** Your own words for a failed self-fetch the API did not explain (a dropped connection, a response with no message). A failure the API explains, such as a spent quota, reads as the API worded it. */\n\terrorMessage?: string;\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, errorMessage, 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 && errorMessage !== undefined) {\n\t\t\t\t(el as unknown as { errorMessage: string }).errorMessage = errorMessage;\n\t\t\t}\n\t\t}, [errorMessage, 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.53.1\";\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, e.g. \"astrology/natal-chart\". Optional: with a publishableKey or submitUrl and no endpoint, the component fetches its default endpoint, or the one its config prop (mode, period, type, spread, detail) selects. Set it to render any other endpoint the component draws. Pass `data` and no key for controlled mode. */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to the method of the endpoint in use, and to POST beside an explicit endpoint. */\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. Every request the component makes, the city search included, is POSTed there as `{ path, method, body, query }` instead of calling RoxyAPI directly, and the component 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 GET, absolute or relative to the page. Optional beside submitUrl, which carries the city search too; set it only to send the city search somewhere else. Unset with no submitUrl, 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/** Your own words for a failed self-fetch the API did not explain (a dropped connection, a response with no message). A failure the API explains, such as a spent quota, reads as the API worded it. */\n\terrorMessage?: string;\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, errorMessage, 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 && errorMessage !== undefined) {\n\t\t\t\t(el as unknown as { errorMessage: string }).errorMessage = errorMessage;\n\t\t\t}\n\t\t}, [errorMessage, 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.53.3\";\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,EAAk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iB,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,yBAA0B,CACpD,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", "RoxyAngelNumberCard", "data", "className", "style", "endpoint", "method", "publishableKey", "baseUrl", "submitUrl", "submitContext", "locationUrl", "specUrl", "lang", "submitLabel", "remember", "errorMessage", "attribution", "hideReadings", "hideSections", "rest", "ref", "internal", "loaded", "setLoaded", "error", "setError", "active", "ensureScriptLoaded", "err", "el"]
7
7
  }
@@ -6,19 +6,19 @@ export interface RoxyAngelNumberLookupProps extends ElementAttrs {
6
6
  data?: AnalyzeNumberSequenceResponse;
7
7
  className?: string;
8
8
  style?: React.CSSProperties;
9
- /** 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`). */
9
+ /** Endpoint path for built-in self-fetch, e.g. "astrology/natal-chart". Optional: with a publishableKey or submitUrl and no endpoint, the component fetches its default endpoint, or the one its config prop (mode, period, type, spread, detail) selects. Set it to render any other endpoint the component draws. Pass `data` and no key for controlled mode. */
10
10
  endpoint?: string;
11
- /** HTTP method for the self-fetch request. Defaults to POST. */
11
+ /** HTTP method for the self-fetch request. Defaults to the method of the endpoint in use, and to POST beside an explicit endpoint. */
12
12
  method?: 'GET' | 'POST';
13
13
  /** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */
14
14
  publishableKey?: string;
15
15
  /** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */
16
16
  baseUrl?: string;
17
- /** 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. */
17
+ /** Your own backend route, which holds the secret key. Every request the component makes, the city search included, is POSTed there as `{ path, method, body, query }` instead of calling RoxyAPI directly, and the component renders the JSON your route returns, so no key of any kind reaches the browser. */
18
18
  submitUrl?: string;
19
19
  /** 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. */
20
20
  submitContext?: Record<string, unknown>;
21
- /** 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. */
21
+ /** Where the self-fetch form city search sends its GET, absolute or relative to the page. Optional beside submitUrl, which carries the city search too; set it only to send the city search somewhere else. Unset with no submitUrl, the search calls the public location endpoint. */
22
22
  locationUrl?: string;
23
23
  /** Override the OpenAPI spec URL the self-fetch form introspects. */
24
24
  specUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"angel-number-lookup.d.ts","sourceRoot":"","sources":["../../src/components/angel-number-lookup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,GAAG,MAAM,CACnB,CAAC;AAEF,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC/D,oEAAoE;IACpE,IAAI,CAAC,EAAE,6BAA6B,CAAC;IACrC,SAAS,CAAC,EAA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EF,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC/D,oEAAoE;IACpE,IAAI,CAAC,EAAE,6BAA6B,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,mWAAmW;IACnW,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sIAAsI;IACtI,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,6GAA6G;IAC7G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iIAAiI;IACjI,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iTAAiT;IACjT,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qbAAqb;IACrb,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,uRAAuR;IACvR,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+MAA+M;IAC/M,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uJAAuJ;IACvJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mJAAmJ;IACnJ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wMAAwM;IACxM,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+MAA+M;IAC/M,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0PAA0P;IAC1P,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+gBAA+gB;IAC/gB,YAAY,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,eAAO,MAAM,qBAAqB,uGAyJjC,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as n from"react";var _="0.53.1",v="roxyapi-ui-loader",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",C="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",M="/dist/cdn",c=null;function N(o){return!o||o==="latest"?$:`${C}${o}${M}`}function P(o=_,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,r=document.getElementById(v);if(r){r.dataset.loaded==="true"?i():(r.addEventListener("load",()=>i()),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=v,r.src=d,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",i()}),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),c)}var B=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:r,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:L,remember:w,errorMessage:y,attribution:x,hideReadings:k,hideSections:b,...T},A){let t=n.useRef(null);n.useImperativeHandle(A,()=>t.current,[]);let[s,H]=n.useState(!1),[h,I]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&H(!0)}).catch(S=>{e&&I(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=t.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.method=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.submitLabel=L)},[L,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.remember=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.errorMessage=y)},[y,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&&b!==void 0&&(e.hideSections=b)},[b,s]),h?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${h.message}`):n.createElement("roxy-angel-number-lookup",{ref:t,className:i,style:u,...T})});export{B as RoxyAngelNumberLookup};
1
+ import*as n from"react";var _="0.53.3",v="roxyapi-ui-loader",$="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",C="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",M="/dist/cdn",c=null;function N(o){return!o||o==="latest"?$:`${C}${o}${M}`}function P(o=_,a){return typeof document>"u"?Promise.resolve():c||(c=new Promise((i,u)=>{let d=`${a??N(o)}/roxy-ui.js`,r=document.getElementById(v);if(r){r.dataset.loaded==="true"?i():(r.addEventListener("load",()=>i()),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=v,r.src=d,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",i()}),r.addEventListener("error",()=>u(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),c)}var B=n.forwardRef(function({data:a,className:i,style:u,endpoint:d,method:r,publishableKey:l,baseUrl:f,submitUrl:m,submitContext:E,locationUrl:g,specUrl:p,lang:R,submitLabel:L,remember:w,errorMessage:y,attribution:x,hideReadings:k,hideSections:b,...T},A){let t=n.useRef(null);n.useImperativeHandle(A,()=>t.current,[]);let[s,H]=n.useState(!1),[h,I]=n.useState(null);return n.useEffect(()=>{let e=!0;return P().then(()=>{e&&H(!0)}).catch(S=>{e&&I(S instanceof Error?S:new Error(String(S)))}),()=>{e=!1}},[]),n.useEffect(()=>{let e=t.current;e&&a!==void 0&&(e.data=a)},[a,s]),n.useEffect(()=>{let e=t.current;e&&d!==void 0&&(e.endpoint=d)},[d,s]),n.useEffect(()=>{let e=t.current;e&&r!==void 0&&(e.method=r)},[r,s]),n.useEffect(()=>{let e=t.current;e&&l!==void 0&&(e.publishableKey=l)},[l,s]),n.useEffect(()=>{let e=t.current;e&&f!==void 0&&(e.baseUrl=f)},[f,s]),n.useEffect(()=>{let e=t.current;e&&m!==void 0&&(e.submitUrl=m)},[m,s]),n.useEffect(()=>{let e=t.current;e&&E!==void 0&&(e.submitContext=E)},[E,s]),n.useEffect(()=>{let e=t.current;e&&g!==void 0&&(e.locationUrl=g)},[g,s]),n.useEffect(()=>{let e=t.current;e&&p!==void 0&&(e.specUrl=p)},[p,s]),n.useEffect(()=>{let e=t.current;e&&R!==void 0&&(e.lang=R)},[R,s]),n.useEffect(()=>{let e=t.current;e&&L!==void 0&&(e.submitLabel=L)},[L,s]),n.useEffect(()=>{let e=t.current;e&&w!==void 0&&(e.remember=w)},[w,s]),n.useEffect(()=>{let e=t.current;e&&y!==void 0&&(e.errorMessage=y)},[y,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&&b!==void 0&&(e.hideSections=b)},[b,s]),h?n.createElement("div",{role:"alert",className:i,style:u},`Roxy UI script load failed: ${h.message}`):n.createElement("roxy-angel-number-lookup",{ref:t,className:i,style:u,...T})});export{B as RoxyAngelNumberLookup};
2
2
  //# sourceMappingURL=angel-number-lookup.js.map