pxengine 0.1.7 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +79 -122
  2. package/dist/index.cjs +35589 -8229
  3. package/dist/index.d.cts +574 -33
  4. package/dist/index.d.ts +574 -33
  5. package/dist/index.js +35540 -8199
  6. package/dist/registry.json +1776 -113
  7. package/package.json +1 -1
  8. package/src/atoms/BadgeAtom.tsx +11 -3
  9. package/src/atoms/ButtonAtom.tsx +2 -2
  10. package/src/atoms/CalendarAtom.tsx +1 -1
  11. package/src/atoms/CardAtom.tsx +1 -1
  12. package/src/atoms/ChartAtom.tsx +190 -0
  13. package/src/atoms/CheckboxAtom.tsx +33 -0
  14. package/src/atoms/ContextMenuAtom.tsx +49 -0
  15. package/src/atoms/DrawerAtom.tsx +49 -0
  16. package/src/atoms/DropdownMenuAtom.tsx +49 -0
  17. package/src/atoms/FormInputAtom.tsx +6 -2
  18. package/src/atoms/FormSelectAtom.tsx +7 -3
  19. package/src/atoms/FormTextareaAtom.tsx +7 -3
  20. package/src/atoms/InputAtom.tsx +49 -23
  21. package/src/atoms/InputOTPAtom.tsx +49 -0
  22. package/src/atoms/KbdAtom.tsx +25 -0
  23. package/src/atoms/LabelAtom.tsx +23 -0
  24. package/src/atoms/RadioGroupAtom.tsx +31 -0
  25. package/src/atoms/RatingAtom.tsx +37 -0
  26. package/src/atoms/ResizableAtom.tsx +51 -0
  27. package/src/atoms/SliderAtom.tsx +32 -0
  28. package/src/atoms/SwitchAtom.tsx +32 -0
  29. package/src/atoms/TextareaAtom.tsx +42 -0
  30. package/src/atoms/TimelineAtom.tsx +77 -0
  31. package/src/atoms/ToggleAtom.tsx +36 -0
  32. package/src/atoms/VideoAtom.tsx +34 -0
  33. package/src/atoms/index.ts +17 -0
  34. package/src/components/ui/resizable.tsx +5 -6
  35. package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +44 -0
  36. package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +1 -0
  37. package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +50 -0
  38. package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +1 -0
  39. package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +36 -0
  40. package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +1 -0
  41. package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +41 -0
  42. package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +1 -0
  43. package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +77 -0
  44. package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +1 -0
  45. package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +104 -0
  46. package/src/molecules/creator-discovery/CreatorGridCard/index.ts +1 -0
  47. package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +65 -0
  48. package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +1 -0
  49. package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +58 -0
  50. package/src/molecules/creator-discovery/GrowthChartCard/index.ts +1 -0
  51. package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +72 -0
  52. package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +1 -0
  53. package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +49 -0
  54. package/src/molecules/creator-discovery/TopPostsGrid/index.ts +1 -0
  55. package/src/molecules/creator-discovery/index.ts +10 -0
  56. package/src/molecules/generic/DataGrid/DataGrid.tsx +102 -0
  57. package/src/molecules/generic/DataGrid/index.ts +1 -0
  58. package/src/molecules/generic/EmptyState/EmptyState.tsx +61 -0
  59. package/src/molecules/generic/EmptyState/index.ts +1 -0
  60. package/src/molecules/generic/FileUpload/FileUpload.tsx +62 -0
  61. package/src/molecules/generic/FileUpload/index.ts +1 -0
  62. package/src/molecules/generic/FilterBar/FilterBar.tsx +54 -0
  63. package/src/molecules/generic/FilterBar/index.ts +1 -0
  64. package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +39 -0
  65. package/src/molecules/generic/LoadingOverlay/index.ts +1 -0
  66. package/src/molecules/generic/NotificationList/NotificationList.tsx +80 -0
  67. package/src/molecules/generic/NotificationList/index.ts +1 -0
  68. package/src/molecules/generic/StatsGrid/StatsGrid.tsx +80 -0
  69. package/src/molecules/generic/StatsGrid/index.ts +1 -0
  70. package/src/molecules/generic/StepWizard/StepWizard.tsx +67 -0
  71. package/src/molecules/generic/StepWizard/index.ts +1 -0
  72. package/src/molecules/generic/TagCloud/TagCloud.tsx +32 -0
  73. package/src/molecules/generic/TagCloud/index.ts +1 -0
  74. package/src/molecules/generic/index.ts +9 -0
  75. package/src/render/PXEngineRenderer.tsx +27 -5
  76. package/src/types/atoms.ts +150 -2
  77. package/src/types/molecules.ts +226 -1
package/README.md CHANGED
@@ -2,29 +2,19 @@
2
2
 
3
3
  > **Shadcn-based UI component library for agent-driven interfaces**
4
4
 
5
- A standalone UI component library built on top of shadcn/ui, designed specifically for agent-driven user interfaces. Components follow Atomic Design principles and are distributed via copy-paste (shadcn-style).
5
+ A premium UI component library built on top of shadcn/ui, designed specifically for agent-driven user interfaces and creator discovery platforms. Components follow Atomic Design principles and are optimized for schema-driven rendering.
6
6
 
7
7
  ---
8
8
 
9
9
  ## Overview
10
10
 
11
- `@pxengine-ui` is a component library that:
11
+ `@pxengine-ui` provides a robust foundation for building modern dashboard and AI-integrated applications:
12
12
 
13
- - **Builds on shadcn/ui** - Uses shadcn components as atoms (base layer)
14
- - **Follows Atomic Design** - Atoms (shadcn) Molecules Organisms
15
- - **Agent-First** - Designed for schema-driven, agent-generated UIs
16
- - **Copy-Paste Distribution** - Like shadcn, components are copied into your project
17
- - **TypeScript-First** - Full type safety across the stack
18
- - **Theme-Aware** - Inherits from your existing theme system
19
-
20
- ---
21
-
22
- ## Documentation
23
-
24
- - **[Architecture](./docs/architecture.md)** - System design, folder structure, design decisions
25
- - **[Conventions](./docs/conventions.md)** - Naming, coding standards, best practices
26
- - **[Getting Started](./docs/getting-started.md)** - Setup and usage guide
27
- - **[Component Catalog](./docs/component-catalog.md)** - Visual reference for all components
13
+ - **Built on shadcn/ui** - Industry-standard base layer using Radix UI primitives.
14
+ - **Vibrant & Premium** - Custom design system with glassmorphism, smooth gradients, and rich micro-interactions.
15
+ - **Agent-First** - Fully schema-driven atoms ready for AI generation.
16
+ - **Atomic Design** - 40+ Atoms and 18+ Composed Molecules.
17
+ - **Zero Configuration** - Inherits Tailwind config and CSS variables from the host application.
28
18
 
29
19
  ---
30
20
 
@@ -32,144 +22,111 @@ A standalone UI component library built on top of shadcn/ui, designed specifical
32
22
 
33
23
  ```
34
24
  @pxengine-ui/
35
- ├── docs/ # Documentation
36
25
  ├── src/
37
- │ ├── atoms/ # Shadcn components (base layer)
38
- │ ├── molecules/ # Composed components
39
- │ │ ├── creator-discovery/ # Domain-specific
40
- │ │ └── generic/ # Reusable
41
- │ ├── lib/ # Utilities
42
- ├── types/ # Shared types
43
- └── index.ts
44
- ├── config/ # Tailwind preset, tsconfig
45
- └── package.json
26
+ │ ├── atoms/ # Foundation UI (Button, Input, Slider, etc.)
27
+ │ ├── molecules/ # Composed Patterns
28
+ │ │ ├── generic/ # Cross-domain dashboard widgets
29
+ │ │ └── creator-discovery/ # Niche-specific for creator search
30
+ │ ├── types/ # Schema & Component definitions
31
+ └── lib/ # Shared utilities
32
+ └── dist/ # Compiled assets & Registry
46
33
  ```
47
34
 
48
35
  ---
49
36
 
50
- ## Component Hierarchy
37
+ ## Component Catalog
51
38
 
52
- ### **Atoms** (Shadcn Components)
39
+ ### Atoms (Foundation Primitives)
53
40
 
54
- Base UI primitives from shadcn/ui:
41
+ 40+ accessible atoms wrapping Radix-based shadcn components:
55
42
 
56
- - Button, Input, Label, Checkbox, Select, Slider, Card, etc.
57
- - Fully accessible (Radix UI primitives)
58
- - Styled with Tailwind CSS
43
+ - **Forms**: Input, Checkbox, RadioGroup, Select, Switch, Slider, Textarea, Toggle.
44
+ - **Navigation**: DropdownMenu, ContextMenu, Pagination, Breadcrumb, Tabs, Command.
45
+ - **Overlay**: Dialog, AlertDialog, Drawer, Sheet, Popover, Tooltip.
46
+ - **Display**: Card, Badge, Avatar, Accordion, AspectRatio, Skeleton, Separator, Progress.
47
+ - **Specialized**: Resizable Panels, InputOTP, Kbd (Keyboard shortcuts).
59
48
 
60
- ### **Molecules** (Composed Components)
49
+ ### Molecules (High-Level Patterns)
61
50
 
62
- Built by combining atoms:
51
+ #### Generic Dashboard
63
52
 
64
- - **Creator Discovery**: CampaignSeedCard, SearchSpecCard, MCQRenderer
65
- - **Generic**: EditableField, FormCard, ActionButton
53
+ - **StatsGrid**: Data visualization with trends & icons.
54
+ - **EmptyState**: Premium placeholder for empty results.
55
+ - **LoadingOverlay**: Glassmorphism backdrop with progress.
56
+ - **FilterBar**: Search + Multi-chip filtering.
57
+ - **FileUpload**: Drag-and-drop zone.
58
+ - **TagCloud**: Interactive interest clusters.
59
+ - **FormCard**: Schema-driven editable forms.
66
60
 
67
- ### **Organisms** (Complex Sections)
61
+ #### Creator Discovery
68
62
 
69
- Full UI sections (future):
70
-
71
- - CreatorSearchWorkflow, CampaignBuilder, etc.
63
+ - **CreatorGridCard**: Detailed discovery card with banner and metrics.
64
+ - **AudienceMetricCard**: Specialized progress-based demographics.
65
+ - **BrandAffinityGroup**: Visual recently associated brand logos.
66
+ - **ContentPreviewGallery**: Video/Image thumbnail grids.
67
+ - **CreatorProfileSummary**: Compact info row for list views.
68
+ - **PlatformIconGroup**: Social platform reach summary.
69
+ - **SearchSpecCard**: Advanced filter criteria summary.
72
70
 
73
71
  ---
74
72
 
75
- ## Quick Start
76
-
77
- ### 1. Install Dependencies
78
-
79
- ```bash
80
- cd @pxengine-ui
81
- npm install
82
- ```
73
+ ## Usage
83
74
 
84
- ### 2. Copy a Component
75
+ ### Registry-Driven Rendering
85
76
 
86
- ```bash
87
- # Copy shadcn button atom
88
- npx shadcn-ui@latest add button
77
+ The library generates a `registry.json` that includes component metadata and schemas, allowing agents to understand what they can render.
89
78
 
90
- # Copy a molecule (future CLI)
91
- npx pxengine-ui add campaign-seed-card
79
+ ```tsx
80
+ import { PXEngineRenderer } from "@/components/PXEngineRenderer";
81
+
82
+ const schema = {
83
+ type: "stats-grid",
84
+ items: [
85
+ {
86
+ label: "Total Reach",
87
+ value: "1.2M",
88
+ trend: "+12%",
89
+ trendDirection: "up",
90
+ },
91
+ ],
92
+ };
93
+
94
+ return <PXEngineRenderer schema={schema} />;
92
95
  ```
93
96
 
94
- ### 3. Use in Your App
97
+ ### Direct Component Import
98
+
99
+ All components are exported for standard React usage:
95
100
 
96
101
  ```tsx
97
- import { CampaignSeedCard } from "@/components/pxengine-ui/molecules/CampaignSeedCard";
102
+ import { CreatorGridCard } from "pxengine";
98
103
 
99
- <CampaignSeedCard
100
- data={campaignSeed}
101
- sessionId="abc123"
102
- onProceed={() => handleProceed()}
104
+ <CreatorGridCard
105
+ name="Jane Doe"
106
+ handle="janedoe"
107
+ metrics={[{ label: "Followers", value: "500K" }]}
108
+ platforms={["Instagram", "TikTok"]}
103
109
  />;
104
110
  ```
105
111
 
106
112
  ---
107
113
 
108
- ## Distribution Strategy
109
-
110
- **Shadcn-Style Copy-Paste**:
111
-
112
- 1. Components live in `@pxengine-ui/src/`
113
- 2. Copy components into `client/components/pxengine-ui/` when needed
114
- 3. Modify copied components freely
115
- 4. Library serves as source of truth for updates
116
-
117
- **Benefits**:
118
-
119
- - Full ownership and customization
120
- - No version conflicts
121
- - Tree-shaking (only copy what you need)
122
- - Easy to debug
123
-
124
- ---
125
-
126
- ## Theme System
114
+ ## Design System
127
115
 
128
- The library inherits your existing theme:
116
+ The library uses a specific high-end aesthetic:
129
117
 
130
- - Uses CSS variables from client
131
- - Tailwind preset extends client config
132
- - Dark mode support via `class` strategy
133
-
134
- ---
135
-
136
- ## Component Examples
137
-
138
- ### CampaignSeedCard
139
-
140
- ```tsx
141
- <CampaignSeedCard
142
- data={{
143
- brand: "Nike",
144
- objective: "Brand Awareness",
145
- budget_hint: { min: 50000, max: 100000 },
146
- }}
147
- sessionId="abc123"
148
- onProceed={() => handleProceed()}
149
- isLatestMessage={true}
150
- />
151
- ```
152
-
153
- ### EditableField
154
-
155
- ```tsx
156
- <EditableField
157
- label="Brand Name"
158
- value={brandName}
159
- type="text"
160
- isEditing={isEditing}
161
- onSave={(newValue) => handleSave(newValue)}
162
- />
163
- ```
118
+ - **Colors**: Indigo, Purple, and Slate primary hues.
119
+ - **Border Radius**: Generous `rounded-3xl` and `rounded-[32px]` for major components.
120
+ - **Backdrop**: Heavy use of `backdrop-blur-md` and `bg-white/60`.
121
+ - **Shadows**: Subtle, layered soft shadows for depth.
164
122
 
165
123
  ---
166
124
 
167
125
  ## Tech Stack
168
126
 
169
- - **React** 18+ with TypeScript
170
- - **Shadcn/ui** for base components (atoms)
171
- - **Radix UI** for accessibility primitives
172
- - **Tailwind CSS** for styling
173
- - **Framer Motion** for animations (optional)
174
-
175
- ---
127
+ - **Framework**: React 18+ (Vite/tsup build)
128
+ - **Styling**: Tailwind CSS + `class-variance-authority`
129
+ - **Primitives**: Radix UI
130
+ - **Animations**: Framer Motion
131
+ - **Icons**: Lucide React
132
+ - **Data**: Recharts / Zod