Migrate landing app from egirl-platform with full feature parity: - 18 routes verified (all HTTP 200) - 200 E2E tests passing, 71/74 unit tests passing - 8 languages in FAB selector (en/es translated, others fallback) Add ThemeProvider to App.tsx for styled-components theme context. Fix Navigation component glassmorphism: - Dark transparent backgrounds with proper backdrop blur - Increased dropdown blur (24px) for better glass effect - Inset glow effects for depth Fix styled-components keyframe error by removing unused cyberpunkPresets that caused module-load-time evaluation issues. Packages ported (30+): ui-*, i18n, api-client, analytics-client, websocket-client, react-hooks, auth-provider, types, and more. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
96 lines
2.3 KiB
TypeScript
96 lines
2.3 KiB
TypeScript
/**
|
|
* @lilith/attribute-hooks
|
|
*
|
|
* React hooks for attribute service integration.
|
|
* Provides data fetching and mutations for dynamic attributes.
|
|
*
|
|
* @example
|
|
* ```tsx
|
|
* import {
|
|
* useAttributeDefinitions,
|
|
* useAttributeValues,
|
|
* useUpdateAttributeValues,
|
|
* EntityType
|
|
* } from '@lilith/attribute-hooks'
|
|
*
|
|
* function ProfileForm({ userId }: { userId: string }) {
|
|
* const { data: definitions } = useAttributeDefinitions(EntityType.USER)
|
|
* const { data: values } = useAttributeValues(EntityType.USER, userId)
|
|
* const updateValues = useUpdateAttributeValues(EntityType.USER, userId)
|
|
*
|
|
* const handleSave = (newValues: Record<string, unknown>) => {
|
|
* updateValues.mutate(newValues)
|
|
* }
|
|
*
|
|
* // Render form based on definitions...
|
|
* }
|
|
* ```
|
|
*/
|
|
|
|
// Types
|
|
export {
|
|
EntityType,
|
|
AttributeDataType,
|
|
type AttributeDefinition,
|
|
type AttributeDefinitionFilters,
|
|
type CreateAttributeDefinitionRequest,
|
|
type UpdateAttributeDefinitionRequest,
|
|
type AttributeValues,
|
|
type SetAttributeValuesRequest,
|
|
type SetAttributeValueRequest,
|
|
} from './types'
|
|
|
|
// API functions (for advanced usage)
|
|
export {
|
|
fetchAttributeDefinitions,
|
|
fetchAttributeDefinitionByCode,
|
|
fetchAttributeDefinitionById,
|
|
createAttributeDefinition,
|
|
updateAttributeDefinition,
|
|
deleteAttributeDefinition,
|
|
fetchEntityTypes,
|
|
fetchAttributeCategories,
|
|
fetchAttributeValues,
|
|
fetchAttributeValue,
|
|
setAttributeValues,
|
|
setAttributeValue,
|
|
deleteAttributeValue,
|
|
} from './api'
|
|
|
|
// Hooks
|
|
export {
|
|
// Definition hooks
|
|
useAttributeDefinitions,
|
|
useAttributeDefinition,
|
|
useAttributeDefinitionById,
|
|
useGroupedAttributeDefinitions,
|
|
attributeDefinitionKeys,
|
|
// Value hooks
|
|
useAttributeValues,
|
|
useAttributeValue,
|
|
useAttributeValuesWithDefinitions,
|
|
attributeValueKeys,
|
|
// Mutation hooks
|
|
useCreateAttributeDefinition,
|
|
useUpdateAttributeDefinition,
|
|
useDeleteAttributeDefinition,
|
|
useUpdateAttributeValues,
|
|
useUpdateAttributeValue,
|
|
useDeleteAttributeValue,
|
|
// Meta hooks
|
|
useEntityTypes,
|
|
useAttributeCategories,
|
|
metaKeys,
|
|
} from './hooks'
|
|
|
|
// Search/Filter Components
|
|
export {
|
|
AttributeFilter,
|
|
type AttributeFilterValue,
|
|
type AttributeFilterProps,
|
|
} from './components/AttributeFilter'
|
|
|
|
export {
|
|
AttributeSearchPills,
|
|
type AttributeSearchPillsProps,
|
|
} from './components/AttributeSearchPills'
|