- Add showNumbers prop with 'never', 'always', 'toggleable' modes for layout optimization - Fix SVG height calculation to eliminate extra space when showNumbers='never' - Reposition NumberFlow components within SVG bounds to prevent overflow - Add colored borders to size comparison story for visual clarity - Restore keyboard editing functionality for NumberFlow components - Maintain NumberFlow requirement while ensuring proper layout constraints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
807 B
TypeScript
34 lines
807 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
name: 'AbacusReact',
|
|
formats: ['es', 'cjs'],
|
|
fileName: (format) => `index.${format}.js`
|
|
},
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
external: [
|
|
'react',
|
|
'react-dom',
|
|
'@react-spring/web',
|
|
'@use-gesture/react',
|
|
'@number-flow/react'
|
|
],
|
|
output: {
|
|
globals: {
|
|
react: 'React',
|
|
'react-dom': 'ReactDOM',
|
|
'@react-spring/web': 'ReactSpring',
|
|
'@use-gesture/react': 'UseGesture',
|
|
'@number-flow/react': 'NumberFlow'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}); |