npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vedika-io/react-native-widgets

v0.1.0

Published

Embeddable Vedika astrology widgets for React Native — themed, data-driven, one theme.json recolors everything.

Downloads

37

Readme

@vedika-io/react-native-widgets

Vedika astrology widgets for React Native (iOS and Android). The widget data, theming and view-models match the web package @vedika-io/widgets. One small theme (seed + mode) recolors every widget, and every colour pick is clamped to stay readable (WCAG AA).

Install

npm install @vedika-io/react-native-widgets

Peer dependencies: react >= 18 and react-native >= 0.72. With TypeScript, the shipped declarations need @types/react 18.2.6 or later.

import { VedikaWidget, VedikaThemePicker, createDataProvider } from '@vedika-io/react-native-widgets';

<VedikaWidget type="daily-horoscope" params={{ sign: 'leo' }} theme={{ seed: '#d97706', mode: 'light' }} />
<VedikaWidget type="numerology" input={{ birthDate: '1990-05-15' }} />

Widgets

| type | Shows | API operation (production) | Required input | |---|---|---|---| | daily-horoscope | card | GET /v2/astrology/horoscope/{sign} | none; pass params={{ sign }} | | panchang | list | GET /v2/astrology/panchang/today | none | | choghadiya | timing bands | GET /v2/astrology/choghadiya | none | | rahu-kaal | glance | GET /v2/astrology/rahu-kaal | none | | moon-phase | glance | GET /v2/daily/moon-phase | none | | numerology | grid | POST /v2/astrology/numerology/life-path | birthDate (or dateOfBirth, date, datetime) | | tarot-draw | cards | POST /v2/tarot/draw/three-card | none; question is optional | | birth-chart | chart | POST /v2/astrology/birth-chart | birth details (see below) | | compatibility | score | POST /v2/astrology/ashtakoot-match | male and female, each with birth details |

Birth details. Supply all four:

  • datetime, or date with an optional time;
  • latitude;
  • longitude;
  • timezone, such as "+05:30".

You can leave out timezone only when datetime carries its own offset, for example 1990-05-15T10:30:00+05:30. The API reads a datetime with no offset and no timezone as UTC, so the widget refuses to send one. The API's aliases also count: lat, lon/lng, tz, dob, dateOfBirth.

A birth chart sent with a date and no time is cast for 12:00 local time. The widget then shows the API's precision note under the title.

Rahu Kaal after dark. Late in the day the API can return an empty Rahu Kaal window. The widget shows for it.

<VedikaWidget> props

  • params fills path placeholders, for example { sign }.
  • input is the request body for POST widgets and the query for GET widgets.
    • panchang, choghadiya and rahu-kaal take latitude, longitude and timezone. Without them, the API uses New Delhi.
    • When you give a location but no datetime, the widget sends the current time itself, so the reading is for now.
    • daily-horoscope takes date and timezone. moon-phase takes date.
    • If required input is missing, the widget shows a message and does not call the API.
    • widgets[type].inputExample holds a working example for the widgets that take input: numerology, tarot-draw, birth-chart and compatibility.
  • provider controls where requests go. The default is the keyless sandbox.

Sandbox and production

const sandbox = createDataProvider();                                                     // keyless sample data
const direct = createDataProvider({ mode: 'prod', apiKey });                              // billed to the key
const proxied = createDataProvider({ mode: 'prod', baseUrl: 'https://your-api.example/vedika' }); // your backend adds the key
  • Sandbox: it ignores the request input and returns one fixed demo reading. Only the horoscope sign in the path is used.
  • Keys in apps: do not ship a production key inside an app binary. Route calls through your own backend with baseUrl.
  • What that backend forwards: only the operations in the table above, with a capped body size and a per-user rate limit. A backend that forwards any path lets anyone use your key for any API operation.
  • Keys and baseUrl: when apiKey and baseUrl are both set, the key is sent to the baseUrl host, so that host must be https://. The only exceptions are a relative path and http://localhost, for development.

Other exports

  • Theme picker: VedikaThemePicker (value, onThemeChange, presets).

  • Watch-style glance: WatchGlance (vm, theme, size).

  • Primitives: Card, List, Grid, Cards, Chart, Timing, Glance and Score, plus resolveRoles.

  • Headless helpers: widgets, missingInput, requestInput, derive and contrast. These also load in plain Node without react or react-native, from these files:

    • @vedika-io/react-native-widgets/lib/derive.js
    • /lib/glyphs.js
    • /lib/viewModels.js
    • /lib/dataProvider.js
    • /lib/theme.js

    Keep the .js extension: native ESM import and TypeScript's node16 resolution need it.

How it is built

| Consumer | Loads | |---|---| | Metro | the TypeScript source through the react-native field (src/index.ts) | | Node, Jest and other bundlers | CommonJS from lib/ | | TypeScript | the declarations in lib/*.d.ts |

npm pack and npm publish rebuild lib/ through prepack. Never pack or publish with --ignore-scripts: that skips prepack and ships no lib/.

Checks

npm run typecheck and npm test. The tests are not part of the published package.

License

Proprietary. Use requires a Vedika API subscription or a written agreement with XALEN Technology Pvt Ltd; see LICENSE.