@majkapp/plugin-kit 3.3.4 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/docs/HOOKS.md +5 -0
- package/docs/INDEX.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -605,6 +605,10 @@ const plugin = definePlugin('my-plugin', 'My Plugin', '1.0.0');
|
|
|
605
605
|
|
|
606
606
|
## Troubleshooting
|
|
607
607
|
|
|
608
|
+
### Client Generation Warnings
|
|
609
|
+
|
|
610
|
+
After running `npm run build`, check `ui/src/generated/generation.log` for schema optimization warnings. The generator analyzes your function input schemas and provides actionable suggestions for improving hook performance (e.g., flattening nested structures, reducing large objects).
|
|
611
|
+
|
|
608
612
|
### "React app not built"
|
|
609
613
|
|
|
610
614
|
```
|
package/docs/HOOKS.md
CHANGED
|
@@ -524,6 +524,11 @@ Generated files (DO NOT EDIT manually):
|
|
|
524
524
|
- `ui/src/generated/client.ts` - RPC client
|
|
525
525
|
- `ui/src/generated/types.ts` - TypeScript types
|
|
526
526
|
- `ui/src/generated/index.ts` - Barrel export
|
|
527
|
+
- `ui/src/generated/generation.log` - Build log with warnings
|
|
528
|
+
|
|
529
|
+
### Hook Performance Optimization
|
|
530
|
+
|
|
531
|
+
Generated hooks use **schema-driven dependency extraction** for optimal performance. Primitive fields (string, number, boolean) are tracked individually via `Object.is()` instead of expensive serialization. Check `generation.log` for dependency analysis and warnings about schema improvements.
|
|
527
532
|
|
|
528
533
|
## Next Steps
|
|
529
534
|
|
package/docs/INDEX.md
CHANGED
|
@@ -421,7 +421,7 @@ export class MockStorageService implements StorageService {
|
|
|
421
421
|
|
|
422
422
|
## React UI with Generated Hooks
|
|
423
423
|
|
|
424
|
-
The plugin-kit auto-generates React hooks from your functions.
|
|
424
|
+
The plugin-kit auto-generates **performance-optimized** React hooks from your functions. Dependencies are extracted from your input schemas for O(1) comparison instead of serialization. Review `ui/src/generated/generation.log` for optimization analysis and schema warnings.
|
|
425
425
|
|
|
426
426
|
```typescript
|
|
427
427
|
// ui/src/DashboardPage.tsx
|
package/package.json
CHANGED