feat(05-02): install dnd-kit and create FieldPlacer component
- Install @dnd-kit/core@^6.3.1 and @dnd-kit/utilities@^3.2.2 - Create FieldPlacer.tsx with DndContext, draggable palette token, droppable PDF zone - Implements Y-flip coordinate conversion (screenToPdfCoords / pdfToScreenCoords) - Fetches existing fields from GET /api/documents/[id]/fields on mount - Persists fields via PUT /api/documents/[id]/fields on every add/remove - Renders placed fields as absolute-positioned blue-bordered overlays with remove button - Default field size: 144x36 PDF points (2in x 0.5in at 72 DPI)
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@cantoo/pdf-lib": "^2.6.3",
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@vercel/blob": "^2.3.1",
|
||||
"adm-zip": "^0.5.16",
|
||||
"bcryptjs": "^3.0.3",
|
||||
|
||||
Reference in New Issue
Block a user