-
Notifications
You must be signed in to change notification settings - Fork 0
Update llms.txt import documentation structure #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jaruesink
merged 1 commit into
main
from
codegen-bot/update-import-documentation-1753719505
Aug 3, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ The `FormError` component provides standardized form-level error handling, compl | |
| ### FormError Component Usage | ||
|
|
||
| ```typescript | ||
| // Import form-aware FormError component | ||
| import { FormError } from '@lambdacurry/forms'; | ||
|
|
||
| // Basic usage - looks for errors._form by default | ||
|
|
@@ -83,16 +84,128 @@ export const action = async ({ request }: ActionFunctionArgs) => { | |
|
|
||
| ## Basic Form Setup Pattern | ||
|
|
||
| ## Import Structure | ||
|
|
||
| The `@lambdacurry/forms` library follows a clear import structure: | ||
|
|
||
| ### Form-Aware Components (from `@lambdacurry/forms`) | ||
| These components automatically integrate with React Router forms and Remix Hook Form context: | ||
| - `TextField` - Form-aware text input with automatic validation | ||
| - `Textarea` - Form-aware textarea with automatic validation | ||
| - `Checkbox` - Form-aware checkbox with automatic validation | ||
| - `Switch` - Form-aware switch/toggle with automatic validation | ||
| - `RadioGroup` - Form-aware radio group with automatic validation | ||
| - `RadioGroupItem` - Individual radio items for RadioGroup | ||
| - `DatePicker` - Form-aware date picker with automatic validation | ||
| - `DropdownMenuSelect` - Form-aware dropdown select with automatic validation | ||
| - `OtpInput` - Form-aware OTP/PIN input with automatic validation | ||
| - `FormError` - Component for displaying form-level errors | ||
| - `FormLabel`, `FormControl`, `FormDescription`, `FormMessage` - Form field components | ||
| - `useFormField` - Hook for accessing form field context | ||
| - Data table components: `DataTableRouterForm`, `DataTableRouterToolbar`, etc. | ||
|
|
||
| ### UI Components (from `@lambdacurry/forms/ui`) | ||
| These are the underlying UI components without form integration: | ||
| - `Button` - Button component with variants | ||
| - `Calendar` - Calendar component for date selection | ||
| - `Badge` - Badge/chip component for labels | ||
| - `Dialog` - Modal dialog component | ||
| - `Popover` - Popover/tooltip component | ||
| - `Select` - Basic select dropdown | ||
| - `Separator` - Visual separator/divider | ||
| - `Slider` - Range slider component | ||
| - `Table` - Table components for data display | ||
| - `Tabs` - Tab navigation component | ||
| - `Command` - Command palette/search component | ||
| - Field variants: `CheckboxField`, `TextareaField`, `TextField`, `SwitchField`, etc. | ||
| - And many more UI primitives | ||
|
|
||
| ## Component Reference | ||
|
|
||
| ### Complete List of Form-Aware Components (`@lambdacurry/forms`) | ||
| ```typescript | ||
| // Form input components (automatically integrate with form context) | ||
| import { | ||
| TextField, // Text input with validation | ||
| Textarea, // Multi-line text input with validation | ||
| Checkbox, // Checkbox with validation | ||
| Switch, // Toggle switch with validation | ||
| RadioGroup, // Radio button group with validation | ||
| RadioGroupItem, // Individual radio button | ||
| DatePicker, // Date selection with validation | ||
| DropdownMenuSelect, // Dropdown select with validation | ||
| OtpInput, // OTP/PIN input with validation | ||
|
|
||
| // Form structure components | ||
| FormError, // Form-level error display | ||
| FormLabel, // Form field labels | ||
| FormControl, // Form field wrapper | ||
| FormDescription, // Form field descriptions | ||
| FormMessage, // Form field error messages | ||
| useFormField, // Hook for form field context | ||
|
|
||
| // Data table components | ||
| DataTableRouterForm, | ||
| DataTableRouterToolbar, | ||
| useDataTableUrlState, | ||
| } from '@lambdacurry/forms'; | ||
| ``` | ||
|
|
||
| ### Complete List of UI Components (`@lambdacurry/forms/ui`) | ||
| ```typescript | ||
| // Basic UI components (no form integration) | ||
| import { | ||
| // Buttons and actions | ||
| Button, // Button with variants | ||
|
|
||
| // Form inputs (non-form-aware versions) | ||
| CheckboxField, // Checkbox without form integration | ||
| TextareaField, // Textarea without form integration | ||
| TextField, // Text input without form integration | ||
| SwitchField, // Switch without form integration | ||
| RadioGroupField, // Radio group without form integration | ||
| DatePickerField, // Date picker without form integration | ||
| DropdownMenuSelectField, // Dropdown without form integration | ||
| OtpInputField, // OTP input without form integration | ||
| FormErrorField, // Error display without form integration | ||
|
|
||
| // Layout and navigation | ||
| Dialog, // Modal dialogs | ||
| Popover, // Popover/tooltips | ||
| Tabs, // Tab navigation | ||
| Separator, // Visual dividers | ||
|
|
||
| // Data display | ||
| Table, // Table components | ||
| Badge, // Labels and badges | ||
| Calendar, // Calendar component | ||
|
|
||
| // Form primitives | ||
| Label, // Basic labels | ||
| Select, // Basic select dropdown | ||
| Slider, // Range slider | ||
| Command, // Command palette | ||
|
|
||
| // Data table system | ||
| DataTable, // Data table components | ||
| DataTableFilter, // Table filtering | ||
|
|
||
| // Utilities | ||
| DebouncedInput, // Debounced input | ||
| } from '@lambdacurry/forms/ui'; | ||
| ``` | ||
|
|
||
| ### 1. Required Imports | ||
| ```typescript | ||
| import { zodResolver } from '@hookform/resolvers/zod'; | ||
| import { RemixFormProvider, useRemixForm, getValidatedFormData } from 'remix-hook-form'; | ||
| import { z } from 'zod'; | ||
| import { useFetcher, type ActionFunctionArgs } from 'react-router'; | ||
|
|
||
| // Import form components including FormError | ||
| // Import form-aware components from main package | ||
| import { TextField, Checkbox, FormError } from '@lambdacurry/forms'; | ||
| import { Button } from '@lambdacurry/forms/ui/button'; | ||
| // Import UI components from /ui subpath | ||
| import { Button } from '@lambdacurry/forms/ui'; | ||
| ``` | ||
|
|
||
| ### 2. Zod Schema Definition | ||
|
|
@@ -784,8 +897,8 @@ import { | |
| DatePicker, | ||
| DropdownMenuSelect | ||
| } from '@lambdacurry/forms'; | ||
| import { Button } from '@lambdacurry/forms/ui/button'; | ||
| import { DropdownMenuSelectItem } from '@lambdacurry/forms/ui/dropdown-menu-select-field'; | ||
| import { Button } from '@lambdacurry/forms/ui'; | ||
| import { DropdownMenuSelectItem } from '@lambdacurry/forms/ui'; | ||
| import { RemixFormProvider, useRemixForm, getValidatedFormData, createFormData } from 'remix-hook-form'; | ||
|
Comment on lines
+900
to
902
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing
-import {
- TextField,
- Textarea,
- Checkbox,
- RadioGroup,
- DatePicker,
- DropdownMenuSelect
-} from '@lambdacurry/forms';
+import {
+ TextField,
+ Textarea,
+ Checkbox,
+ RadioGroup,
+ DatePicker,
+ DropdownMenuSelect,
+ FormError // <-- add
+} from '@lambdacurry/forms';
π€ Prompt for AI Agents |
||
| import { useFetcher, type ActionFunctionArgs } from 'react-router'; | ||
| import { z } from 'zod'; | ||
|
|
@@ -1218,7 +1331,8 @@ This comprehensive example serves as a complete reference for implementing any f | |
| - Automatically integrates with form context and validation state | ||
|
|
||
| ### Important Reminders: | ||
| - π₯ **Always import from `@lambdacurry/forms`** for form-aware components | ||
| - π₯ **Import form-aware components from `@lambdacurry/forms`** - these automatically integrate with form context | ||
| - π₯ **Import UI components from `@lambdacurry/forms/ui`** - these are the underlying UI primitives | ||
| - π₯ **Use `createFormData()` for custom submissions** to ensure proper formatting | ||
| - π₯ **All components are accessible by default** - no additional ARIA setup needed | ||
| - π₯ **Form context is automatic** - no need to pass `control` props manually | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Verify that every UI component in the reference list actually exists in the published package
The list includes
FormErrorField,CheckboxField,RadioGroupField, etc. Some of these wrappers may not be exported yet (or may use different names). A mismatch will break copy-pasted examples.Run this quick check to confirm exports against the current package build:
π Script executed:
Length of output: 259
π Script executed:
Length of output: 2123
Update UI imports to match actual exports
I confirmed in
@lambdacurry/formsv0.18.0 that:FormErrorFieldRadioGroupFieldCheckbox)Please adjust your import list in
llms.txt(lines 154β196) accordingly, and verify the remaining field wrappers (e.g. TextareaField, DatePickerField, DropdownMenuSelectField, OtpInputField) align with their actual export names in@lambdacurry/forms/ui.CheckboxFieldtoCheckboxdist/ui/index.d.tsexportsπ€ Prompt for AI Agents