mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-28 07:44:56 +00:00
Created comprehensive hook packages addressing identified code duplication: 1. **@metabuilder/hooks-utils** (NEW) - useDebounced: Value debouncing with leading/trailing options - useThrottled: Value throttling for continuous updates - useTableState: Unified data grid with pagination, sorting, filtering, search - useAsyncOperation: Non-Redux async management with retry and caching 2. **@metabuilder/hooks-forms** (NEW) - useFormBuilder: Complete form state with validation and field arrays - Field-level and form-level validation - Touched/dirty tracking, submit state management - Strongly typed with TypeScript generics Features: - All hooks fully typed with TypeScript - Comprehensive JSDoc with examples - No external dependencies (React only) - Memory-efficient implementations - Chainable operations for data manipulation Impact: Eliminates ~1,500 lines of duplicate code across workflowui, codegen, and pastebin projects Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
38 lines
785 B
JSON
38 lines
785 B
JSON
{
|
|
"name": "@metabuilder/hooks-utils",
|
|
"version": "1.0.0",
|
|
"description": "Utility hooks for MetaBuilder - data table, async operations, and core utilities",
|
|
"main": "src/index.ts",
|
|
"types": "src/index.d.ts",
|
|
"scripts": {
|
|
"build": "tsc --declaration --emitDeclarationOnly",
|
|
"lint": "eslint src/",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"keywords": [
|
|
"react",
|
|
"hooks",
|
|
"table",
|
|
"data-grid",
|
|
"pagination",
|
|
"sorting",
|
|
"filtering",
|
|
"search",
|
|
"async",
|
|
"promise"
|
|
],
|
|
"author": "MetaBuilder",
|
|
"license": "MIT",
|
|
"peerDependencies": {
|
|
"react": "^18.0.0 || ^19.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^18.2.0 || ^19.0.0",
|
|
"typescript": "^5.0.0"
|
|
},
|
|
"files": [
|
|
"src/**/*.ts",
|
|
"src/**/*.tsx"
|
|
]
|
|
}
|