Files
temetro/.agents/skills/ai-elements/references/node.md
T
Khalid Abdi 929bec8f31 feat: AI-added records save with placeholders + "Added by AI" provenance
Stop blocking AI imports/proposals on missing non-critical fields. Records
the chat agent drafts now save with safe placeholders, auto-generated file
numbers, and a source="ai" marker that surfaces an "Added by AI" badge so a
clinician can review/edit them later.

Backend:
- add `source` (manual|ai) column to patients/appointments/prescriptions
  (migration 0014) + canonical types, services, validation schemas
- relax patient/appointment validation: empty file number allowed, demographic
  + type/provider/initials fall back to placeholders (initials derived from name)
- patients.generateFileNumber() auto-assigns an MRN when one is missing
- proposeAppointment accepts a name when no file number resolves; AI commits +
  /api/ai/import stamp source="ai"

Frontend:
- `source` on Appointment/Patient/Prescription types; AI commits send source="ai"
- reusable <AiBadge> shown on the Patients table/detail and prescriptions list

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 19:27:17 +03:00

2.8 KiB

Node

A composable node component for React Flow-based canvases with Card-based styling.

The Node component provides a composable, Card-based node for React Flow canvases. It includes support for connection handles, structured layouts, and consistent styling using shadcn/ui components.

Installation

npx ai-elements@latest add node

Features

  • Built on shadcn/ui Card components for consistent styling
  • Automatic handle placement (left for target, right for source)
  • Composable sub-components (Header, Title, Description, Action, Content, Footer)
  • Semantic structure for organizing node information
  • Pre-styled sections with borders and backgrounds
  • Responsive sizing with fixed small width
  • Full TypeScript support with proper type definitions
  • Compatible with React Flow's node system

Props

<Node />

Prop Type Default Description
handles unknown - Configuration for connection handles. Target renders on the left, source on the right.
className string - Additional CSS classes to apply to the node.
...props ComponentProps<typeof Card> - Any other props are spread to the underlying Card component.

<NodeHeader />

Prop Type Default Description
className string - Additional CSS classes to apply to the header.
...props ComponentProps<typeof CardHeader> - Any other props are spread to the underlying CardHeader component.

<NodeTitle />

Prop Type Default Description
...props ComponentProps<typeof CardTitle> - Any other props are spread to the underlying CardTitle component.

<NodeDescription />

Prop Type Default Description
...props ComponentProps<typeof CardDescription> - Any other props are spread to the underlying CardDescription component.

<NodeAction />

Prop Type Default Description
...props ComponentProps<typeof CardAction> - Any other props are spread to the underlying CardAction component.

<NodeContent />

Prop Type Default Description
className string - Additional CSS classes to apply to the content.
...props ComponentProps<typeof CardContent> - Any other props are spread to the underlying CardContent component.

<NodeFooter />

Prop Type Default Description
className string - Additional CSS classes to apply to the footer.
...props ComponentProps<typeof CardFooter> - Any other props are spread to the underlying CardFooter component.