v1.1.7 — Bundle size optimisations & refactoring
What's Changed
Performance
- Tree-shaking — added
"sideEffects": falseto all four packages; bundlers can now safely drop unused modules - Component category sub-exports — 12 new granular entry points (
termui/components/layout,/typography,/input, etc.) for importing only what you need - BigText font encoding — replaced verbose nested arrays with packed 3-bit row integers; font data is ~60% smaller before gzip
Build
tsconfig.build.json— new production tsconfig eliminating ~232 unnecessary.d.ts.mapfiles from published dist- Adapter sourcemaps removed — corrected
packages/adapters/tsup.config.tsto match the rest of the build "files"field added topackages/core,packages/components, andpackages/cli— npm now only publishesdist/andREADME.md
Refactoring
- QRCode encoder extracted to
utility/qrEncoder.ts— ~420 lines of pure GF(256)/Reed-Solomon/matrix logic separated from the React component; GF lookup tables are now lazy-initialised - Shared chart utilities —
normalize,clamp,padEnd,padStartextracted tocharts/utils.ts; used byLineChart,Sparkline,Gauge, andBarChart - Shared time formatters —
formatElapsedandformatTimeextracted toutility/formatters.ts; used byStopwatchandTimer
Installation
npm install termui
# or
npx termui initFull changelog: https://github.com/Arindam200/termui/blob/main/CHANGELOG.md