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.
- package/README.md +79 -122
- package/dist/index.cjs +35589 -8229
- package/dist/index.d.cts +574 -33
- package/dist/index.d.ts +574 -33
- package/dist/index.js +35540 -8199
- package/dist/registry.json +1776 -113
- package/package.json +1 -1
- package/src/atoms/BadgeAtom.tsx +11 -3
- package/src/atoms/ButtonAtom.tsx +2 -2
- package/src/atoms/CalendarAtom.tsx +1 -1
- package/src/atoms/CardAtom.tsx +1 -1
- package/src/atoms/ChartAtom.tsx +190 -0
- package/src/atoms/CheckboxAtom.tsx +33 -0
- package/src/atoms/ContextMenuAtom.tsx +49 -0
- package/src/atoms/DrawerAtom.tsx +49 -0
- package/src/atoms/DropdownMenuAtom.tsx +49 -0
- package/src/atoms/FormInputAtom.tsx +6 -2
- package/src/atoms/FormSelectAtom.tsx +7 -3
- package/src/atoms/FormTextareaAtom.tsx +7 -3
- package/src/atoms/InputAtom.tsx +49 -23
- package/src/atoms/InputOTPAtom.tsx +49 -0
- package/src/atoms/KbdAtom.tsx +25 -0
- package/src/atoms/LabelAtom.tsx +23 -0
- package/src/atoms/RadioGroupAtom.tsx +31 -0
- package/src/atoms/RatingAtom.tsx +37 -0
- package/src/atoms/ResizableAtom.tsx +51 -0
- package/src/atoms/SliderAtom.tsx +32 -0
- package/src/atoms/SwitchAtom.tsx +32 -0
- package/src/atoms/TextareaAtom.tsx +42 -0
- package/src/atoms/TimelineAtom.tsx +77 -0
- package/src/atoms/ToggleAtom.tsx +36 -0
- package/src/atoms/VideoAtom.tsx +34 -0
- package/src/atoms/index.ts +17 -0
- package/src/components/ui/resizable.tsx +5 -6
- package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +44 -0
- package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +1 -0
- package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +50 -0
- package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +1 -0
- package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +36 -0
- package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +1 -0
- package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +41 -0
- package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +1 -0
- package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +77 -0
- package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +1 -0
- package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +104 -0
- package/src/molecules/creator-discovery/CreatorGridCard/index.ts +1 -0
- package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +65 -0
- package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +1 -0
- package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +58 -0
- package/src/molecules/creator-discovery/GrowthChartCard/index.ts +1 -0
- package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +72 -0
- package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +1 -0
- package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +49 -0
- package/src/molecules/creator-discovery/TopPostsGrid/index.ts +1 -0
- package/src/molecules/creator-discovery/index.ts +10 -0
- package/src/molecules/generic/DataGrid/DataGrid.tsx +102 -0
- package/src/molecules/generic/DataGrid/index.ts +1 -0
- package/src/molecules/generic/EmptyState/EmptyState.tsx +61 -0
- package/src/molecules/generic/EmptyState/index.ts +1 -0
- package/src/molecules/generic/FileUpload/FileUpload.tsx +62 -0
- package/src/molecules/generic/FileUpload/index.ts +1 -0
- package/src/molecules/generic/FilterBar/FilterBar.tsx +54 -0
- package/src/molecules/generic/FilterBar/index.ts +1 -0
- package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +39 -0
- package/src/molecules/generic/LoadingOverlay/index.ts +1 -0
- package/src/molecules/generic/NotificationList/NotificationList.tsx +80 -0
- package/src/molecules/generic/NotificationList/index.ts +1 -0
- package/src/molecules/generic/StatsGrid/StatsGrid.tsx +80 -0
- package/src/molecules/generic/StatsGrid/index.ts +1 -0
- package/src/molecules/generic/StepWizard/StepWizard.tsx +67 -0
- package/src/molecules/generic/StepWizard/index.ts +1 -0
- package/src/molecules/generic/TagCloud/TagCloud.tsx +32 -0
- package/src/molecules/generic/TagCloud/index.ts +1 -0
- package/src/molecules/generic/index.ts +9 -0
- package/src/render/PXEngineRenderer.tsx +27 -5
- package/src/types/atoms.ts +150 -2
- 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
|
|
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`
|
|
11
|
+
`@pxengine-ui` provides a robust foundation for building modern dashboard and AI-integrated applications:
|
|
12
12
|
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **Agent-First** -
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
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/
|
|
38
|
-
│ ├── molecules/
|
|
39
|
-
│ │ ├──
|
|
40
|
-
│ │ └──
|
|
41
|
-
│ ├──
|
|
42
|
-
│
|
|
43
|
-
|
|
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
|
|
37
|
+
## Component Catalog
|
|
51
38
|
|
|
52
|
-
###
|
|
39
|
+
### Atoms (Foundation Primitives)
|
|
53
40
|
|
|
54
|
-
|
|
41
|
+
40+ accessible atoms wrapping Radix-based shadcn components:
|
|
55
42
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
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
|
-
###
|
|
49
|
+
### Molecules (High-Level Patterns)
|
|
61
50
|
|
|
62
|
-
|
|
51
|
+
#### Generic Dashboard
|
|
63
52
|
|
|
64
|
-
- **
|
|
65
|
-
- **
|
|
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
|
-
|
|
61
|
+
#### Creator Discovery
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
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
|
-
##
|
|
76
|
-
|
|
77
|
-
### 1. Install Dependencies
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
cd @pxengine-ui
|
|
81
|
-
npm install
|
|
82
|
-
```
|
|
73
|
+
## Usage
|
|
83
74
|
|
|
84
|
-
###
|
|
75
|
+
### Registry-Driven Rendering
|
|
85
76
|
|
|
86
|
-
|
|
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
|
-
|
|
91
|
-
|
|
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
|
-
###
|
|
97
|
+
### Direct Component Import
|
|
98
|
+
|
|
99
|
+
All components are exported for standard React usage:
|
|
95
100
|
|
|
96
101
|
```tsx
|
|
97
|
-
import {
|
|
102
|
+
import { CreatorGridCard } from "pxengine";
|
|
98
103
|
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
##
|
|
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
|
|
116
|
+
The library uses a specific high-end aesthetic:
|
|
129
117
|
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
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
|
|
170
|
-
- **
|
|
171
|
-
- **Radix UI
|
|
172
|
-
- **
|
|
173
|
-
- **
|
|
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
|