pxengine 0.1.9 → 0.1.11

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 (74) hide show
  1. package/README.md +79 -122
  2. package/dist/index.cjs +36909 -9518
  3. package/dist/index.d.cts +574 -33
  4. package/dist/index.d.ts +574 -33
  5. package/dist/index.js +35564 -8192
  6. package/dist/registry.json +1789 -126
  7. package/package.json +3 -3
  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/InputAtom.tsx +49 -23
  18. package/src/atoms/InputOTPAtom.tsx +49 -0
  19. package/src/atoms/KbdAtom.tsx +25 -0
  20. package/src/atoms/LabelAtom.tsx +23 -0
  21. package/src/atoms/RadioGroupAtom.tsx +31 -0
  22. package/src/atoms/RatingAtom.tsx +37 -0
  23. package/src/atoms/ResizableAtom.tsx +51 -0
  24. package/src/atoms/SliderAtom.tsx +32 -0
  25. package/src/atoms/SwitchAtom.tsx +32 -0
  26. package/src/atoms/TextareaAtom.tsx +42 -0
  27. package/src/atoms/TimelineAtom.tsx +77 -0
  28. package/src/atoms/ToggleAtom.tsx +36 -0
  29. package/src/atoms/VideoAtom.tsx +34 -0
  30. package/src/atoms/index.ts +17 -0
  31. package/src/components/ui/resizable.tsx +5 -6
  32. package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +44 -0
  33. package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +1 -0
  34. package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +50 -0
  35. package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +1 -0
  36. package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +36 -0
  37. package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +1 -0
  38. package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +41 -0
  39. package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +1 -0
  40. package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +77 -0
  41. package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +1 -0
  42. package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +104 -0
  43. package/src/molecules/creator-discovery/CreatorGridCard/index.ts +1 -0
  44. package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +65 -0
  45. package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +1 -0
  46. package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +58 -0
  47. package/src/molecules/creator-discovery/GrowthChartCard/index.ts +1 -0
  48. package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +72 -0
  49. package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +1 -0
  50. package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +49 -0
  51. package/src/molecules/creator-discovery/TopPostsGrid/index.ts +1 -0
  52. package/src/molecules/creator-discovery/index.ts +10 -0
  53. package/src/molecules/generic/DataGrid/DataGrid.tsx +102 -0
  54. package/src/molecules/generic/DataGrid/index.ts +1 -0
  55. package/src/molecules/generic/EmptyState/EmptyState.tsx +61 -0
  56. package/src/molecules/generic/EmptyState/index.ts +1 -0
  57. package/src/molecules/generic/FileUpload/FileUpload.tsx +62 -0
  58. package/src/molecules/generic/FileUpload/index.ts +1 -0
  59. package/src/molecules/generic/FilterBar/FilterBar.tsx +54 -0
  60. package/src/molecules/generic/FilterBar/index.ts +1 -0
  61. package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +39 -0
  62. package/src/molecules/generic/LoadingOverlay/index.ts +1 -0
  63. package/src/molecules/generic/NotificationList/NotificationList.tsx +80 -0
  64. package/src/molecules/generic/NotificationList/index.ts +1 -0
  65. package/src/molecules/generic/StatsGrid/StatsGrid.tsx +80 -0
  66. package/src/molecules/generic/StatsGrid/index.ts +1 -0
  67. package/src/molecules/generic/StepWizard/StepWizard.tsx +67 -0
  68. package/src/molecules/generic/StepWizard/index.ts +1 -0
  69. package/src/molecules/generic/TagCloud/TagCloud.tsx +32 -0
  70. package/src/molecules/generic/TagCloud/index.ts +1 -0
  71. package/src/molecules/generic/index.ts +9 -0
  72. package/src/render/PXEngineRenderer.tsx +74 -2
  73. package/src/types/atoms.ts +150 -2
  74. package/src/types/molecules.ts +226 -1
@@ -7,7 +7,7 @@ export type GapSize = "none" | "sm" | "md" | "lg" | "xl";
7
7
  export type TextVariant = "h1" | "h2" | "h3" | "h4" | "p" | "small" | "muted" | "label";
8
8
  export type ButtonVariant = "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "purple" | "gradient";
9
9
  export type ButtonSize = "default" | "sm" | "lg" | "icon" | "xl";
10
- export type InputType = "text" | "email" | "password" | "number" | "search" | "tel" | "url" | "textarea" | "select" | "slider" | "checkbox" | "switch" | "radio" | "otp" | "date";
10
+ export type InputType = "text" | "email" | "password" | "number" | "search" | "tel" | "url" | "textarea" | "select" | "slider" | "checkbox" | "switch" | "radio" | "otp" | "date" | "dropdown";
11
11
 
12
12
  export interface BaseAtom {
13
13
  id: string;
@@ -46,6 +46,57 @@ export interface ToggleAtomType extends BaseAtom {
46
46
  label: string;
47
47
  pressed?: boolean;
48
48
  disabled?: boolean;
49
+ size?: "sm" | "md" | "lg";
50
+ variant?: "default" | "outline";
51
+ }
52
+
53
+ export interface CheckboxAtomType extends BaseAtom {
54
+ type: "checkbox";
55
+ label?: string;
56
+ checked?: boolean;
57
+ disabled?: boolean;
58
+ }
59
+
60
+ export interface SwitchAtomType extends BaseAtom {
61
+ type: "switch";
62
+ label?: string;
63
+ checked?: boolean;
64
+ disabled?: boolean;
65
+ }
66
+
67
+ export interface LabelAtomType extends BaseAtom {
68
+ type: "label";
69
+ content: string;
70
+ htmlFor?: string;
71
+ }
72
+
73
+ export interface SliderAtomType extends BaseAtom {
74
+ type: "slider";
75
+ defaultValue?: number[];
76
+ max?: number;
77
+ min?: number;
78
+ step?: number;
79
+ disabled?: boolean;
80
+ }
81
+
82
+ export interface RadioGroupAtomType extends BaseAtom {
83
+ type: "radio-group";
84
+ options: Array<{ label: string; value: string }>;
85
+ defaultValue?: string;
86
+ disabled?: boolean;
87
+ }
88
+
89
+ export interface DropdownMenuAtomType extends BaseAtom {
90
+ type: "dropdown-menu";
91
+ trigger: any;
92
+ items: Array<{
93
+ label: string;
94
+ value: string;
95
+ icon?: string;
96
+ action?: string;
97
+ disabled?: boolean;
98
+ isDestructive?: boolean;
99
+ }>;
49
100
  }
50
101
 
51
102
  // ============================================================================
@@ -97,6 +148,18 @@ export interface SeparatorAtomType extends BaseAtom {
97
148
  orientation?: "horizontal" | "vertical";
98
149
  }
99
150
 
151
+ export interface KbdAtomType extends BaseAtom {
152
+ type: "kbd";
153
+ keys: string[];
154
+ }
155
+
156
+ export interface RatingAtomType extends BaseAtom {
157
+ type: "rating";
158
+ value: number;
159
+ max?: number;
160
+ readonly?: boolean;
161
+ }
162
+
100
163
  export interface ScrollAreaAtomType extends BaseAtom {
101
164
  type: "scroll-area";
102
165
  maxHeight?: string;
@@ -209,6 +272,39 @@ export interface AlertDialogAtomType extends BaseAtom {
209
272
  action?: string;
210
273
  }
211
274
 
275
+ export interface DrawerAtomType extends BaseAtom {
276
+ type: "drawer";
277
+ side?: "top" | "bottom" | "left" | "right";
278
+ title?: string;
279
+ description?: string;
280
+ trigger: any[];
281
+ children: any[];
282
+ }
283
+
284
+ export interface ContextMenuAtomType extends BaseAtom {
285
+ type: "context-menu";
286
+ trigger: any[];
287
+ items: Array<{
288
+ label: string;
289
+ value: string;
290
+ icon?: string;
291
+ action?: string;
292
+ disabled?: boolean;
293
+ isDestructive?: boolean;
294
+ }>;
295
+ }
296
+
297
+ export interface TimelineAtomType extends BaseAtom {
298
+ type: "timeline";
299
+ items: Array<{
300
+ title: string;
301
+ description?: string;
302
+ timestamp?: string;
303
+ status?: "completed" | "active" | "upcoming";
304
+ icon?: string;
305
+ }>;
306
+ }
307
+
212
308
  // ============================================================================
213
309
  // NAVIGATION ATOMS
214
310
  // ============================================================================
@@ -266,6 +362,43 @@ export interface CalendarAtomType extends BaseAtom {
266
362
  selectedDate?: string | string[];
267
363
  }
268
364
 
365
+ export interface InputOTPAtomType extends BaseAtom {
366
+ type: "input-otp";
367
+ length: number;
368
+ placeholder?: string;
369
+ }
370
+
371
+ export interface ResizableAtomType extends BaseAtom {
372
+ type: "resizable";
373
+ direction: "horizontal" | "vertical";
374
+ panels: Array<{
375
+ defaultSize: number;
376
+ children: any[];
377
+ }>;
378
+ }
379
+
380
+ export interface VideoAtomType extends BaseAtom {
381
+ type: "video";
382
+ src: string;
383
+ poster?: string;
384
+ autoplay?: boolean;
385
+ controls?: boolean;
386
+ muted?: boolean;
387
+ loop?: boolean;
388
+ }
389
+
390
+ export interface ChartAtomType extends BaseAtom {
391
+ type: "chart";
392
+ chartType: "bar" | "line" | "area" | "pie" | "radar" | "radial";
393
+ data: any[];
394
+ config: Record<string, { label: string; color: string }>;
395
+ XAxisKey?: string;
396
+ YAxisKey?: string;
397
+ showTooltip?: boolean;
398
+ showLegend?: boolean;
399
+ stacked?: boolean;
400
+ }
401
+
269
402
  export type UIAtom =
270
403
  | ButtonAtomType
271
404
  | InputAtomType
@@ -298,4 +431,19 @@ export type UIAtom =
298
431
  | CommandAtomType
299
432
  | FormInputAtomType
300
433
  | FormSelectAtomType
301
- | FormTextareaAtomType;
434
+ | FormTextareaAtomType
435
+ | CheckboxAtomType
436
+ | SwitchAtomType
437
+ | LabelAtomType
438
+ | SliderAtomType
439
+ | RadioGroupAtomType
440
+ | DropdownMenuAtomType
441
+ | ContextMenuAtomType
442
+ | DrawerAtomType
443
+ | InputOTPAtomType
444
+ | KbdAtomType
445
+ | ResizableAtomType
446
+ | RatingAtomType
447
+ | TimelineAtomType
448
+ | VideoAtomType
449
+ | ChartAtomType;
@@ -47,8 +47,233 @@ export interface ActionButtonAtom extends BaseMolecule {
47
47
  action?: string;
48
48
  }
49
49
 
50
+ // ============================================================================
51
+ // GENERIC MOLECULES
52
+ // ============================================================================
53
+
54
+ export interface StatsGridMolecule extends BaseMolecule {
55
+ type: "stats-grid";
56
+ items: Array<{
57
+ label: string;
58
+ value: string | number;
59
+ trend?: string;
60
+ trendDirection?: "up" | "down" | "neutral";
61
+ icon?: string;
62
+ }>;
63
+ }
64
+
65
+ export interface EmptyStateMolecule extends BaseMolecule {
66
+ type: "empty-state";
67
+ title: string;
68
+ description: string;
69
+ icon?: string;
70
+ actionLabel?: string;
71
+ action?: string;
72
+ }
73
+
74
+ export interface LoadingOverlayMolecule extends BaseMolecule {
75
+ type: "loading-overlay";
76
+ message?: string;
77
+ }
78
+
79
+ // ============================================================================
80
+ // CREATOR DISCOVERY MOLECULES
81
+ // ============================================================================
82
+
83
+ export interface PlatformIconGroupMolecule extends BaseMolecule {
84
+ type: "platform-icon-group";
85
+ platforms: Array<{
86
+ platform: "instagram" | "tiktok" | "youtube" | "twitter";
87
+ url?: string;
88
+ handle?: string;
89
+ }>;
90
+ }
91
+
92
+ export interface CreatorProfileSummaryMolecule extends BaseMolecule {
93
+ type: "creator-profile-summary";
94
+ avatarSrc?: string;
95
+ name: string;
96
+ followerCount?: string | number;
97
+ engagementRate?: string | number;
98
+ }
99
+
100
+ export interface AudienceMetricCardMolecule extends BaseMolecule {
101
+ type: "audience-metric-card";
102
+ title: string;
103
+ metrics: Array<{
104
+ label: string;
105
+ value: string | number;
106
+ percentage?: number;
107
+ }>;
108
+ }
109
+
110
+ // ============================================================================
111
+ // PHASE 2 GENERIC MOLECULES
112
+ // ============================================================================
113
+
114
+ export interface FilterBarMolecule extends BaseMolecule {
115
+ type: "filter-bar";
116
+ filters: Array<{
117
+ label: string;
118
+ value: string;
119
+ active?: boolean;
120
+ }>;
121
+ showSearch?: boolean;
122
+ }
123
+
124
+ export interface FileUploadMolecule extends BaseMolecule {
125
+ type: "file-upload";
126
+ title: string;
127
+ accept?: string;
128
+ multiple?: boolean;
129
+ }
130
+
131
+ export interface TagCloudMolecule extends BaseMolecule {
132
+ type: "tag-cloud";
133
+ tags: Array<{
134
+ label: string;
135
+ value: string;
136
+ count?: number;
137
+ }>;
138
+ }
139
+
140
+ // ============================================================================
141
+ // PHASE 2 CREATOR DISCOVERY MOLECULES
142
+ // ============================================================================
143
+
144
+ export interface CreatorGridCardMolecule extends BaseMolecule {
145
+ type: "creator-grid-card";
146
+ bannerSrc?: string;
147
+ avatarSrc?: string;
148
+ name: string;
149
+ handle: string;
150
+ metrics: Array<{
151
+ label: string;
152
+ value: string | number;
153
+ }>;
154
+ platforms: string[];
155
+ }
156
+
157
+ export interface BrandAffinityGroupMolecule extends BaseMolecule {
158
+ type: "brand-affinity-group";
159
+ brands: Array<{
160
+ name: string;
161
+ logoSrc: string;
162
+ }>;
163
+ }
164
+
165
+ export interface ContentPreviewGalleryMolecule extends BaseMolecule {
166
+ type: "content-preview-gallery";
167
+ items: Array<{
168
+ thumbnail: string;
169
+ type: "video" | "image";
170
+ url?: string;
171
+ }>;
172
+ }
173
+
174
+ // ============================================================================
175
+ // PHASE 3 GENERIC MOLECULES
176
+ // ============================================================================
177
+
178
+ export interface DataGridMolecule extends BaseMolecule {
179
+ type: "data-grid";
180
+ columns: Array<{
181
+ header: string;
182
+ accessorKey: string;
183
+ type?: "text" | "number" | "badge" | "date" | "avatar";
184
+ }>;
185
+ data: any[];
186
+ pageSize?: number;
187
+ }
188
+
189
+ export interface StepWizardMolecule extends BaseMolecule {
190
+ type: "step-wizard";
191
+ steps: Array<{
192
+ title: string;
193
+ description?: string;
194
+ }>;
195
+ currentStep: number;
196
+ }
197
+
198
+ export interface NotificationListMolecule extends BaseMolecule {
199
+ type: "notification-list";
200
+ notifications: Array<{
201
+ id: string;
202
+ title: string;
203
+ description?: string;
204
+ timestamp: string;
205
+ type: "info" | "success" | "warning" | "error";
206
+ read?: boolean;
207
+ }>;
208
+ }
209
+
210
+ // ============================================================================
211
+ // PHASE 3 CREATOR DISCOVERY MOLECULES
212
+ // ============================================================================
213
+
214
+ export interface AudienceDemographicsCardMolecule extends BaseMolecule {
215
+ type: "audience-demographics-card";
216
+ title: string;
217
+ data: any[];
218
+ config: Record<string, { label: string; color: string }>;
219
+ demographicType: "age" | "gender" | "location";
220
+ }
221
+
222
+ export interface GrowthChartCardMolecule extends BaseMolecule {
223
+ type: "growth-chart-card";
224
+ title: string;
225
+ data: any[];
226
+ config: Record<string, { label: string; color: string }>;
227
+ metric: string;
228
+ period: string;
229
+ }
230
+
231
+ export interface TopPostsGridMolecule extends BaseMolecule {
232
+ type: "top-posts-grid";
233
+ posts: Array<{
234
+ thumbnail: string;
235
+ url: string;
236
+ engagement: string;
237
+ likes: string;
238
+ comments: string;
239
+ date: string;
240
+ }>;
241
+ }
242
+
243
+ export interface CreatorActionHeaderMolecule extends BaseMolecule {
244
+ type: "creator-action-header";
245
+ bannerSrc?: string;
246
+ avatarSrc?: string;
247
+ name: string;
248
+ handle: string;
249
+ actions: Array<{
250
+ label: string;
251
+ variant?: string;
252
+ action?: string;
253
+ }>;
254
+ }
255
+
50
256
  export type UIMolecule =
51
257
  | CampaignSeedCardAtom
52
258
  | SearchSpecCardAtom
53
259
  | MCQCardAtom
54
- | ActionButtonAtom;
260
+ | ActionButtonAtom
261
+ | StatsGridMolecule
262
+ | EmptyStateMolecule
263
+ | LoadingOverlayMolecule
264
+ | PlatformIconGroupMolecule
265
+ | CreatorProfileSummaryMolecule
266
+ | AudienceMetricCardMolecule
267
+ | FilterBarMolecule
268
+ | FileUploadMolecule
269
+ | TagCloudMolecule
270
+ | CreatorGridCardMolecule
271
+ | BrandAffinityGroupMolecule
272
+ | ContentPreviewGalleryMolecule
273
+ | DataGridMolecule
274
+ | StepWizardMolecule
275
+ | NotificationListMolecule
276
+ | AudienceDemographicsCardMolecule
277
+ | GrowthChartCardMolecule
278
+ | TopPostsGridMolecule
279
+ | CreatorActionHeaderMolecule;