feat: add AI field auto-placement with canvas registry

This commit is contained in:
Ephraim Atta-Duncan
2025-10-29 23:03:58 +00:00
parent 94098bd762
commit 29be66a844
7 changed files with 623 additions and 279 deletions

View File

@ -0,0 +1,19 @@
/**
* Shared constants for field dimension enforcement.
*
* These constants ensure consistency between:
* 1. AI prompt (server/api/ai.ts) - instructs Gemini on minimum field dimensions
* 2. Client enforcement (envelope-editor-fields-page.tsx) - fallback validation
*/
/**
* Minimum field height in pixels.
* Fields smaller than this will be expanded to meet minimum usability requirements.
*/
export const MIN_FIELD_HEIGHT_PX = 30;
/**
* Minimum field width in pixels.
* Fields smaller than this will be expanded to meet minimum usability requirements.
*/
export const MIN_FIELD_WIDTH_PX = 36;