Ships the chart engine packages as optional peers so charts resolve in consumer apps, and stops apps without charts from crashing at startup.
This patch for HeroUI Native Pro fixes chart installs from 1.0.0-beta.12. The heroui-native-pro package is installed through a stub whose postinstall downloads the real build after your package manager has resolved the dependency tree, so the chart engine's dependencies were never installed. d3-scale, d3-shape, d3-zoom, its-fine, and react-fast-compare are now optional peers, set up like react-native-skia. Component props are unchanged.
Follow the installation guide to authenticate the private registry with your HEROUI_PERSONAL_TOKEN, install heroui-native-pro, and wire up HeroUINativeProvider.
Update to the latest version:
npm install heroui-native-pro@latestpnpm add heroui-native-pro@latestyarn add heroui-native-pro@latestbun add heroui-native-pro@latestIf your app renders charts, install the chart peers:
npx expo install react-native-skia d3-scale d3-shape d3-zoom its-fine react-fast-comparenpx heroui-pro install offers any missing optional peers for you. Apps that never render a chart can skip all six packages.
d3-scale, d3-shape, d3-zoom, its-fine, and react-fast-compare move from dependencies to optional peers, so charts resolve them from your app instead of failing after install (#101).CartesianChart and PolarChart check the peers when they render and throw one install hint that lists every missing package, next to the existing react-native-skia check (#101).d3-shape no longer crash at startup. The curve map used to be built when the module loaded, even in apps that never render a chart. It is now built on first use (#101).The optional peers load through try/require, which relies on Expo Metro's allowOptionalDependencies: true. Bare React Native apps have the same limit as the existing react-native-skia, react-native-pager-view, and react-native-screens loaders.
heroui-native stays at ^1.0.11.
Thanks to @VladyslavMartynov10 for shipping the chart engine packages as optional peers (#101).