@roxyapi/ui-react 0.1.3 → 0.2.1

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 (63) hide show
  1. package/README.md +9 -3
  2. package/dist/components/ashtakavarga-grid.d.ts +12 -0
  3. package/dist/components/ashtakavarga-grid.d.ts.map +1 -0
  4. package/dist/components/ashtakavarga-grid.js +91 -0
  5. package/dist/components/ashtakavarga-grid.js.map +7 -0
  6. package/dist/components/biorhythm-chart.js.map +1 -1
  7. package/dist/components/choghadiya-grid.d.ts +12 -0
  8. package/dist/components/choghadiya-grid.d.ts.map +1 -0
  9. package/dist/components/choghadiya-grid.js +91 -0
  10. package/dist/components/choghadiya-grid.js.map +7 -0
  11. package/dist/components/compatibility-card.js.map +1 -1
  12. package/dist/components/dasha-timeline.js.map +1 -1
  13. package/dist/components/data.d.ts +1 -3
  14. package/dist/components/data.d.ts.map +1 -1
  15. package/dist/components/data.js +1 -7
  16. package/dist/components/data.js.map +2 -2
  17. package/dist/components/divisional-chart.d.ts +12 -0
  18. package/dist/components/divisional-chart.d.ts.map +1 -0
  19. package/dist/components/divisional-chart.js +91 -0
  20. package/dist/components/divisional-chart.js.map +7 -0
  21. package/dist/components/dosha-card.js.map +1 -1
  22. package/dist/components/endpoint-form.d.ts +1 -3
  23. package/dist/components/endpoint-form.d.ts.map +1 -1
  24. package/dist/components/endpoint-form.js +1 -7
  25. package/dist/components/endpoint-form.js.map +2 -2
  26. package/dist/components/guna-milan.js.map +1 -1
  27. package/dist/components/hexagram.js.map +1 -1
  28. package/dist/components/horoscope-card.js.map +1 -1
  29. package/dist/components/kp-planets-table.js.map +1 -1
  30. package/dist/components/location-search.d.ts +1 -3
  31. package/dist/components/location-search.d.ts.map +1 -1
  32. package/dist/components/location-search.js +1 -7
  33. package/dist/components/location-search.js.map +2 -2
  34. package/dist/components/moon-phase.js.map +1 -1
  35. package/dist/components/natal-chart.js.map +1 -1
  36. package/dist/components/numerology-card.js.map +1 -1
  37. package/dist/components/panchang-table.js.map +1 -1
  38. package/dist/components/shadbala-table.d.ts +12 -0
  39. package/dist/components/shadbala-table.d.ts.map +1 -0
  40. package/dist/components/shadbala-table.js +91 -0
  41. package/dist/components/shadbala-table.js.map +7 -0
  42. package/dist/components/synastry-chart.js.map +1 -1
  43. package/dist/components/tarot-card.js.map +1 -1
  44. package/dist/components/tarot-spread.js.map +1 -1
  45. package/dist/components/transits-table.d.ts +12 -0
  46. package/dist/components/transits-table.d.ts.map +1 -0
  47. package/dist/components/transits-table.js +91 -0
  48. package/dist/components/transits-table.js.map +7 -0
  49. package/dist/components/vedic-kundli.js.map +1 -1
  50. package/dist/components/yoga-list.d.ts +14 -0
  51. package/dist/components/yoga-list.d.ts.map +1 -0
  52. package/dist/components/yoga-list.js +91 -0
  53. package/dist/components/yoga-list.js.map +7 -0
  54. package/dist/index.cjs +327 -63
  55. package/dist/index.cjs.map +4 -4
  56. package/dist/index.d.ts +6 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +327 -63
  59. package/dist/index.js.map +4 -4
  60. package/dist/load-ui.d.ts +1 -1
  61. package/dist/load-ui.js +1 -1
  62. package/dist/load-ui.js.map +1 -1
  63. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/dosha-card.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { KalsarpaResponse, ManglikResponse, SadhesatiResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyDoshaCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ManglikResponse | KalsarpaResponse | SadhesatiResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyDoshaCard = React.forwardRef<HTMLElement | null, RoxyDoshaCardProps>(\n\tfunction RoxyDoshaCard({ data, className, style, ...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\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-dosha-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { KalsarpaResponse, ManglikResponse, SadhesatiResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyDoshaCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ManglikResponse | KalsarpaResponse | SadhesatiResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyDoshaCard = React.forwardRef<HTMLElement | null, RoxyDoshaCardProps>(\n\tfunction RoxyDoshaCard({ data, className, style, ...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\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-dosha-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load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tD,IAAM;AAAA,MACL;AAAA,MACA,MAAM,SAAS;AAAA,MACf,CAAC;AAAA,IACF;AACA,UAAM,CAACC,SAAQ,SAAS,IAAU,eAAS,KAAK;AAChD,UAAM,CAAC,OAAO,QAAQ,IAAU,eAAuB,IAAI;AAE3D,IAAM,gBAAU,MAAM;AACrB,UAAI,SAAS;AACb,yBAAmB,EACjB,KAAK,MAAM;AACX,YAAI,OAAQ,WAAU,IAAI;AAAA,MAC3B,CAAC,EACA,MAAM,CAAC,QAAiB;AACxB,YAAI,CAAC,OAAQ;AACb,iBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC7D,CAAC;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,mBAAmB;AAAA,MAC7C,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyDoshaCard", "loaded"]
7
7
  }
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
- type ElementAttrs = Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'data'>;
2
+ type ElementAttrs = Omit<React.HTMLAttributes<HTMLElement>, 'children'>;
3
3
  export interface RoxyEndpointFormProps extends ElementAttrs {
4
- /** Spec-derived response payload. Pass the raw RoxyAPI response. */
5
- data?: unknown;
6
4
  className?: string;
7
5
  style?: React.CSSProperties;
8
6
  /** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-submit`. */
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint-form.d.ts","sourceRoot":"","sources":["../../src/components/endpoint-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,GAAG,MAAM,CACnB,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IAC1D,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IACnG,yFAAyF;IACzF,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC5E,mFAAmF;IACnF,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CACjF;AAED,eAAO,MAAM,gBAAgB,kGA2E5B,CAAC"}
1
+ {"version":3,"file":"endpoint-form.d.ts","sourceRoot":"","sources":["../../src/components/endpoint-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,CACV,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IACnG,yFAAyF;IACzF,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC5E,mFAAmF;IACnF,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CACjF;AAED,eAAO,MAAM,gBAAgB,kGAoE5B,CAAC"}
@@ -43,7 +43,7 @@ function ensureScriptLoaded(version = "latest") {
43
43
 
44
44
  // packages/ui-react/src/components/endpoint-form.tsx
45
45
  var RoxyEndpointForm = React.forwardRef(
46
- function RoxyEndpointForm2({ data, className, style, onRoxySubmit, onRoxyValidationError, onRoxySpecError, ...rest }, ref) {
46
+ function RoxyEndpointForm2({ className, style, onRoxySubmit, onRoxyValidationError, onRoxySpecError, ...rest }, ref) {
47
47
  const internal = React.useRef(null);
48
48
  React.useImperativeHandle(
49
49
  ref,
@@ -64,12 +64,6 @@ var RoxyEndpointForm = React.forwardRef(
64
64
  active = false;
65
65
  };
66
66
  }, []);
67
- React.useEffect(() => {
68
- const el = internal.current;
69
- if (el && data !== void 0) {
70
- el.data = data;
71
- }
72
- }, [data, loaded2]);
73
67
  React.useEffect(() => {
74
68
  const el = internal.current;
75
69
  const handler = onRoxySubmit;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/endpoint-form.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyEndpointFormProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: unknown;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-submit`. */\n\tonRoxySubmit?: (event: CustomEvent<{ endpoint: string; values: Record<string, unknown> }>) => void;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-validation-error`. */\n\tonRoxyValidationError?: (event: CustomEvent<{ missing: string[] }>) => void;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-spec-error`. */\n\tonRoxySpecError?: (event: CustomEvent<{ url: string; message: string }>) => void;\n}\n\nexport const RoxyEndpointForm = React.forwardRef<HTMLElement | null, RoxyEndpointFormProps>(\n\tfunction RoxyEndpointForm({ data, className, style, onRoxySubmit, onRoxyValidationError, onRoxySpecError, ...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\tconst handler = onRoxySubmit;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ endpoint: string; values: Record<string, unknown> }>);\n\t\t\tel.addEventListener('roxy-submit', listener);\n\t\t\treturn () => el.removeEventListener('roxy-submit', listener);\n\t\t}, [onRoxySubmit, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxyValidationError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ missing: string[] }>);\n\t\t\tel.addEventListener('roxy-validation-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-validation-error', listener);\n\t\t}, [onRoxyValidationError, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxySpecError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ url: string; message: string }>);\n\t\t\tel.addEventListener('roxy-spec-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-spec-error', listener);\n\t\t}, [onRoxySpecError, 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-endpoint-form', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics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OAAM,CAAC;AAElC,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,YAAM,UAAU;AAChB,UAAI,CAAC,MAAM,CAAC,QAAS;AACrB,YAAM,WAAW,CAAC,UAAiB,QAAQ,KAAsD;AACjG,SAAG,iBAAiB,mBAAmB,QAAQ;AAC/C,aAAO,MAAM,GAAG,oBAAoB,mBAAmB,QAAQ;AAAA,IAChE,GAAG,CAAC,iBAAiBA,OAAM,CAAC;AAE5B,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,sBAAsB;AAAA,MAChD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children'\n>;\n\nexport interface RoxyEndpointFormProps extends ElementAttrs {\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-submit`. */\n\tonRoxySubmit?: (event: CustomEvent<{ endpoint: string; values: Record<string, unknown> }>) => void;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-validation-error`. */\n\tonRoxyValidationError?: (event: CustomEvent<{ missing: string[] }>) => void;\n\t/** Fires when the underlying <roxy-endpoint-form> dispatches `roxy-spec-error`. */\n\tonRoxySpecError?: (event: CustomEvent<{ url: string; message: string }>) => void;\n}\n\nexport const RoxyEndpointForm = React.forwardRef<HTMLElement | null, RoxyEndpointFormProps>(\n\tfunction RoxyEndpointForm({ className, style, onRoxySubmit, onRoxyValidationError, onRoxySpecError, ...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\tconst handler = onRoxySubmit;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ endpoint: string; values: Record<string, unknown> }>);\n\t\t\tel.addEventListener('roxy-submit', listener);\n\t\t\treturn () => el.removeEventListener('roxy-submit', listener);\n\t\t}, [onRoxySubmit, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxyValidationError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ missing: string[] }>);\n\t\t\tel.addEventListener('roxy-validation-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-validation-error', listener);\n\t\t}, [onRoxyValidationError, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxySpecError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ url: string; message: string }>);\n\t\t\tel.addEventListener('roxy-spec-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-spec-error', listener);\n\t\t}, [onRoxySpecError, 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-endpoint-form', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AAAA,MAClF;AACA;AAAA,IACD;AACA,eAAW,SAAS,cAAc,QAAQ;AAC1C,aAAS,KAAK;AACd,aAAS,MAAM;AACf,aAAS,QAAQ;AACjB,aAAS,cAAc;AACvB,aAAS,iBAAiB,QAAQ,MAAM;AACvC,eAAU,QAAQ,SAAS;AAC3B,cAAQ;AA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AAG,iBAAiB,yBAAyB,QAAQ;AACrD,aAAO,MAAM,GAAG,oBAAoB,yBAAyB,QAAQ;AAAA,IACtE,GAAG,CAAC,uBAAuBA,OAAM,CAAC;AAElC,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,YAAM,UAAU;AAChB,UAAI,CAAC,MAAM,CAAC,QAAS;AACrB,YAAM,WAAW,CAAC,UAAiB,QAAQ,KAAsD;AACjG,SAAG,iBAAiB,mBAAmB,QAAQ;AAC/C,aAAO,MAAM,GAAG,oBAAoB,mBAAmB,QAAQ;AAAA,IAChE,GAAG,CAAC,iBAAiBA,OAAM,CAAC;AAE5B,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,sBAAsB;AAAA,MAChD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyEndpointForm", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/guna-milan.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CompatibilityResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyGunaMilanProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CompatibilityResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyGunaMilan = React.forwardRef<HTMLElement | null, RoxyGunaMilanProps>(\n\tfunction RoxyGunaMilan({ data, className, style, ...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\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-guna-milan', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CompatibilityResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyGunaMilanProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CompatibilityResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyGunaMilan = React.forwardRef<HTMLElement | null, RoxyGunaMilanProps>(\n\tfunction RoxyGunaMilan({ data, className, style, ...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\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-guna-milan', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM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IAAU,eAAuB,IAAI;AAE3D,IAAM,gBAAU,MAAM;AACrB,UAAI,SAAS;AACb,yBAAmB,EACjB,KAAK,MAAM;AACX,YAAI,OAAQ,WAAU,IAAI;AAAA,MAC3B,CAAC,EACA,MAAM,CAAC,QAAiB;AACxB,YAAI,CAAC,OAAQ;AACb,iBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC7D,CAAC;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,mBAAmB;AAAA,MAC7C,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyGunaMilan", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/hexagram.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CastReadingResponse, GetDailyHexagramResponse, GetHexagramResponse, GetRandomHexagramResponse, LookupHexagramResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyHexagramProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetHexagramResponse | GetRandomHexagramResponse | LookupHexagramResponse | GetDailyHexagramResponse | CastReadingResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyHexagram = React.forwardRef<HTMLElement | null, RoxyHexagramProps>(\n\tfunction RoxyHexagram({ data, className, style, ...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\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-hexagram', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CastReadingResponse, GetDailyHexagramResponse, GetHexagramResponse, GetRandomHexagramResponse, LookupHexagramResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyHexagramProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetHexagramResponse | GetRandomHexagramResponse | LookupHexagramResponse | GetDailyHexagramResponse | CastReadingResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyHexagram = React.forwardRef<HTMLElement | null, RoxyHexagramProps>(\n\tfunction RoxyHexagram({ data, className, style, ...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\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-hexagram', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AAAA,MAClF;AACA;AAAA,IACD;AACA,eAAW,SAAS,cAAc,QAAQ;AAC1C,aAAS,KAAK;AACd,aAAS,MAAM;AACf,aAAS,QAAQ;AACjB,aAAS,cAAc;AACvB,aAAS,iBAAiB,QAAQ,MAAM;AACvC,eAAU,QAAQ,SAAS;AAC3B,cAAQ;AAAA,IACT,CAAC;AACD,aAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AACjF,aAAS,KAAK,YAAY,QAAQ;AAAA,EACnC,CAAC;AACD,SAAO;AACR;;;ADjCO,IAAM,eAAqB;AAAA,EACjC,SAASA,cAAa,EAAE,MAAM,WAAW,OAAO,GAAG,KAAK,GAAG,KAAK;AAC/D,UAAM,WAAiB,aAA2B,IAAI;AACtD,IAAM;AAAA,MACL;AAAA,MACA,MAAM,SAAS;AAAA,MACf,CAAC;AAAA,IACF;AACA,UAAM,CAACC,SAAQ,SAAS,IAAU,eAAS,KAAK;AAChD,UAAM,CAAC,OAAO,QAAQ,IAAU,eAAuB,IAAI;AAE3D,IAAM,gBAAU,MAAM;AACrB,UAAI,SAAS;AACb,yBAAmB,EACjB,KAAK,MAAM;AACX,YAAI,OAAQ,WAAU,IAAI;AAAA,MAC3B,CAAC,EACA,MAAM,CAAC,QAAiB;AACxB,YAAI,CAAC,OAAQ;AACb,iBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC7D,CAAC;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,iBAAiB;AAAA,MAC3C,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyHexagram", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/horoscope-card.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetDailyHoroscopeResponse, GetMonthlyHoroscopeResponse, GetWeeklyHoroscopeResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyHoroscopeCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyHoroscopeResponse | GetWeeklyHoroscopeResponse | GetMonthlyHoroscopeResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyHoroscopeCard = React.forwardRef<HTMLElement | null, RoxyHoroscopeCardProps>(\n\tfunction RoxyHoroscopeCard({ data, className, style, ...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\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-horoscope-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetDailyHoroscopeResponse, GetMonthlyHoroscopeResponse, GetWeeklyHoroscopeResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyHoroscopeCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyHoroscopeResponse | GetWeeklyHoroscopeResponse | GetMonthlyHoroscopeResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyHoroscopeCard = React.forwardRef<HTMLElement | null, RoxyHoroscopeCardProps>(\n\tfunction RoxyHoroscopeCard({ data, className, style, ...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\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-horoscope-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AAAA,MAClF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C,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,uBAAuB;AAAA,MACjD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyHoroscopeCard", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/kp-planets-table.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { KpPlanetsResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyKpPlanetsTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: KpPlanetsResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyKpPlanetsTable = React.forwardRef<HTMLElement | null, RoxyKpPlanetsTableProps>(\n\tfunction RoxyKpPlanetsTable({ data, className, style, ...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\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-kp-planets-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { KpPlanetsResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyKpPlanetsTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: KpPlanetsResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyKpPlanetsTable = React.forwardRef<HTMLElement | null, RoxyKpPlanetsTableProps>(\n\tfunction RoxyKpPlanetsTable({ data, className, style, ...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\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-kp-planets-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,g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OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,yBAAyB;AAAA,MACnD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyKpPlanetsTable", "loaded"]
7
7
  }
@@ -1,9 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { SearchCitiesResponse } from '@roxyapi/ui/types';
3
- type ElementAttrs = Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'data'>;
3
+ type ElementAttrs = Omit<React.HTMLAttributes<HTMLElement>, 'children'>;
4
4
  export interface RoxyLocationSearchProps extends ElementAttrs {
5
- /** Spec-derived response payload. Pass the raw RoxyAPI response. */
6
- data?: unknown;
7
5
  className?: string;
8
6
  style?: React.CSSProperties;
9
7
  /** Fires when the underlying <roxy-location-search> dispatches `roxy-location-select`. */
@@ -1 +1 @@
1
- {"version":3,"file":"location-search.d.ts","sourceRoot":"","sources":["../../src/components/location-search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,GAAG,MAAM,CACnB,CAAC;AAEF,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC5D,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,0FAA0F;IAC1F,oBAAoB,C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AAQ,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAChP,2FAA2F;IAC3F,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CAC1F;AAED,eAAO,MAAM,kBAAkB,oGA2D9B,CAAC"}
@@ -43,7 +43,7 @@ function ensureScriptLoaded(version = "latest") {
43
43
 
44
44
  // packages/ui-react/src/components/location-search.tsx
45
45
  var RoxyLocationSearch = React.forwardRef(
46
- function RoxyLocationSearch2({ data, className, style, onRoxyLocationSelect, onRoxyValidationError, ...rest }, ref) {
46
+ function RoxyLocationSearch2({ className, style, onRoxyLocationSelect, onRoxyValidationError, ...rest }, ref) {
47
47
  const internal = React.useRef(null);
48
48
  React.useImperativeHandle(
49
49
  ref,
@@ -64,12 +64,6 @@ var RoxyLocationSearch = React.forwardRef(
64
64
  active = false;
65
65
  };
66
66
  }, []);
67
- React.useEffect(() => {
68
- const el = internal.current;
69
- if (el && data !== void 0) {
70
- el.data = data;
71
- }
72
- }, [data, loaded2]);
73
67
  React.useEffect(() => {
74
68
  const el = internal.current;
75
69
  const handler = onRoxyLocationSelect;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/location-search.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { SearchCitiesResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyLocationSearchProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: unknown;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Fires when the underlying <roxy-location-search> dispatches `roxy-location-select`. */\n\tonRoxyLocationSelect?: (event: CustomEvent<NonNullable<SearchCitiesResponse['cities']>[number] | { latitude?: number; longitude?: number; timezone?: string; utcOffset?: number; city?: string; province?: string; country?: string }>) => void;\n\t/** Fires when the underlying <roxy-location-search> dispatches `roxy-validation-error`. */\n\tonRoxyValidationError?: (event: CustomEvent<{ reason: string; message: string }>) => void;\n}\n\nexport const RoxyLocationSearch = React.forwardRef<HTMLElement | null, RoxyLocationSearchProps>(\n\tfunction RoxyLocationSearch({ data, className, style, onRoxyLocationSelect, onRoxyValidationError, ...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\tconst handler = onRoxyLocationSelect;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<NonNullable<SearchCitiesResponse['cities']>[number] | { latitude?: number; longitude?: number; timezone?: string; utcOffset?: number; city?: string; province?: string; country?: string }>);\n\t\t\tel.addEventListener('roxy-location-select', listener);\n\t\t\treturn () => el.removeEventListener('roxy-location-select', listener);\n\t\t}, [onRoxyLocationSelect, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxyValidationError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ reason: string; message: string }>);\n\t\t\tel.addEventListener('roxy-validation-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-validation-error', listener);\n\t\t}, [onRoxyValidationError, 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-location-search', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
5
- "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,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;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,YAAM,UAAU;AAChB,UAAI,CAAC,MAAM,CAAC,QAAS;AACrB,YAAM,WAAW,CAAC,UAAiB,QAAQ,KAAgN;AAC3P,SAAG,iBAAiB,wBAAwB,QAAQ;AACpD,aAAO,MAAM,GAAG,oBAAoB,wBAAwB,QAAQ;AAAA,IACrE,GAAG,CAAC,sBAAsBA,OAAM,CAAC;AAEjC,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,YAAM,UAAU;AAChB,UAAI,CAAC,MAAM,CAAC,QAAS;AACrB,YAAM,WAAW,CAAC,UAAiB,QAAQ,KAAyD;AACpG,SAAG,iBAAiB,yBAAyB,QAAQ;AACrD,aAAO,MAAM,GAAG,oBAAoB,yBAAyB,QAAQ;AAAA,IACtE,GAAG,CAAC,uBAAuBA,OAAM,CAAC;AAElC,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,wBAAwB;AAAA,MAClD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { SearchCitiesResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children'\n>;\n\nexport interface RoxyLocationSearchProps extends ElementAttrs {\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\t/** Fires when the underlying <roxy-location-search> dispatches `roxy-location-select`. */\n\tonRoxyLocationSelect?: (event: CustomEvent<NonNullable<SearchCitiesResponse['cities']>[number] | { latitude?: number; longitude?: number; timezone?: string; utcOffset?: number; city?: string; province?: string; country?: string }>) => void;\n\t/** Fires when the underlying <roxy-location-search> dispatches `roxy-validation-error`. */\n\tonRoxyValidationError?: (event: CustomEvent<{ reason: string; message: string }>) => void;\n}\n\nexport const RoxyLocationSearch = React.forwardRef<HTMLElement | null, RoxyLocationSearchProps>(\n\tfunction RoxyLocationSearch({ className, style, onRoxyLocationSelect, onRoxyValidationError, ...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\tconst handler = onRoxyLocationSelect;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<NonNullable<SearchCitiesResponse['cities']>[number] | { latitude?: number; longitude?: number; timezone?: string; utcOffset?: number; city?: string; province?: string; country?: string }>);\n\t\t\tel.addEventListener('roxy-location-select', listener);\n\t\t\treturn () => el.removeEventListener('roxy-location-select', listener);\n\t\t}, [onRoxyLocationSelect, loaded]);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst el = internal.current;\n\t\t\tconst handler = onRoxyValidationError;\n\t\t\tif (!el || !handler) return;\n\t\t\tconst listener = (event: Event) => handler(event as CustomEvent<{ reason: string; message: string }>);\n\t\t\tel.addEventListener('roxy-validation-error', listener);\n\t\t\treturn () => el.removeEventListener('roxy-validation-error', listener);\n\t\t}, [onRoxyValidationError, 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-location-search', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAA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CAAC,UAAiB,QAAQ,KAAgN;AAC3P,SAAG,iBAAiB,wBAAwB,QAAQ;AACpD,aAAO,MAAM,GAAG,oBAAoB,wBAAwB,QAAQ;AAAA,IACrE,GAAG,CAAC,sBAAsBA,OAAM,CAAC;AAEjC,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,YAAM,UAAU;AAChB,UAAI,CAAC,MAAM,CAAC,QAAS;AACrB,YAAM,WAAW,CAAC,UAAiB,QAAQ,KAAyD;AACpG,SAAG,iBAAiB,yBAAyB,QAAQ;AACrD,aAAO,MAAM,GAAG,oBAAoB,yBAAyB,QAAQ;AAAA,IACtE,GAAG,CAAC,uBAAuBA,OAAM,CAAC;AAElC,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,wBAAwB;AAAA,MAClD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyLocationSearch", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/moon-phase.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCurrentMoonPhaseResponse, GetMoonCalendarResponse, GetUpcomingMoonPhasesResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyMoonPhaseProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetCurrentMoonPhaseResponse | GetUpcomingMoonPhasesResponse | GetMoonCalendarResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyMoonPhase = React.forwardRef<HTMLElement | null, RoxyMoonPhaseProps>(\n\tfunction RoxyMoonPhase({ data, className, style, ...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\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-moon-phase', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCurrentMoonPhaseResponse, GetMoonCalendarResponse, GetUpcomingMoonPhasesResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyMoonPhaseProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetCurrentMoonPhaseResponse | GetUpcomingMoonPhasesResponse | GetMoonCalendarResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyMoonPhase = React.forwardRef<HTMLElement | null, RoxyMoonPhaseProps>(\n\tfunction RoxyMoonPhase({ data, className, style, ...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\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-moon-phase', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AAAA,MAClF;AACA;AAAA,IACD;AACA,eAAW,SAAS,cAAc,QAAQ;AAC1C,aAAS,KAAK;AACd,aAAS,MAAM;AACf,aAAS,QAAQ;AACjB,aAAS,cAAc;AACvB,aAAS,iBAAiB,QAAQ,MAAM;AACvC,eAAU,QAAQ,SAAS;AAC3B,cAAQ;AAAA,IACT,CAAC;AACD,aAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AACjF,aAAS,KAAK,YAAY,QAAQ;AAAA,EACnC,CAAC;AACD,SAAO;AACR;;;ADjCO,IAAM,gBAAsB;AAAA,EAClC,SAASA,eAAc,EAAE,MAAM,WAAW,OAAO,GAAG,KAAK,GAAG,KAAK;AAChE,UAAM,WAAiB,aAA2B,IAAI;AACtD,IAAM;AAAA,MACL;AAAA,MACA,MAAM,SAAS;AAAA,MACf,CAAC;AAAA,IACF;AACA,UAAM,CAACC,SAAQ,SAAS,IAAU,eAAS,KAAK;AAChD,UAAM,CAAC,OAAO,QAAQ,IAAU,eAAuB,IAAI;AAE3D,IAAM,gBAAU,MAAM;AACrB,UAAI,SAAS;AACb,yBAAmB,EACjB,KAAK,MAAM;AACX,YAAI,OAAQ,WAAU,IAAI;AAAA,MAC3B,CAAC,EACA,MAAM,CAAC,QAAiB;AACxB,YAAI,CAAC,OAAQ;AACb,iBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC7D,CAAC;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,mBAAmB;AAAA,MAC7C,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyMoonPhase", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/natal-chart.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { NatalChartResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyNatalChartProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: NatalChartResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyNatalChart = React.forwardRef<HTMLElement | null, RoxyNatalChartProps>(\n\tfunction RoxyNatalChart({ data, className, style, ...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\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-natal-chart', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { NatalChartResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyNatalChartProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: NatalChartResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyNatalChart = React.forwardRef<HTMLElement | null, RoxyNatalChartProps>(\n\tfunction RoxyNatalChart({ data, className, style, ...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\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-natal-chart', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AAAA,MAClF;AACA;AAAA,IACD;AACA,eAAW,SAAS,cAAc,QAAQ;AAC1C,aAAS,KAAK;AACd,aAAS,MAAM;AACf,aAAS,QAAQ;AACjB,aAAS,cAAc;AACvB,aAAS,iBAAiB,QAAQ,MAAM;AACvC,eAAU,QAAQ,SAAS;AAC3B,cAAQ;AAAA,IACT,CAAC;AACD,aAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC;AACjF,aAAS,KAAK,YAAY,QAAQ;AAAA,EACnC,CAAC;AACD,SAAO;AACR;;;ADjCO,IAAM,iBAAuB;AAAA,EACnC,SAASA,gBAAe,EAAE,MAAM,WAAW,OAAO,GAAG,KAAK,GAAG,KAAK;AACjE,UAAM,WAAiB,aAA2B,IAAI;AACtD,IAAM;AAAA,MACL;AAAA,MACA,MAAM,SAAS;AAAA,MACf,CAAC;AAAA,IACF;AACA,UAAM,CAACC,SAAQ,SAAS,IAAU,eAAS,KAAK;AAChD,UAAM,CAAC,OAAO,QAAQ,IAAU,eAAuB,IAAI;AAE3D,IAAM,gBAAU,MAAM;AACrB,UAAI,SAAS;AACb,yBAAmB,EACjB,KAAK,MAAM;AACX,YAAI,OAAQ,WAAU,IAAI;AAAA,MAC3B,CAAC,EACA,MAAM,CAAC,QAAiB;AACxB,YAAI,CAAC,OAAQ;AACb,iBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC7D,CAAC;AACF,aAAO,MAAM;AACZ,iBAAS;AAAA,MACV;AAAA,IACD,GAAG,CAAC,CAAC;AAEL,IAAM,gBAAU,MAAM;AACrB,YAAM,KAAK,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,oBAAoB;AAAA,MAC9C,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyNatalChart", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/numerology-card.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateExpressionResponse, CalculateLifePathResponse, CalculatePersonalYearResponse, GenerateNumerologyChartResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyNumerologyCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateLifePathResponse | CalculateExpressionResponse | CalculatePersonalYearResponse | GenerateNumerologyChartResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyNumerologyCard = React.forwardRef<HTMLElement | null, RoxyNumerologyCardProps>(\n\tfunction RoxyNumerologyCard({ data, className, style, ...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\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-numerology-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateExpressionResponse, CalculateLifePathResponse, CalculatePersonalYearResponse, GenerateNumerologyChartResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyNumerologyCardProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateLifePathResponse | CalculateExpressionResponse | CalculatePersonalYearResponse | GenerateNumerologyChartResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyNumerologyCard = React.forwardRef<HTMLElement | null, RoxyNumerologyCardProps>(\n\tfunction RoxyNumerologyCard({ data, className, style, ...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\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-numerology-card', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD,QAAI,UAAU;AACb,UAAI,SAAS,QAAQ,WAAW,QAAQ;AACvC,gBAAQ;AAAA,MACT,OAAO;AACN,iBAAS,iBAAiB,QAAQ,MAAM,QAAQ,CAAC;AACjD,iBAAS,iBAAiB,SAAS,MAAM,OAAO,IAAI,MAAM,qBAAqB,CAAC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W,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,wBAAwB;AAAA,MAClD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyNumerologyCard", "loaded"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/panchang-table.tsx", "../../src/load-ui.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetBasicPanchangResponse, GetDetailedPanchangResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyPanchangTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetBasicPanchangResponse | GetDetailedPanchangResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyPanchangTable = React.forwardRef<HTMLElement | null, RoxyPanchangTableProps>(\n\tfunction RoxyPanchangTable({ data, className, style, ...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\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-panchang-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') tracks the marketing\n * snippets and resolves to whatever jsDelivr has cached for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.1.3\";\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetBasicPanchangResponse, GetDetailedPanchangResponse } from '@roxyapi/ui/types';\n\ntype ElementAttrs = Omit<\n\tReact.HTMLAttributes<HTMLElement>,\n\t'children' | 'data'\n>;\n\nexport interface RoxyPanchangTableProps extends ElementAttrs {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetBasicPanchangResponse | GetDetailedPanchangResponse;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n\n}\n\nexport const RoxyPanchangTable = React.forwardRef<HTMLElement | null, RoxyPanchangTableProps>(\n\tfunction RoxyPanchangTable({ data, className, style, ...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\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-panchang-table', {\n\t\t\tref: internal,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\t...rest,\n\t\t});\n\t},\n);\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * React server components and Next.js SSR work without a flash.\n *\n * Pass an explicit `version` (e.g. `'0.1.5'`) to pin the loaded bundle to a\n * specific @roxyapi/ui release; the default ('latest') resolves to whatever\n * the CDN currently serves for @latest.\n */\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(version: string = 'latest'): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-react\n// was generated against. Useful for diagnostics; not load-bearing.\nexport const ROXY_UI_VERSION = \"0.2.1\";\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;;;ACSvB,IAAM,YAAY;AAClB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AAExB,IAAI,SAA+B;AAEnC,SAAS,UAAU,SAAyB;AAC3C,MAAI,CAAC,WAAW,YAAY,SAAU,QAAO;AAC7C,SAAO,GAAG,eAAe,GAAG,OAAO,GAAG,eAAe;AACtD;AAEO,SAAS,mBAAmB,UAAkB,UAAyB;AAC7E,MAAI,OAAO,aAAa,YAAa,QAAO,QAAQ,QAAQ;AAC5D,MAAI,OAAQ,QAAO;AAEnB,WAAS,IAAI,QAAc,CAAC,SAAS,WAAW;AAC/C,UAAM,MAAM,GAAG,UAAU,OAAO,CAAC;AACjC,QAAI,WAAW,SAAS,eAAe,SAAS;AAChD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,SAAS;AACpB,UAAI,MAAM,SAAS,QAAW;AAC7B,QAAC,GAAoC,OAAO;AAAA,MAC7C;AAAA,IACD,GAAG,CAAC,MAAMA,OAAM,CAAC;AAEjB,QAAI,OAAO;AACV,aAAa;AAAA,QACZ;AAAA,QACA,EAAE,MAAM,SAAS,WAAW,MAAM;AAAA,QAClC,+BAA+B,MAAM,OAAO;AAAA,MAC7C;AAAA,IACD;AAEA,WAAa,oBAAc,uBAAuB;AAAA,MACjD,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACJ,CAAC;AAAA,EACF;AACD;",
6
6
  "names": ["RoxyPanchangTable", "loaded"]
7
7
  }
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { ShadbalaResponse } from '@roxyapi/ui/types';
3
+ type ElementAttrs = Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'data'>;
4
+ export interface RoxyShadbalaTableProps extends ElementAttrs {
5
+ /** Spec-derived response payload. Pass the raw RoxyAPI response. */
6
+ data?: ShadbalaResponse;
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ }
10
+ export declare const RoxyShadbalaTable: React.ForwardRefExoticComponent<RoxyShadbalaTableProps & React.RefAttributes<HTMLElement | null>>;
11
+ export {};
12
+ //# sourceMappingURL=shadbala-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shadbala-table.d.ts","sourceRoot":"","sources":["../../src/components/shadbala-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,KAAK,YAAY,GAAG,IAAI,CACvB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,GAAG,MAAM,CACnB,CAAC;AAEF,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC3D,oEAAoE;IACpE,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAE5B;AAED,eAAO,MAAM,iBAAiB,mGAgD7B,CAAC"}