@void-platforms/wow-talents
v0.0.1-alpha.7
Published
WoW talent snapshots + parsers + a tiny React renderer.
Downloads
95
Readme
@void-platforms/wow-talents
ALPHA: Rapid iteration phase. APIs, data formats, and visuals will change without notice. Expect breaking changes between alpha versions.
npm i @void-platforms/wow-talents@alphaReact Components
import { Render } from '@void-platforms/wow-talents'
;<Render
talents={'<build string>'}
snapshot='latest'
config={{
showTreeHeader: true,
treeHeaderLabelClassName: 'text-red-500',
treeHeaderPointsClassName: 'text-blue-500',
nodeSize: 'md',
nodeGap: 'md'
}}
/>Data Access (Node.js only)
import { getSpecIndex, getSpecTreeData } from '@void-platforms/wow-talents'
const specs = getSpecIndex()
const tree = getSpecTreeData('latest', 854, 577)Note: This package is alpha; internal data shapes and rendering details may change.
Data from Blizzard's Game Data API.
Styling and Tailwind
This package does not automatically import Tailwind for consumers. You have two options:
If your app already uses Tailwind
Ensure your Tailwind build scans this package's source so utilities are generated. Add this package to your content globs (or safelist) in your Tailwind config.
Examples:
Tailwind v3 config (framework-managed):
// tailwind.config.js module.exports = { content: [ './src/**/*.{js,ts,jsx,tsx}', './node_modules/@void-platforms/wow-talents/**/*.{js,ts,jsx,tsx}' ] // ... }Tailwind v4 CLI flags:
tailwindcss \ --content "src/**/*.{js,ts,jsx,tsx,html}" \ --content "node_modules/@void-platforms/wow-talents/**/*.{js,ts,jsx,tsx}"
Alternatively, import this package's precompiled stylesheet (see below) to avoid adjusting your content globs.
You can customize parts of the UI via props in
config(e.g.,treeHeaderLabelClassName,treeHeaderPointsClassName). These accept your own Tailwind classes from your app's config.
If your app does not use Tailwind
- Import the precompiled stylesheet provided by this package:
import '@void-platforms/wow-talents/styles.css'or include it in HTML:
<link
rel="stylesheet"
href="/node_modules/@void-platforms/wow-talents/dist/styles.css"
/>- This stylesheet includes Tailwind styles necessary for the renderer. It currently includes Tailwind's base/components/utilities, which may apply global resets (preflight). If that is undesirable, consider isolating the renderer (e.g., in a dedicated container or shadow root) or adjusting your app's CSS order.
Notes
- The library intentionally avoids importing its own
globals.cssfor consumers, to prevent double-injecting Tailwind and overriding host styles. - If you need a no-preflight stylesheet variant, please open an issue — we can ship an additional build without Tailwind base if needed.
