pxengine 0.1.14 → 0.1.15
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/dist/index.cjs +40 -34
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +41 -35
- package/dist/registry.json +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33933,7 +33933,7 @@ var ActionButton = import_react54.default.memo(
|
|
|
33933
33933
|
onClick: onProceed,
|
|
33934
33934
|
className: cn(
|
|
33935
33935
|
"relative min-w-[140px] overflow-hidden group transition-all duration-300",
|
|
33936
|
-
"bg-[var(--primary-color)] hover:opacity-90 text-
|
|
33936
|
+
"bg-[var(--primary-color)] hover:opacity-90 text-white font-bold rounded-full px-5 py-2.5 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] hover:shadow-[0_6px_20px_0_hsl(var(--primary)/40%)]",
|
|
33937
33937
|
variant === "outline" && "bg-transparent border-[var(--primary-color)] text-[var(--primary-color)] hover:bg-[var(--primary-color)]/5",
|
|
33938
33938
|
isLoading && "opacity-80"
|
|
33939
33939
|
),
|
|
@@ -33962,12 +33962,12 @@ var ActionButton = import_react54.default.memo(
|
|
|
33962
33962
|
variant: "ghost",
|
|
33963
33963
|
size: "icon",
|
|
33964
33964
|
onClick: onPause,
|
|
33965
|
-
className: "h-10 w-10 rounded-full hover:bg-
|
|
33965
|
+
className: "h-10 w-10 rounded-full hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/60",
|
|
33966
33966
|
title: isPaused ? "Resume auto-proceed" : "Pause auto-proceed",
|
|
33967
33967
|
children: isPaused ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Play, { className: "h-4 w-4 fill-current" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Pause, { className: "h-4 w-4 fill-current" })
|
|
33968
33968
|
}
|
|
33969
33969
|
),
|
|
33970
|
-
secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-sm text-
|
|
33970
|
+
secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-sm text-[var(--foreground)]/50 font-medium italic", children: secondaryLabel })
|
|
33971
33971
|
] });
|
|
33972
33972
|
}
|
|
33973
33973
|
);
|
|
@@ -34017,14 +34017,14 @@ var FormCard = import_react55.default.memo(
|
|
|
34017
34017
|
"button",
|
|
34018
34018
|
{
|
|
34019
34019
|
onClick: handleCopyAll,
|
|
34020
|
-
className: "p-1.5 rounded-xl hover:bg-
|
|
34020
|
+
className: "p-1.5 rounded-xl hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/40 hover:text-[var(--foreground)]/60 transition-all active:scale-95",
|
|
34021
34021
|
title: "Copy all details",
|
|
34022
34022
|
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Copy, { className: "h-4 w-4" })
|
|
34023
34023
|
}
|
|
34024
34024
|
)
|
|
34025
34025
|
] }),
|
|
34026
34026
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CardContent, { className: "px-6 pt-1 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "relative", children: [
|
|
34027
|
-
showTimeline && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-
|
|
34027
|
+
showTimeline && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-[var(--border-color)] pointer-events-none" }),
|
|
34028
34028
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "space-y-2.5", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
34029
34029
|
"div",
|
|
34030
34030
|
{
|
|
@@ -34037,8 +34037,8 @@ var FormCard = import_react55.default.memo(
|
|
|
34037
34037
|
"div",
|
|
34038
34038
|
{
|
|
34039
34039
|
className: cn(
|
|
34040
|
-
"absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-
|
|
34041
|
-
changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-
|
|
34040
|
+
"absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-[var(--background)] z-10 transition-all duration-300",
|
|
34041
|
+
changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-[var(--border-color)] shadow-sm"
|
|
34042
34042
|
)
|
|
34043
34043
|
}
|
|
34044
34044
|
),
|
|
@@ -34062,7 +34062,7 @@ var FormCard = import_react55.default.memo(
|
|
|
34062
34062
|
field.key
|
|
34063
34063
|
)) })
|
|
34064
34064
|
] }) }),
|
|
34065
|
-
(onProceed || footer) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-
|
|
34065
|
+
(onProceed || footer) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-[var(--foreground)]/[0.03] p-6", children: [
|
|
34066
34066
|
onProceed && proceedLabel && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
34067
34067
|
ActionButton,
|
|
34068
34068
|
{
|
|
@@ -35129,7 +35129,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35129
35129
|
recommended,
|
|
35130
35130
|
selectedOption,
|
|
35131
35131
|
onSelect,
|
|
35132
|
-
|
|
35132
|
+
onAction,
|
|
35133
35133
|
isLatestMessage = true,
|
|
35134
35134
|
countdown,
|
|
35135
35135
|
isPaused = false,
|
|
@@ -35138,27 +35138,33 @@ var MCQCard = import_react61.default.memo(
|
|
|
35138
35138
|
className,
|
|
35139
35139
|
selectionStatus
|
|
35140
35140
|
}) => {
|
|
35141
|
+
const [localSelected, setLocalSelected] = (0, import_react61.useState)(null);
|
|
35142
|
+
const effectiveSelected = selectedOption ?? localSelected;
|
|
35141
35143
|
const handleOptionClick = (key) => {
|
|
35142
|
-
if (
|
|
35144
|
+
if (!isLoading) {
|
|
35145
|
+
setLocalSelected(key);
|
|
35143
35146
|
onSelect?.(key);
|
|
35144
35147
|
}
|
|
35145
35148
|
};
|
|
35146
35149
|
const handleProceed = () => {
|
|
35147
|
-
|
|
35148
|
-
|
|
35150
|
+
const value = effectiveSelected || recommended || "";
|
|
35151
|
+
if (value) {
|
|
35152
|
+
if (onAction) {
|
|
35153
|
+
onAction(value);
|
|
35154
|
+
}
|
|
35149
35155
|
}
|
|
35150
35156
|
};
|
|
35151
35157
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
35152
35158
|
Card,
|
|
35153
35159
|
{
|
|
35154
35160
|
className: cn(
|
|
35155
|
-
"w-full rounded-[24px] border border-
|
|
35161
|
+
"w-full rounded-[24px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm overflow-hidden",
|
|
35156
35162
|
className
|
|
35157
35163
|
),
|
|
35158
35164
|
children: [
|
|
35159
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardHeader, { className: "pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardTitle, { className: "text-lg font-bold text-
|
|
35165
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardHeader, { className: "pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardTitle, { className: "text-lg font-bold text-[var(--foreground)] tracking-tight leading-snug", children: question }) }),
|
|
35160
35166
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardContent, { className: "space-y-3 pb-6", children: Object.entries(options).map(([key, label]) => {
|
|
35161
|
-
const isSelected =
|
|
35167
|
+
const isSelected = effectiveSelected === key;
|
|
35162
35168
|
const isRecommended = key === recommended;
|
|
35163
35169
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
35164
35170
|
"div",
|
|
@@ -35166,7 +35172,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35166
35172
|
onClick: () => handleOptionClick(key),
|
|
35167
35173
|
className: cn(
|
|
35168
35174
|
"group relative flex items-start gap-4 p-4 rounded-2xl border transition-all duration-200 cursor-pointer",
|
|
35169
|
-
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]/5" : "border-
|
|
35175
|
+
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]/5 shadow-[0_0_0_1px_var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)]/30 hover:border-gray-300 hover:bg-[var(--background)]/50",
|
|
35170
35176
|
isLoading && "opacity-50 cursor-not-allowed"
|
|
35171
35177
|
),
|
|
35172
35178
|
children: [
|
|
@@ -35175,7 +35181,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35175
35181
|
{
|
|
35176
35182
|
className: cn(
|
|
35177
35183
|
"mt-1 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
35178
|
-
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-
|
|
35184
|
+
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)] group-hover:border-gray-400"
|
|
35179
35185
|
),
|
|
35180
35186
|
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-white" })
|
|
35181
35187
|
}
|
|
@@ -35186,7 +35192,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35186
35192
|
{
|
|
35187
35193
|
className: cn(
|
|
35188
35194
|
"text-sm font-semibold transition-colors",
|
|
35189
|
-
isSelected ? "text-[var(--foreground)]" : "text-
|
|
35195
|
+
isSelected ? "text-[var(--foreground)]" : "text-[var(--foreground)]/80"
|
|
35190
35196
|
),
|
|
35191
35197
|
children: label
|
|
35192
35198
|
}
|
|
@@ -35195,18 +35201,18 @@ var MCQCard = import_react61.default.memo(
|
|
|
35195
35201
|
Badge2,
|
|
35196
35202
|
{
|
|
35197
35203
|
variant: "outline",
|
|
35198
|
-
className: "bg-green-
|
|
35204
|
+
className: "bg-green-500/10 text-green-500 border-green-500/20 flex items-center gap-1 text-[10px] py-0 h-5",
|
|
35199
35205
|
children: [
|
|
35200
35206
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Sparkles, { className: "h-3 w-3" }),
|
|
35201
35207
|
"Recommended"
|
|
35202
35208
|
]
|
|
35203
35209
|
}
|
|
35204
35210
|
),
|
|
35205
|
-
isSelected &&
|
|
35211
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
35206
35212
|
Badge2,
|
|
35207
35213
|
{
|
|
35208
35214
|
variant: "outline",
|
|
35209
|
-
className: "bg-
|
|
35215
|
+
className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] border-[var(--primary-color)]/20 text-[10px] py-0 h-5",
|
|
35210
35216
|
children: "Selected"
|
|
35211
35217
|
}
|
|
35212
35218
|
)
|
|
@@ -35216,18 +35222,18 @@ var MCQCard = import_react61.default.memo(
|
|
|
35216
35222
|
key
|
|
35217
35223
|
);
|
|
35218
35224
|
}) }),
|
|
35219
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-
|
|
35225
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-[var(--border-color)] bg-black/5 p-6", children: isLatestMessage ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
35220
35226
|
ActionButton,
|
|
35221
35227
|
{
|
|
35222
|
-
label:
|
|
35228
|
+
label: effectiveSelected ? "Continue" : "Proceed with Recommendation",
|
|
35223
35229
|
countdown,
|
|
35224
35230
|
isPaused,
|
|
35225
35231
|
onPause,
|
|
35226
35232
|
onProceed: handleProceed,
|
|
35227
35233
|
isLoading,
|
|
35228
|
-
disabled: !
|
|
35234
|
+
disabled: !effectiveSelected && !recommended
|
|
35229
35235
|
}
|
|
35230
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-
|
|
35236
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-500 text-xs font-semibold", children: [
|
|
35231
35237
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
35232
35238
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: selectionStatus === "agent" ? "Suggested by Agent, Approved by You" : "Selected by You" })
|
|
35233
35239
|
] }) })
|
|
@@ -35415,7 +35421,7 @@ var CreatorGridCard = ({
|
|
|
35415
35421
|
Card,
|
|
35416
35422
|
{
|
|
35417
35423
|
className: cn(
|
|
35418
|
-
"group overflow-hidden rounded-[32px] border-
|
|
35424
|
+
"group overflow-hidden rounded-[32px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm hover:shadow-xl transition-all duration-300",
|
|
35419
35425
|
className
|
|
35420
35426
|
),
|
|
35421
35427
|
children: [
|
|
@@ -35431,13 +35437,13 @@ var CreatorGridCard = ({
|
|
|
35431
35437
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })
|
|
35432
35438
|
] }),
|
|
35433
35439
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
|
|
35434
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Avatar, { className: "h-20 w-20 border-4 border-
|
|
35440
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
|
|
35435
35441
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AvatarImage, { src: avatarSrc, alt: name }),
|
|
35436
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AvatarFallback, { className: "bg-purple-
|
|
35442
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: name.charAt(0) })
|
|
35437
35443
|
] }) }),
|
|
35438
35444
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "mt-12 flex flex-col gap-1", children: [
|
|
35439
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("h3", { className: "text-xl font-bold text-
|
|
35440
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("p", { className: "text-sm text-
|
|
35445
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: name }),
|
|
35446
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
|
|
35441
35447
|
"@",
|
|
35442
35448
|
handle
|
|
35443
35449
|
] })
|
|
@@ -35447,15 +35453,15 @@ var CreatorGridCard = ({
|
|
|
35447
35453
|
return Icon3 ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
35448
35454
|
"div",
|
|
35449
35455
|
{
|
|
35450
|
-
className: "p-1.5 rounded-lg bg-
|
|
35456
|
+
className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
|
|
35451
35457
|
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Icon3, { className: "h-4 w-4" })
|
|
35452
35458
|
},
|
|
35453
35459
|
p
|
|
35454
35460
|
) : null;
|
|
35455
35461
|
}) }),
|
|
35456
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-
|
|
35457
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-
|
|
35458
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-sm font-bold text-
|
|
35462
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: metrics.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex flex-col", children: [
|
|
35463
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
|
|
35464
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
|
|
35459
35465
|
] }, i)) })
|
|
35460
35466
|
] })
|
|
35461
35467
|
]
|
package/dist/index.d.cts
CHANGED
|
@@ -1791,11 +1791,11 @@ interface MCQCardProps {
|
|
|
1791
1791
|
*/
|
|
1792
1792
|
onSelect?: (key: string) => void;
|
|
1793
1793
|
/**
|
|
1794
|
-
* Triggered when the user clicks continue
|
|
1794
|
+
* Triggered when the user clicks continue (PXEngine compatible)
|
|
1795
1795
|
*/
|
|
1796
|
-
|
|
1796
|
+
onAction?: (action: string) => void;
|
|
1797
1797
|
/**
|
|
1798
|
-
*
|
|
1798
|
+
* Triggered when the message is the latest
|
|
1799
1799
|
*/
|
|
1800
1800
|
isLatestMessage?: boolean;
|
|
1801
1801
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1791,11 +1791,11 @@ interface MCQCardProps {
|
|
|
1791
1791
|
*/
|
|
1792
1792
|
onSelect?: (key: string) => void;
|
|
1793
1793
|
/**
|
|
1794
|
-
* Triggered when the user clicks continue
|
|
1794
|
+
* Triggered when the user clicks continue (PXEngine compatible)
|
|
1795
1795
|
*/
|
|
1796
|
-
|
|
1796
|
+
onAction?: (action: string) => void;
|
|
1797
1797
|
/**
|
|
1798
|
-
*
|
|
1798
|
+
* Triggered when the message is the latest
|
|
1799
1799
|
*/
|
|
1800
1800
|
isLatestMessage?: boolean;
|
|
1801
1801
|
/**
|
package/dist/index.js
CHANGED
|
@@ -33670,7 +33670,7 @@ var ActionButton = React85.memo(
|
|
|
33670
33670
|
onClick: onProceed,
|
|
33671
33671
|
className: cn(
|
|
33672
33672
|
"relative min-w-[140px] overflow-hidden group transition-all duration-300",
|
|
33673
|
-
"bg-[var(--primary-color)] hover:opacity-90 text-
|
|
33673
|
+
"bg-[var(--primary-color)] hover:opacity-90 text-white font-bold rounded-full px-5 py-2.5 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] hover:shadow-[0_6px_20px_0_hsl(var(--primary)/40%)]",
|
|
33674
33674
|
variant === "outline" && "bg-transparent border-[var(--primary-color)] text-[var(--primary-color)] hover:bg-[var(--primary-color)]/5",
|
|
33675
33675
|
isLoading && "opacity-80"
|
|
33676
33676
|
),
|
|
@@ -33699,12 +33699,12 @@ var ActionButton = React85.memo(
|
|
|
33699
33699
|
variant: "ghost",
|
|
33700
33700
|
size: "icon",
|
|
33701
33701
|
onClick: onPause,
|
|
33702
|
-
className: "h-10 w-10 rounded-full hover:bg-
|
|
33702
|
+
className: "h-10 w-10 rounded-full hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/60",
|
|
33703
33703
|
title: isPaused ? "Resume auto-proceed" : "Pause auto-proceed",
|
|
33704
33704
|
children: isPaused ? /* @__PURE__ */ jsx92(Play, { className: "h-4 w-4 fill-current" }) : /* @__PURE__ */ jsx92(Pause, { className: "h-4 w-4 fill-current" })
|
|
33705
33705
|
}
|
|
33706
33706
|
),
|
|
33707
|
-
secondaryLabel && /* @__PURE__ */ jsx92("span", { className: "text-sm text-
|
|
33707
|
+
secondaryLabel && /* @__PURE__ */ jsx92("span", { className: "text-sm text-[var(--foreground)]/50 font-medium italic", children: secondaryLabel })
|
|
33708
33708
|
] });
|
|
33709
33709
|
}
|
|
33710
33710
|
);
|
|
@@ -33754,14 +33754,14 @@ var FormCard = React86.memo(
|
|
|
33754
33754
|
"button",
|
|
33755
33755
|
{
|
|
33756
33756
|
onClick: handleCopyAll,
|
|
33757
|
-
className: "p-1.5 rounded-xl hover:bg-
|
|
33757
|
+
className: "p-1.5 rounded-xl hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/40 hover:text-[var(--foreground)]/60 transition-all active:scale-95",
|
|
33758
33758
|
title: "Copy all details",
|
|
33759
33759
|
children: /* @__PURE__ */ jsx93(Copy, { className: "h-4 w-4" })
|
|
33760
33760
|
}
|
|
33761
33761
|
)
|
|
33762
33762
|
] }),
|
|
33763
33763
|
/* @__PURE__ */ jsx93(CardContent, { className: "px-6 pt-1 pb-4", children: /* @__PURE__ */ jsxs55("div", { className: "relative", children: [
|
|
33764
|
-
showTimeline && /* @__PURE__ */ jsx93("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-
|
|
33764
|
+
showTimeline && /* @__PURE__ */ jsx93("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-[var(--border-color)] pointer-events-none" }),
|
|
33765
33765
|
/* @__PURE__ */ jsx93("div", { className: "space-y-2.5", children: fields.map((field) => /* @__PURE__ */ jsxs55(
|
|
33766
33766
|
"div",
|
|
33767
33767
|
{
|
|
@@ -33774,8 +33774,8 @@ var FormCard = React86.memo(
|
|
|
33774
33774
|
"div",
|
|
33775
33775
|
{
|
|
33776
33776
|
className: cn(
|
|
33777
|
-
"absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-
|
|
33778
|
-
changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-
|
|
33777
|
+
"absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-[var(--background)] z-10 transition-all duration-300",
|
|
33778
|
+
changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-[var(--border-color)] shadow-sm"
|
|
33779
33779
|
)
|
|
33780
33780
|
}
|
|
33781
33781
|
),
|
|
@@ -33799,7 +33799,7 @@ var FormCard = React86.memo(
|
|
|
33799
33799
|
field.key
|
|
33800
33800
|
)) })
|
|
33801
33801
|
] }) }),
|
|
33802
|
-
(onProceed || footer) && /* @__PURE__ */ jsxs55(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-
|
|
33802
|
+
(onProceed || footer) && /* @__PURE__ */ jsxs55(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-[var(--foreground)]/[0.03] p-6", children: [
|
|
33803
33803
|
onProceed && proceedLabel && /* @__PURE__ */ jsx93("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ jsx93(
|
|
33804
33804
|
ActionButton,
|
|
33805
33805
|
{
|
|
@@ -34857,7 +34857,7 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
34857
34857
|
};
|
|
34858
34858
|
|
|
34859
34859
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
34860
|
-
import React91 from "react";
|
|
34860
|
+
import React91, { useState as useState7 } from "react";
|
|
34861
34861
|
import { jsx as jsx106, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
34862
34862
|
var MCQCard = React91.memo(
|
|
34863
34863
|
({
|
|
@@ -34866,7 +34866,7 @@ var MCQCard = React91.memo(
|
|
|
34866
34866
|
recommended,
|
|
34867
34867
|
selectedOption,
|
|
34868
34868
|
onSelect,
|
|
34869
|
-
|
|
34869
|
+
onAction,
|
|
34870
34870
|
isLatestMessage = true,
|
|
34871
34871
|
countdown,
|
|
34872
34872
|
isPaused = false,
|
|
@@ -34875,27 +34875,33 @@ var MCQCard = React91.memo(
|
|
|
34875
34875
|
className,
|
|
34876
34876
|
selectionStatus
|
|
34877
34877
|
}) => {
|
|
34878
|
+
const [localSelected, setLocalSelected] = useState7(null);
|
|
34879
|
+
const effectiveSelected = selectedOption ?? localSelected;
|
|
34878
34880
|
const handleOptionClick = (key) => {
|
|
34879
|
-
if (
|
|
34881
|
+
if (!isLoading) {
|
|
34882
|
+
setLocalSelected(key);
|
|
34880
34883
|
onSelect?.(key);
|
|
34881
34884
|
}
|
|
34882
34885
|
};
|
|
34883
34886
|
const handleProceed = () => {
|
|
34884
|
-
|
|
34885
|
-
|
|
34887
|
+
const value = effectiveSelected || recommended || "";
|
|
34888
|
+
if (value) {
|
|
34889
|
+
if (onAction) {
|
|
34890
|
+
onAction(value);
|
|
34891
|
+
}
|
|
34886
34892
|
}
|
|
34887
34893
|
};
|
|
34888
34894
|
return /* @__PURE__ */ jsxs68(
|
|
34889
34895
|
Card,
|
|
34890
34896
|
{
|
|
34891
34897
|
className: cn(
|
|
34892
|
-
"w-full rounded-[24px] border border-
|
|
34898
|
+
"w-full rounded-[24px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm overflow-hidden",
|
|
34893
34899
|
className
|
|
34894
34900
|
),
|
|
34895
34901
|
children: [
|
|
34896
|
-
/* @__PURE__ */ jsx106(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx106(CardTitle, { className: "text-lg font-bold text-
|
|
34902
|
+
/* @__PURE__ */ jsx106(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx106(CardTitle, { className: "text-lg font-bold text-[var(--foreground)] tracking-tight leading-snug", children: question }) }),
|
|
34897
34903
|
/* @__PURE__ */ jsx106(CardContent, { className: "space-y-3 pb-6", children: Object.entries(options).map(([key, label]) => {
|
|
34898
|
-
const isSelected =
|
|
34904
|
+
const isSelected = effectiveSelected === key;
|
|
34899
34905
|
const isRecommended = key === recommended;
|
|
34900
34906
|
return /* @__PURE__ */ jsxs68(
|
|
34901
34907
|
"div",
|
|
@@ -34903,7 +34909,7 @@ var MCQCard = React91.memo(
|
|
|
34903
34909
|
onClick: () => handleOptionClick(key),
|
|
34904
34910
|
className: cn(
|
|
34905
34911
|
"group relative flex items-start gap-4 p-4 rounded-2xl border transition-all duration-200 cursor-pointer",
|
|
34906
|
-
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]/5" : "border-
|
|
34912
|
+
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]/5 shadow-[0_0_0_1px_var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)]/30 hover:border-gray-300 hover:bg-[var(--background)]/50",
|
|
34907
34913
|
isLoading && "opacity-50 cursor-not-allowed"
|
|
34908
34914
|
),
|
|
34909
34915
|
children: [
|
|
@@ -34912,7 +34918,7 @@ var MCQCard = React91.memo(
|
|
|
34912
34918
|
{
|
|
34913
34919
|
className: cn(
|
|
34914
34920
|
"mt-1 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
34915
|
-
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-
|
|
34921
|
+
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)] group-hover:border-gray-400"
|
|
34916
34922
|
),
|
|
34917
34923
|
children: isSelected && /* @__PURE__ */ jsx106("div", { className: "w-1.5 h-1.5 rounded-full bg-white" })
|
|
34918
34924
|
}
|
|
@@ -34923,7 +34929,7 @@ var MCQCard = React91.memo(
|
|
|
34923
34929
|
{
|
|
34924
34930
|
className: cn(
|
|
34925
34931
|
"text-sm font-semibold transition-colors",
|
|
34926
|
-
isSelected ? "text-[var(--foreground)]" : "text-
|
|
34932
|
+
isSelected ? "text-[var(--foreground)]" : "text-[var(--foreground)]/80"
|
|
34927
34933
|
),
|
|
34928
34934
|
children: label
|
|
34929
34935
|
}
|
|
@@ -34932,18 +34938,18 @@ var MCQCard = React91.memo(
|
|
|
34932
34938
|
Badge2,
|
|
34933
34939
|
{
|
|
34934
34940
|
variant: "outline",
|
|
34935
|
-
className: "bg-green-
|
|
34941
|
+
className: "bg-green-500/10 text-green-500 border-green-500/20 flex items-center gap-1 text-[10px] py-0 h-5",
|
|
34936
34942
|
children: [
|
|
34937
34943
|
/* @__PURE__ */ jsx106(Sparkles, { className: "h-3 w-3" }),
|
|
34938
34944
|
"Recommended"
|
|
34939
34945
|
]
|
|
34940
34946
|
}
|
|
34941
34947
|
),
|
|
34942
|
-
isSelected &&
|
|
34948
|
+
isSelected && /* @__PURE__ */ jsx106(
|
|
34943
34949
|
Badge2,
|
|
34944
34950
|
{
|
|
34945
34951
|
variant: "outline",
|
|
34946
|
-
className: "bg-
|
|
34952
|
+
className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] border-[var(--primary-color)]/20 text-[10px] py-0 h-5",
|
|
34947
34953
|
children: "Selected"
|
|
34948
34954
|
}
|
|
34949
34955
|
)
|
|
@@ -34953,18 +34959,18 @@ var MCQCard = React91.memo(
|
|
|
34953
34959
|
key
|
|
34954
34960
|
);
|
|
34955
34961
|
}) }),
|
|
34956
|
-
/* @__PURE__ */ jsx106(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-
|
|
34962
|
+
/* @__PURE__ */ jsx106(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-[var(--border-color)] bg-black/5 p-6", children: isLatestMessage ? /* @__PURE__ */ jsx106("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ jsx106(
|
|
34957
34963
|
ActionButton,
|
|
34958
34964
|
{
|
|
34959
|
-
label:
|
|
34965
|
+
label: effectiveSelected ? "Continue" : "Proceed with Recommendation",
|
|
34960
34966
|
countdown,
|
|
34961
34967
|
isPaused,
|
|
34962
34968
|
onPause,
|
|
34963
34969
|
onProceed: handleProceed,
|
|
34964
34970
|
isLoading,
|
|
34965
|
-
disabled: !
|
|
34971
|
+
disabled: !effectiveSelected && !recommended
|
|
34966
34972
|
}
|
|
34967
|
-
) }) : /* @__PURE__ */ jsxs68("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-
|
|
34973
|
+
) }) : /* @__PURE__ */ jsxs68("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-500 text-xs font-semibold", children: [
|
|
34968
34974
|
/* @__PURE__ */ jsx106(CircleCheck, { className: "h-4 w-4" }),
|
|
34969
34975
|
/* @__PURE__ */ jsx106("span", { children: selectionStatus === "agent" ? "Suggested by Agent, Approved by You" : "Selected by You" })
|
|
34970
34976
|
] }) })
|
|
@@ -35152,7 +35158,7 @@ var CreatorGridCard = ({
|
|
|
35152
35158
|
Card,
|
|
35153
35159
|
{
|
|
35154
35160
|
className: cn(
|
|
35155
|
-
"group overflow-hidden rounded-[32px] border-
|
|
35161
|
+
"group overflow-hidden rounded-[32px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm hover:shadow-xl transition-all duration-300",
|
|
35156
35162
|
className
|
|
35157
35163
|
),
|
|
35158
35164
|
children: [
|
|
@@ -35168,13 +35174,13 @@ var CreatorGridCard = ({
|
|
|
35168
35174
|
/* @__PURE__ */ jsx110("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })
|
|
35169
35175
|
] }),
|
|
35170
35176
|
/* @__PURE__ */ jsxs71(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
|
|
35171
|
-
/* @__PURE__ */ jsx110("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs71(Avatar, { className: "h-20 w-20 border-4 border-
|
|
35177
|
+
/* @__PURE__ */ jsx110("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs71(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
|
|
35172
35178
|
/* @__PURE__ */ jsx110(AvatarImage, { src: avatarSrc, alt: name }),
|
|
35173
|
-
/* @__PURE__ */ jsx110(AvatarFallback, { className: "bg-purple-
|
|
35179
|
+
/* @__PURE__ */ jsx110(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: name.charAt(0) })
|
|
35174
35180
|
] }) }),
|
|
35175
35181
|
/* @__PURE__ */ jsxs71("div", { className: "mt-12 flex flex-col gap-1", children: [
|
|
35176
|
-
/* @__PURE__ */ jsx110("h3", { className: "text-xl font-bold text-
|
|
35177
|
-
/* @__PURE__ */ jsxs71("p", { className: "text-sm text-
|
|
35182
|
+
/* @__PURE__ */ jsx110("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: name }),
|
|
35183
|
+
/* @__PURE__ */ jsxs71("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
|
|
35178
35184
|
"@",
|
|
35179
35185
|
handle
|
|
35180
35186
|
] })
|
|
@@ -35184,15 +35190,15 @@ var CreatorGridCard = ({
|
|
|
35184
35190
|
return Icon3 ? /* @__PURE__ */ jsx110(
|
|
35185
35191
|
"div",
|
|
35186
35192
|
{
|
|
35187
|
-
className: "p-1.5 rounded-lg bg-
|
|
35193
|
+
className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
|
|
35188
35194
|
children: /* @__PURE__ */ jsx110(Icon3, { className: "h-4 w-4" })
|
|
35189
35195
|
},
|
|
35190
35196
|
p
|
|
35191
35197
|
) : null;
|
|
35192
35198
|
}) }),
|
|
35193
|
-
/* @__PURE__ */ jsx110("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-
|
|
35194
|
-
/* @__PURE__ */ jsx110("span", { className: "text-[10px] font-bold uppercase tracking-wider text-
|
|
35195
|
-
/* @__PURE__ */ jsx110("span", { className: "text-sm font-bold text-
|
|
35199
|
+
/* @__PURE__ */ jsx110("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: metrics.map((m, i) => /* @__PURE__ */ jsxs71("div", { className: "flex flex-col", children: [
|
|
35200
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
|
|
35201
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
|
|
35196
35202
|
] }, i)) })
|
|
35197
35203
|
] })
|
|
35198
35204
|
]
|
package/dist/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pxengine/ui",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"lastUpdated": "2026-02-
|
|
4
|
+
"lastUpdated": "2026-02-13T12:33:52.163Z",
|
|
5
5
|
"components": {
|
|
6
6
|
"AccordionAtom": {
|
|
7
7
|
"name": "AccordionAtom",
|
|
@@ -3457,15 +3457,15 @@
|
|
|
3457
3457
|
"required": false,
|
|
3458
3458
|
"description": "Triggered when an option is selected"
|
|
3459
3459
|
},
|
|
3460
|
-
"
|
|
3461
|
-
"type": "(
|
|
3460
|
+
"onAction": {
|
|
3461
|
+
"type": "(action: string) => void",
|
|
3462
3462
|
"required": false,
|
|
3463
|
-
"description": "Triggered when the user clicks continue"
|
|
3463
|
+
"description": "Triggered when the user clicks continue (PXEngine compatible)"
|
|
3464
3464
|
},
|
|
3465
3465
|
"isLatestMessage": {
|
|
3466
3466
|
"type": "boolean",
|
|
3467
3467
|
"required": false,
|
|
3468
|
-
"description": "
|
|
3468
|
+
"description": "Triggered when the message is the latest"
|
|
3469
3469
|
},
|
|
3470
3470
|
"countdown": {
|
|
3471
3471
|
"type": "number",
|