@roxyapi/ui-vue 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -1
- package/README.md +2 -1
- package/dist/components/angel-number-card.js +1 -1
- package/dist/components/angel-number-card.js.map +1 -1
- package/dist/components/angel-number-lookup.js +1 -1
- package/dist/components/angel-number-lookup.js.map +1 -1
- package/dist/components/arudha-padas.js +1 -1
- package/dist/components/arudha-padas.js.map +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -1
- package/dist/components/ashtakavarga-grid.js.map +1 -1
- package/dist/components/aspects-table.js +1 -1
- package/dist/components/aspects-table.js.map +1 -1
- package/dist/components/astrocartography-map.js +1 -1
- package/dist/components/astrocartography-map.js.map +1 -1
- package/dist/components/bhav-chalit-table.js +1 -1
- package/dist/components/bhav-chalit-table.js.map +1 -1
- package/dist/components/bhava-bala-table.js +1 -1
- package/dist/components/bhava-bala-table.js.map +1 -1
- package/dist/components/biorhythm-chart.js +1 -1
- package/dist/components/biorhythm-chart.js.map +1 -1
- package/dist/components/bodygraph.js +1 -1
- package/dist/components/bodygraph.js.map +1 -1
- package/dist/components/chara-karakas.js +1 -1
- package/dist/components/chara-karakas.js.map +1 -1
- package/dist/components/choghadiya-grid.js +1 -1
- package/dist/components/choghadiya-grid.js.map +1 -1
- package/dist/components/compatibility-card.js +1 -1
- package/dist/components/compatibility-card.js.map +1 -1
- package/dist/components/crystal-card.js +1 -1
- package/dist/components/crystal-card.js.map +1 -1
- package/dist/components/crystal-grid.js +1 -1
- package/dist/components/crystal-grid.js.map +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/dasha-timeline.js.map +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/data.js.map +1 -1
- package/dist/components/divisional-chart.js +1 -1
- package/dist/components/divisional-chart.js.map +1 -1
- package/dist/components/dosha-card.js +1 -1
- package/dist/components/dosha-card.js.map +1 -1
- package/dist/components/dream-card.js +1 -1
- package/dist/components/dream-card.js.map +1 -1
- package/dist/components/dream-search.js +1 -1
- package/dist/components/dream-search.js.map +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/ephemeris-table.d.ts +98 -0
- package/dist/components/ephemeris-table.d.ts.map +1 -0
- package/dist/components/ephemeris-table.js +2 -0
- package/dist/components/ephemeris-table.js.map +7 -0
- package/dist/components/fixed-stars.js +1 -1
- package/dist/components/fixed-stars.js.map +1 -1
- package/dist/components/forecast-digest.js +1 -1
- package/dist/components/forecast-digest.js.map +1 -1
- package/dist/components/forecast-timeline.js +1 -1
- package/dist/components/forecast-timeline.js.map +1 -1
- package/dist/components/gochara-table.js +1 -1
- package/dist/components/gochara-table.js.map +1 -1
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/guna-milan.js.map +1 -1
- package/dist/components/hd-connection.js +1 -1
- package/dist/components/hd-connection.js.map +1 -1
- package/dist/components/hd-penta.js +1 -1
- package/dist/components/hd-penta.js.map +1 -1
- package/dist/components/hd-type-card.js +1 -1
- package/dist/components/hd-type-card.js.map +1 -1
- package/dist/components/hd-variables.js +1 -1
- package/dist/components/hd-variables.js.map +1 -1
- package/dist/components/heliacal-table.js +1 -1
- package/dist/components/heliacal-table.js.map +1 -1
- package/dist/components/hexagram.js +1 -1
- package/dist/components/hexagram.js.map +1 -1
- package/dist/components/hora-table.js +1 -1
- package/dist/components/hora-table.js.map +1 -1
- package/dist/components/horoscope-card.js +1 -1
- package/dist/components/horoscope-card.js.map +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-chart.js.map +1 -1
- package/dist/components/kp-planets-table.js +1 -1
- package/dist/components/kp-planets-table.js.map +1 -1
- package/dist/components/kp-ruling-planets.js +1 -1
- package/dist/components/kp-ruling-planets.js.map +1 -1
- package/dist/components/local-space-compass.js +1 -1
- package/dist/components/local-space-compass.js.map +1 -1
- package/dist/components/location-search.js +1 -1
- package/dist/components/location-search.js.map +1 -1
- package/dist/components/moon-phase.js +1 -1
- package/dist/components/moon-phase.js.map +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/nakshatra-card.js.map +1 -1
- package/dist/components/natal-chart.js +1 -1
- package/dist/components/natal-chart.js.map +1 -1
- package/dist/components/numerology-card.js +1 -1
- package/dist/components/numerology-card.js.map +1 -1
- package/dist/components/panchang-table.js +1 -1
- package/dist/components/panchang-table.js.map +1 -1
- package/dist/components/positions-table.js +1 -1
- package/dist/components/positions-table.js.map +1 -1
- package/dist/components/profection-card.js +1 -1
- package/dist/components/profection-card.js.map +1 -1
- package/dist/components/reference-card.js +1 -1
- package/dist/components/reference-card.js.map +1 -1
- package/dist/components/relocation-wheel.js +1 -1
- package/dist/components/relocation-wheel.js.map +1 -1
- package/dist/components/shadbala-table.js +1 -1
- package/dist/components/shadbala-table.js.map +1 -1
- package/dist/components/synastry-chart.js +1 -1
- package/dist/components/synastry-chart.js.map +1 -1
- package/dist/components/tarot-card.js +1 -1
- package/dist/components/tarot-card.js.map +1 -1
- package/dist/components/tarot-catalog.js +1 -1
- package/dist/components/tarot-catalog.js.map +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/tarot-spread.js.map +1 -1
- package/dist/components/transit-wheel.js +1 -1
- package/dist/components/transit-wheel.js.map +1 -1
- package/dist/components/transits-table.js +1 -1
- package/dist/components/transits-table.js.map +1 -1
- package/dist/components/upagraha-table.js +1 -1
- package/dist/components/upagraha-table.js.map +1 -1
- package/dist/components/vedic-aspects.js +1 -1
- package/dist/components/vedic-aspects.js.map +1 -1
- package/dist/components/vedic-kundli.js +1 -1
- package/dist/components/vedic-kundli.js.map +1 -1
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/vedic-planets-table.js.map +1 -1
- package/dist/components/western-planets-table.js +1 -1
- package/dist/components/western-planets-table.js.map +1 -1
- package/dist/components/yoga-list.js +1 -1
- package/dist/components/yoga-list.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/load-ui.d.ts +1 -1
- package/dist/load-ui.js +1 -1
- package/dist/load-ui.js.map +1 -1
- package/dist/types/types.gen.d.ts +16 -16
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/bhava-bala-table.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { BhavaBalaResponse } from '../types/index.js';\n\nexport interface RoxyBhavaBalaTableProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: BhavaBalaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBhavaBalaTable = defineComponent({\n\tname: 'RoxyBhavaBalaTable',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBhavaBalaTableProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyBhavaBalaTableProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBhavaBalaTableProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBhavaBalaTableProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBhavaBalaTableProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBhavaBalaTableProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBhavaBalaTableProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBhavaBalaTableProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBhavaBalaTableProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBhavaBalaTableProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-bhava-bala-table', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { BhavaBalaResponse } from '../types/index.js';\n\nexport interface RoxyBhavaBalaTableProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: BhavaBalaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBhavaBalaTable = defineComponent({\n\tname: 'RoxyBhavaBalaTable',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBhavaBalaTableProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyBhavaBalaTableProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBhavaBalaTableProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBhavaBalaTableProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBhavaBalaTableProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBhavaBalaTableProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBhavaBalaTableProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBhavaBalaTableProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBhavaBalaTableProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBhavaBalaTableProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-bhava-bala-table', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAWH,EAAUC,CAAO,CAAC,cACxCM,EAAW,SAAS,eAAeZ,CAAS,EAChD,GAAIY,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,SAAS,cAAc,QAAQ,EAC1CA,EAAS,GAAKZ,EACdY,EAAS,IAAMD,EACfC,EAAS,MAAQ,GACjBA,EAAS,YAAc,YACvBA,EAAS,iBAAiB,OAAQ,IAAM,CACvCA,EAAU,QAAQ,O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WO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,wBAAyBC,CAAY,CAC/C,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyBhavaBalaTable", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as c,h as s,onMounted as f,ref as b}from"vue";var y="0.
|
|
1
|
+
import{defineComponent as c,h as s,onMounted as f,ref as b}from"vue";var y="0.27.0",a="roxyapi-ui-loader",h="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",u="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",p="/dist/cdn",n=null;function m(e){return!e||e==="latest"?h:`${u}${e}${p}`}function d(e=y,r){return typeof document>"u"?Promise.resolve():n||(n=new Promise((t,o)=>{let l=`${r??m(e)}/roxy-ui.js`,i=document.getElementById(a);if(i){i.dataset.loaded==="true"?t():(i.addEventListener("load",()=>t()),i.addEventListener("error",()=>o(new Error("roxy-ui load failed"))));return}i=document.createElement("script"),i.id=a,i.src=l,i.async=!0,i.crossOrigin="anonymous",i.addEventListener("load",()=>{i.dataset.loaded="true",t()}),i.addEventListener("error",()=>o(new Error("roxy-ui load failed"))),document.head.appendChild(i)}),n)}var x=c({name:"RoxyBiorhythmChart",props:{data:{type:Object},mode:{type:String},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let r=b(null);return f(()=>{d().catch(t=>{r.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(r.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${r.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.mode!==void 0&&(t[".mode"]=e.mode),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),s("roxy-biorhythm-chart",t)}}});export{x as RoxyBiorhythmChart};
|
|
2
2
|
//# sourceMappingURL=biorhythm-chart.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/biorhythm-chart.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCriticalDaysResponse, GetDailyBiorhythmResponse, GetForecastResponse } from '../types/index.js';\n\nexport interface RoxyBiorhythmChartProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyBiorhythmResponse | GetForecastResponse | GetCriticalDaysResponse;\n\t/** Which biorhythm response shape to render: a single day, a multi-day forecast, or the critical days list. */\n\tmode?: 'daily' | 'forecast' | 'critical-days';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBiorhythmChart = defineComponent({\n\tname: 'RoxyBiorhythmChart',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBiorhythmChartProps['data']> },\n\t\tmode: { type: String as PropType<RoxyBiorhythmChartProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyBiorhythmChartProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBiorhythmChartProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBiorhythmChartProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBiorhythmChartProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBiorhythmChartProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBiorhythmChartProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBiorhythmChartProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBiorhythmChartProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBiorhythmChartProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-biorhythm-chart', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCriticalDaysResponse, GetDailyBiorhythmResponse, GetForecastResponse } from '../types/index.js';\n\nexport interface RoxyBiorhythmChartProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetDailyBiorhythmResponse | GetForecastResponse | GetCriticalDaysResponse;\n\t/** Which biorhythm response shape to render: a single day, a multi-day forecast, or the critical days list. */\n\tmode?: 'daily' | 'forecast' | 'critical-days';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBiorhythmChart = defineComponent({\n\tname: 'RoxyBiorhythmChart',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBiorhythmChartProps['data']> },\n\t\tmode: { type: String as PropType<RoxyBiorhythmChartProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyBiorhythmChartProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBiorhythmChartProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBiorhythmChartProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBiorhythmChartProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBiorhythmChartProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBiorhythmChartProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBiorhythmChartProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBiorhythmChartProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBiorhythmChartProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-biorhythm-chart', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"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"onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyBiorhythmChart", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as b,h as s,onMounted as h,ref as c}from"vue";var p="0.
|
|
1
|
+
import{defineComponent as b,h as s,onMounted as h,ref as c}from"vue";var p="0.27.0",d="roxyapi-ui-loader",u="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",g="/dist/cdn",i=null;function f(e){return!e||e==="latest"?u:`${y}${e}${g}`}function a(e=p,r){return typeof document>"u"?Promise.resolve():i||(i=new Promise((t,o)=>{let l=`${r??f(e)}/roxy-ui.js`,n=document.getElementById(d);if(n){n.dataset.loaded==="true"?t():(n.addEventListener("load",()=>t()),n.addEventListener("error",()=>o(new Error("roxy-ui load failed"))));return}n=document.createElement("script"),n.id=d,n.src=l,n.async=!0,n.crossOrigin="anonymous",n.addEventListener("load",()=>{n.dataset.loaded="true",t()}),n.addEventListener("error",()=>o(new Error("roxy-ui load failed"))),document.head.appendChild(n)}),i)}var R=b({name:"RoxyBodygraph",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let r=c(null);return h(()=>{a().catch(t=>{r.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(r.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${r.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),s("roxy-bodygraph",t)}}});export{R as RoxyBodygraph};
|
|
2
2
|
//# sourceMappingURL=bodygraph.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/bodygraph.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GenerateBodygraphResponse } from '../types/index.js';\n\nexport interface RoxyBodygraphProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GenerateBodygraphResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBodygraph = defineComponent({\n\tname: 'RoxyBodygraph',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBodygraphProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyBodygraphProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBodygraphProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBodygraphProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBodygraphProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBodygraphProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBodygraphProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBodygraphProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBodygraphProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBodygraphProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-bodygraph', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GenerateBodygraphResponse } from '../types/index.js';\n\nexport interface RoxyBodygraphProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GenerateBodygraphResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyBodygraph = defineComponent({\n\tname: 'RoxyBodygraph',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyBodygraphProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyBodygraphProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyBodygraphProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyBodygraphProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyBodygraphProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyBodygraphProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyBodygraphProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyBodygraphProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyBodygraphProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyBodygraphProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-bodygraph', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAWH,EAAUC,CAAO,CAAC,cACxCM,EAAW,SAAS,eAAeZ,CAAS,EAChD,GAAIY,EAAU,CACTA,EAAS,QAAQ,SAAW,OAC/BH,EAAQ,GAERG,EAAS,iBAAiB,OAAQ,IAAMH,EAAQ,CAAC,EACjDG,EAAS,iBAAiB,QAAS,IAAMF,EAAO,IAAI,MAAM,qBAAqB,CAAC,CAAC,GAElF,MACD,CACAE,EAAW,SAAS,cAAc,QAAQ,EAC1CA,EAAS,GAAKZ,EACdY,EAAS,IAAMD,EACfC,EAAS,MAAQ,GACjBA,EAAS,YAAc,YACvBA,EAAS,iBAAiB,OAAQ,IAAM,CACvCA,EAAU,QAAQ,OAAS,OA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O,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,iBAAkBC,CAAY,CACxC,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyBodygraph", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as h,h as s,onMounted as b,ref as g}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as h,h as s,onMounted as b,ref as g}from"vue";var u="0.27.0",o="roxyapi-ui-loader",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",f="/dist/cdn",n=null;function c(e){return!e||e==="latest"?p:`${y}${e}${f}`}function d(e=u,t){return typeof document>"u"?Promise.resolve():n||(n=new Promise((a,i)=>{let l=`${t??c(e)}/roxy-ui.js`,r=document.getElementById(o);if(r){r.dataset.loaded==="true"?a():(r.addEventListener("load",()=>a()),r.addEventListener("error",()=>i(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=o,r.src=l,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",a()}),r.addEventListener("error",()=>i(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),n)}var R=h({name:"RoxyCharaKarakas",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let t=g(null);return b(()=>{d().catch(a=>{t.value=a instanceof Error?a:new Error(String(a))})}),()=>{if(t.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${t.value.message}`);let a={};return e.data!==void 0&&(a[".data"]=e.data),e.endpoint!==void 0&&(a[".endpoint"]=e.endpoint),e.method!==void 0&&(a[".method"]=e.method),e.publishableKey!==void 0&&(a[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(a[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(a[".specUrl"]=e.specUrl),e.lang!==void 0&&(a[".lang"]=e.lang),e.submitLabel!==void 0&&(a[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(a[".attribution"]=e.attribution),e.hideReadings!==void 0&&(a[".hideReadings"]=e.hideReadings),s("roxy-chara-karakas",a)}}});export{R as RoxyCharaKarakas};
|
|
2
2
|
//# sourceMappingURL=chara-karakas.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/chara-karakas.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CharaKarakaResponse } from '../types/index.js';\n\nexport interface RoxyCharaKarakasProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CharaKarakaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCharaKarakas = defineComponent({\n\tname: 'RoxyCharaKarakas',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCharaKarakasProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyCharaKarakasProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCharaKarakasProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCharaKarakasProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCharaKarakasProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCharaKarakasProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCharaKarakasProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCharaKarakasProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCharaKarakasProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCharaKarakasProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-chara-karakas', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CharaKarakaResponse } from '../types/index.js';\n\nexport interface RoxyCharaKarakasProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CharaKarakaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCharaKarakas = defineComponent({\n\tname: 'RoxyCharaKarakas',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCharaKarakasProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyCharaKarakasProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCharaKarakasProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCharaKarakasProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCharaKarakasProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCharaKarakasProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCharaKarakasProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCharaKarakasProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCharaKarakasProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCharaKarakasProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-chara-karakas', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAWH,EAAUC,CAAO,CAAC,cACxCM,EAAW,SAAS,eAAeZ,CAAS,EAChD,GAAIY,EAAU,CACTA,EAAS,QAAQ,SA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AWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,WAAa,SAAWO,EAAa,WAAW,EAAIP,EAAM,UAChEA,EAAM,SAAW,SAAWO,EAAa,SAAS,EAAIP,EAAM,QAC5DA,EAAM,iBAAmB,SAAWO,EAAa,iBAAiB,EAAIP,EAAM,gBAC5EA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,qBAAsBC,CAAY,CAC5C,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyCharaKarakas", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as f,h as s,onMounted as c,ref as b}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as f,h as s,onMounted as c,ref as b}from"vue";var u="0.27.0",a="roxyapi-ui-loader",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",h="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",p="/dist/cdn",r=null;function g(e){return!e||e==="latest"?y:`${h}${e}${p}`}function o(e=u,n){return typeof document>"u"?Promise.resolve():r||(r=new Promise((i,d)=>{let l=`${n??g(e)}/roxy-ui.js`,t=document.getElementById(a);if(t){t.dataset.loaded==="true"?i():(t.addEventListener("load",()=>i()),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=a,t.src=l,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",i()}),t.addEventListener("error",()=>d(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),r)}var R=f({name:"RoxyChoghadiyaGrid",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let n=b(null);return c(()=>{o().catch(i=>{n.value=i instanceof Error?i:new Error(String(i))})}),()=>{if(n.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${n.value.message}`);let i={};return e.data!==void 0&&(i[".data"]=e.data),e.endpoint!==void 0&&(i[".endpoint"]=e.endpoint),e.method!==void 0&&(i[".method"]=e.method),e.publishableKey!==void 0&&(i[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(i[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(i[".specUrl"]=e.specUrl),e.lang!==void 0&&(i[".lang"]=e.lang),e.submitLabel!==void 0&&(i[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(i[".attribution"]=e.attribution),e.hideReadings!==void 0&&(i[".hideReadings"]=e.hideReadings),s("roxy-choghadiya-grid",i)}}});export{R as RoxyChoghadiyaGrid};
|
|
2
2
|
//# sourceMappingURL=choghadiya-grid.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/choghadiya-grid.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetChoghadiyaResponse } from '../types/index.js';\n\nexport interface RoxyChoghadiyaGridProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetChoghadiyaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyChoghadiyaGrid = defineComponent({\n\tname: 'RoxyChoghadiyaGrid',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyChoghadiyaGridProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyChoghadiyaGridProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyChoghadiyaGridProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyChoghadiyaGridProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyChoghadiyaGridProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyChoghadiyaGridProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyChoghadiyaGridProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyChoghadiyaGridProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyChoghadiyaGridProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyChoghadiyaGridProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-choghadiya-grid', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetChoghadiyaResponse } from '../types/index.js';\n\nexport interface RoxyChoghadiyaGridProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetChoghadiyaResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyChoghadiyaGrid = defineComponent({\n\tname: 'RoxyChoghadiyaGrid',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyChoghadiyaGridProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyChoghadiyaGridProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyChoghadiyaGridProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyChoghadiyaGridProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyChoghadiyaGridProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyChoghadiyaGridProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyChoghadiyaGridProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyChoghadiyaGridProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyChoghadiyaGridProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyChoghadiyaGridProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-choghadiya-grid', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,E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,MAA2D,EAChF,aAAc,CAAE,KAAM,OAA6D,CACpF,EACA,MAAMC,EAAO,CACZ,IAAMC,EAAYC,EAAkB,IAAI,EAExC,OAAAC,EAAU,IAAM,CACfC,EAAmB,EAAE,MAAOC,GAAiB,CAC5CJ,EAAU,MAAQI,aAAe,MAAQA,EAAM,IAAI,MAAM,OAAOA,CAAG,CAAC,CACrE,CAAC,CACF,CAAC,EAEM,IAAM,CACZ,GAAIJ,EAAU,MACb,OAAOK,EACN,MACA,CAAE,KAAM,OAAQ,EAChB,+BAA+BL,EAAU,MAAM,OAAO,EACvD,EAGD,IAAMM,EAAwC,CAAC,EAC/C,OAAIP,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,WAAa,SAAWO,EAAa,WAAW,EAAIP,EAAM,UAChEA,EAAM,SAAW,SAAWO,EAAa,SAAS,EAAIP,EAAM,QAC5DA,EAAM,iBAAmB,SAAWO,EAAa,iBAAiB,EAAIP,EAAM,gBAC5EA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,uBAAwBC,CAAY,CAC9C,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyChoghadiyaGrid", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as c,h as l,onMounted as C,ref as f}from"vue";var y="0.
|
|
1
|
+
import{defineComponent as c,h as l,onMounted as C,ref as f}from"vue";var y="0.27.0",r="roxyapi-ui-loader",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",u="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",m="/dist/cdn",a=null;function b(e){return!e||e==="latest"?p:`${u}${e}${m}`}function d(e=y,n){return typeof document>"u"?Promise.resolve():a||(a=new Promise((t,o)=>{let s=`${n??b(e)}/roxy-ui.js`,i=document.getElementById(r);if(i){i.dataset.loaded==="true"?t():(i.addEventListener("load",()=>t()),i.addEventListener("error",()=>o(new Error("roxy-ui load failed"))));return}i=document.createElement("script"),i.id=r,i.src=s,i.async=!0,i.crossOrigin="anonymous",i.addEventListener("load",()=>{i.dataset.loaded="true",t()}),i.addEventListener("error",()=>o(new Error("roxy-ui load failed"))),document.head.appendChild(i)}),a)}var x=c({name:"RoxyCompatibilityCard",props:{data:{type:Object},mode:{type:String},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let n=f(null);return C(()=>{d().catch(t=>{n.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(n.value)return l("div",{role:"alert"},`Roxy UI script load failed: ${n.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.mode!==void 0&&(t[".mode"]=e.mode),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),l("roxy-compatibility-card",t)}}});export{x as RoxyCompatibilityCard};
|
|
2
2
|
//# sourceMappingURL=compatibility-card.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/compatibility-card.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateBioCompatibilityResponse, CalculateCompatibilityResponse, CalculateNumCompatibilityResponse } from '../types/index.js';\n\nexport interface RoxyCompatibilityCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateCompatibilityResponse | CalculateNumCompatibilityResponse | CalculateBioCompatibilityResponse;\n\t/** Which compatibility domain the response is from. Themes the card and labels the category breakdown. */\n\tmode?: 'astrology' | 'numerology' | 'biorhythm';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCompatibilityCard = defineComponent({\n\tname: 'RoxyCompatibilityCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCompatibilityCardProps['data']> },\n\t\tmode: { type: String as PropType<RoxyCompatibilityCardProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyCompatibilityCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCompatibilityCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCompatibilityCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCompatibilityCardProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCompatibilityCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCompatibilityCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCompatibilityCardProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCompatibilityCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCompatibilityCardProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-compatibility-card', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { CalculateBioCompatibilityResponse, CalculateCompatibilityResponse, CalculateNumCompatibilityResponse } from '../types/index.js';\n\nexport interface RoxyCompatibilityCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: CalculateCompatibilityResponse | CalculateNumCompatibilityResponse | CalculateBioCompatibilityResponse;\n\t/** Which compatibility domain the response is from. Themes the card and labels the category breakdown. */\n\tmode?: 'astrology' | 'numerology' | 'biorhythm';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCompatibilityCard = defineComponent({\n\tname: 'RoxyCompatibilityCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCompatibilityCardProps['data']> },\n\t\tmode: { type: String as PropType<RoxyCompatibilityCardProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyCompatibilityCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCompatibilityCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCompatibilityCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCompatibilityCardProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCompatibilityCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCompatibilityCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCompatibilityCardProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCompatibilityCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCompatibilityCardProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-compatibility-card', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EACfD,EAAkBP,EAClBS,EACgB,CAChB,OAAI,OAAO,SAAa,IAAoB,QAAQ,QAAQ,EACxDJ,IAEJA,EAAS,IAAI,QAAc,CAACK,EAASC,IAAW,CAC/C,IAAMC,EAAM,GAAGH,GAAW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OK,EACN,MACA,CAAE,KAAM,OAAQ,EAChB,+BAA+BL,EAAU,MAAM,OAAO,EACvD,EAGD,IAAMM,EAAwC,CAAC,EAC/C,OAAIP,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,WAAa,SAAWO,EAAa,WAAW,EAAIP,EAAM,UAChEA,EAAM,SAAW,SAAWO,EAAa,SAAS,EAAIP,EAAM,QAC5DA,EAAM,iBAAmB,SAAWO,EAAa,iBAAiB,EAAIP,EAAM,gBAC5EA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,0BAA2BC,CAAY,CACjD,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyCompatibilityCard", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as b,h as s,onMounted as g,ref as m}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as b,h as s,onMounted as g,ref as m}from"vue";var u="0.27.0",d="roxyapi-ui-loader",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",c="/dist/cdn",i=null;function f(e){return!e||e==="latest"?y:`${p}${e}${c}`}function o(e=u,n){return typeof document>"u"?Promise.resolve():i||(i=new Promise((t,a)=>{let l=`${n??f(e)}/roxy-ui.js`,r=document.getElementById(d);if(r){r.dataset.loaded==="true"?t():(r.addEventListener("load",()=>t()),r.addEventListener("error",()=>a(new Error("roxy-ui load failed"))));return}r=document.createElement("script"),r.id=d,r.src=l,r.async=!0,r.crossOrigin="anonymous",r.addEventListener("load",()=>{r.dataset.loaded="true",t()}),r.addEventListener("error",()=>a(new Error("roxy-ui load failed"))),document.head.appendChild(r)}),i)}var R=b({name:"RoxyCrystalCard",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let n=m(null);return g(()=>{o().catch(t=>{n.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(n.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${n.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),s("roxy-crystal-card",t)}}});export{R as RoxyCrystalCard};
|
|
2
2
|
//# sourceMappingURL=crystal-card.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/crystal-card.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCrystalResponse } from '../types/index.js';\n\nexport interface RoxyCrystalCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetCrystalResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCrystalCard = defineComponent({\n\tname: 'RoxyCrystalCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCrystalCardProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyCrystalCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCrystalCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCrystalCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCrystalCardProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCrystalCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCrystalCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCrystalCardProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCrystalCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCrystalCardProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-crystal-card', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetCrystalResponse } from '../types/index.js';\n\nexport interface RoxyCrystalCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetCrystalResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCrystalCard = defineComponent({\n\tname: 'RoxyCrystalCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCrystalCardProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyCrystalCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCrystalCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCrystalCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCrystalCardProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCrystalCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCrystalCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCrystalCardProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCrystalCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCrystalCardProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-crystal-card', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,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AAE,KAAM,MAAwD,EAC7E,YAAa,CAAE,KAAM,MAAwD,EAC7E,aAAc,CAAE,KAAM,OAA0D,CACjF,EACA,MAAMC,EAAO,CACZ,IAAMC,EAAYC,EAAkB,IAAI,EAExC,OAAAC,EAAU,IAAM,CACfC,EAAmB,EAAE,MAAOC,GAAiB,CAC5CJ,EAAU,MAAQI,aAAe,MAAQA,EAAM,IAAI,MAAM,OAAOA,CAAG,CAAC,CACrE,CAAC,CACF,CAAC,EAEM,IAAM,CACZ,GAAIJ,EAAU,MACb,OAAOK,EACN,MACA,CAAE,KAAM,OAAQ,EAChB,+BAA+BL,EAAU,MAAM,OAAO,EACvD,EAGD,IAAMM,EAAwC,CAAC,EAC/C,OAAIP,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,WAAa,SAAWO,EAAa,WAAW,EAAIP,EAAM,UAChEA,EAAM,SAAW,SAAWO,EAAa,SAAS,EAAIP,EAAM,QAC5DA,EAAM,iBAAmB,SAAWO,EAAa,iBAAiB,EAAIP,EAAM,gBAC5EA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,oBAAqBC,CAAY,CAC3C,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyCrystalCard", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as f,h as o,onMounted as b,ref as m}from"vue";var y="0.
|
|
1
|
+
import{defineComponent as f,h as o,onMounted as b,ref as m}from"vue";var y="0.27.0",a="roxyapi-ui-loader",u="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",g="/dist/cdn",i=null;function c(e){return!e||e==="latest"?u:`${p}${e}${g}`}function d(e=y,r){return typeof document>"u"?Promise.resolve():i||(i=new Promise((t,s)=>{let l=`${r??c(e)}/roxy-ui.js`,n=document.getElementById(a);if(n){n.dataset.loaded==="true"?t():(n.addEventListener("load",()=>t()),n.addEventListener("error",()=>s(new Error("roxy-ui load failed"))));return}n=document.createElement("script"),n.id=a,n.src=l,n.async=!0,n.crossOrigin="anonymous",n.addEventListener("load",()=>{n.dataset.loaded="true",t()}),n.addEventListener("error",()=>s(new Error("roxy-ui load failed"))),document.head.appendChild(n)}),i)}var P=f({name:"RoxyCrystalGrid",props:{data:{type:Object},heading:{type:String},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let r=m(null);return b(()=>{d().catch(t=>{r.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(r.value)return o("div",{role:"alert"},`Roxy UI script load failed: ${r.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.heading!==void 0&&(t[".heading"]=e.heading),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),o("roxy-crystal-grid",t)}}});export{P as RoxyCrystalGrid};
|
|
2
2
|
//# sourceMappingURL=crystal-grid.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/crystal-grid.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetBirthstonesResponse, GetCrystalsByChakraResponse, GetCrystalsByElementResponse, GetCrystalsByZodiacResponse, ListCrystalsResponse, SearchCrystalsResponse } from '../types/index.js';\n\nexport interface RoxyCrystalGridProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ListCrystalsResponse | GetCrystalsByChakraResponse | GetCrystalsByElementResponse | GetCrystalsByZodiacResponse | GetBirthstonesResponse | SearchCrystalsResponse;\n\t/** Override the auto-derived grid heading. Empty by default, in which case the heading is derived from the response filter (chakra, element, zodiac sign, or birth month). */\n\theading?: string;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCrystalGrid = defineComponent({\n\tname: 'RoxyCrystalGrid',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCrystalGridProps['data']> },\n\t\theading: { type: String as PropType<RoxyCrystalGridProps['heading']> },\n\t\tendpoint: { type: String as PropType<RoxyCrystalGridProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCrystalGridProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCrystalGridProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCrystalGridProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCrystalGridProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCrystalGridProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCrystalGridProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCrystalGridProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCrystalGridProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.heading !== undefined) elementProps['.heading'] = props.heading;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-crystal-grid', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetBirthstonesResponse, GetCrystalsByChakraResponse, GetCrystalsByElementResponse, GetCrystalsByZodiacResponse, ListCrystalsResponse, SearchCrystalsResponse } from '../types/index.js';\n\nexport interface RoxyCrystalGridProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: ListCrystalsResponse | GetCrystalsByChakraResponse | GetCrystalsByElementResponse | GetCrystalsByZodiacResponse | GetBirthstonesResponse | SearchCrystalsResponse;\n\t/** Override the auto-derived grid heading. Empty by default, in which case the heading is derived from the response filter (chakra, element, zodiac sign, or birth month). */\n\theading?: string;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. */\n\tbaseUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n}\n\nexport const RoxyCrystalGrid = defineComponent({\n\tname: 'RoxyCrystalGrid',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyCrystalGridProps['data']> },\n\t\theading: { type: String as PropType<RoxyCrystalGridProps['heading']> },\n\t\tendpoint: { type: String as PropType<RoxyCrystalGridProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyCrystalGridProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyCrystalGridProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyCrystalGridProps['baseUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyCrystalGridProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyCrystalGridProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyCrystalGridProps['submitLabel']> },\n\t\tattribution: { type: String as PropType<RoxyCrystalGridProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyCrystalGridProps['hideReadings']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.heading !== undefined) elementProps['.heading'] = props.heading;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\n\t\t\treturn h('roxy-crystal-grid', elementProps);\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 * Nuxt and Vue server rendering work without a flash.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.27.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "AAAA,OAAS,mBAAAA,EAAiB,KAAAC,EAAG,aAAAC,EAA0B,OAAAC,MAAW,MCoB3D,IAAMC,EAAkB,SAEzBC,EAAY,oBACZC,EAAkB,2DAClBC,EAAkB,4CAClBC,EAAkB,YAEpBC,EAA+B,KAEnC,SAASC,EAAUC,EAAyB,CAC3C,MAAI,CAACA,GAAWA,IAAY,SAAiBL,EACtC,GAAGC,CAAe,GAAGI,CAAO,GAAGH,CAAe,EACtD,CAEO,SAASI,EACfD,EAAkBP,E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GAAiB,CAC5CJ,EAAU,MAAQI,aAAe,MAAQA,EAAM,IAAI,MAAM,OAAOA,CAAG,CAAC,CACrE,CAAC,CACF,CAAC,EAEM,IAAM,CACZ,GAAIJ,EAAU,MACb,OAAOK,EACN,MACA,CAAE,KAAM,OAAQ,EAChB,+BAA+BL,EAAU,MAAM,OAAO,EACvD,EAGD,IAAMM,EAAwC,CAAC,EAC/C,OAAIP,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,WAAa,SAAWO,EAAa,WAAW,EAAIP,EAAM,UAChEA,EAAM,SAAW,SAAWO,EAAa,SAAS,EAAIP,EAAM,QAC5DA,EAAM,iBAAmB,SAAWO,EAAa,iBAAiB,EAAIP,EAAM,gBAC5EA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,UAAY,SAAWO,EAAa,UAAU,EAAIP,EAAM,SAC9DA,EAAM,OAAS,SAAWO,EAAa,OAAO,EAAIP,EAAM,MACxDA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,cAAgB,SAAWO,EAAa,cAAc,EAAIP,EAAM,aACtEA,EAAM,eAAiB,SAAWO,EAAa,eAAe,EAAIP,EAAM,cAErEM,EAAE,oBAAqBC,CAAY,CAC3C,CACD,CACD,CAAC",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyCrystalGrid", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as f,h as d,onMounted as b,ref as c}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as f,h as d,onMounted as b,ref as c}from"vue";var u="0.27.0",r="roxyapi-ui-loader",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",m="/dist/cdn",i=null;function h(e){return!e||e==="latest"?p:`${y}${e}${m}`}function o(e=u,t){return typeof document>"u"?Promise.resolve():i||(i=new Promise((n,s)=>{let l=`${t??h(e)}/roxy-ui.js`,a=document.getElementById(r);if(a){a.dataset.loaded==="true"?n():(a.addEventListener("load",()=>n()),a.addEventListener("error",()=>s(new Error("roxy-ui load failed"))));return}a=document.createElement("script"),a.id=r,a.src=l,a.async=!0,a.crossOrigin="anonymous",a.addEventListener("load",()=>{a.dataset.loaded="true",n()}),a.addEventListener("error",()=>s(new Error("roxy-ui load failed"))),document.head.appendChild(a)}),i)}var T=f({name:"RoxyDashaTimeline",props:{data:{type:Object},period:{type:String},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},attribution:{type:String},hideReadings:{type:Boolean}},setup(e){let t=c(null);return b(()=>{o().catch(n=>{t.value=n instanceof Error?n:new Error(String(n))})}),()=>{if(t.value)return d("div",{role:"alert"},`Roxy UI script load failed: ${t.value.message}`);let n={};return e.data!==void 0&&(n[".data"]=e.data),e.period!==void 0&&(n[".period"]=e.period),e.endpoint!==void 0&&(n[".endpoint"]=e.endpoint),e.method!==void 0&&(n[".method"]=e.method),e.publishableKey!==void 0&&(n[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(n[".baseUrl"]=e.baseUrl),e.specUrl!==void 0&&(n[".specUrl"]=e.specUrl),e.lang!==void 0&&(n[".lang"]=e.lang),e.submitLabel!==void 0&&(n[".submitLabel"]=e.submitLabel),e.attribution!==void 0&&(n[".attribution"]=e.attribution),e.hideReadings!==void 0&&(n[".hideReadings"]=e.hideReadings),d("roxy-dasha-timeline",n)}}});export{T as RoxyDashaTimeline};
|
|
2
2
|
//# sourceMappingURL=dasha-timeline.js.map
|