pxengine 0.1.92 → 0.1.93
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 +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -34679,11 +34679,12 @@ ActionButton.displayName = "ActionButton";
|
|
|
34679
34679
|
// src/molecules/generic/FormCard/FormCard.tsx
|
|
34680
34680
|
var import_react57 = __toESM(require("react"), 1);
|
|
34681
34681
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
34682
|
+
var humanizeKey = (key) => key.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
|
|
34682
34683
|
var FormCard = import_react57.default.memo(
|
|
34683
34684
|
({
|
|
34684
34685
|
title,
|
|
34685
|
-
fields,
|
|
34686
|
-
data,
|
|
34686
|
+
fields = [],
|
|
34687
|
+
data = {},
|
|
34687
34688
|
editingFields: externalEditingFields,
|
|
34688
34689
|
changedFields = {},
|
|
34689
34690
|
savingFields = {},
|
|
@@ -34720,6 +34721,9 @@ var FormCard = import_react57.default.memo(
|
|
|
34720
34721
|
const activeEditingFields = isExternallyControlled ? externalEditingFields || {} : internalEditingFields;
|
|
34721
34722
|
const resolvedSavingFields = Object.keys(savingFields).length > 0 ? savingFields : internalSavingFields;
|
|
34722
34723
|
const activeData = internalData;
|
|
34724
|
+
const effectiveFields = Array.isArray(fields) && fields.length > 0 ? fields : Object.keys(activeData || {}).filter(
|
|
34725
|
+
(k) => !k.startsWith("_") && activeData[k] != null && typeof activeData[k] !== "function"
|
|
34726
|
+
).map((key) => ({ key, label: humanizeKey(key) }));
|
|
34723
34727
|
const handleFieldEdit = (key) => {
|
|
34724
34728
|
if (externalOnFieldEdit) {
|
|
34725
34729
|
externalOnFieldEdit(key);
|
|
@@ -34770,7 +34774,7 @@ var FormCard = import_react57.default.memo(
|
|
|
34770
34774
|
const text = [
|
|
34771
34775
|
title,
|
|
34772
34776
|
"",
|
|
34773
|
-
...
|
|
34777
|
+
...effectiveFields.map((field) => {
|
|
34774
34778
|
const value = activeData[field.key];
|
|
34775
34779
|
return `${field.label}: ${flattenValue(value)}`;
|
|
34776
34780
|
})
|
|
@@ -34817,7 +34821,7 @@ var FormCard = import_react57.default.memo(
|
|
|
34817
34821
|
}
|
|
34818
34822
|
}
|
|
34819
34823
|
),
|
|
34820
|
-
|
|
34824
|
+
effectiveFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
34821
34825
|
EditableField,
|
|
34822
34826
|
{
|
|
34823
34827
|
label: field.label,
|
|
@@ -34836,7 +34840,7 @@ var FormCard = import_react57.default.memo(
|
|
|
34836
34840
|
renderEdit: field.renderEdit,
|
|
34837
34841
|
showIndex: showTimeline,
|
|
34838
34842
|
index,
|
|
34839
|
-
totalFields:
|
|
34843
|
+
totalFields: effectiveFields.length
|
|
34840
34844
|
},
|
|
34841
34845
|
field.key
|
|
34842
34846
|
))
|
|
@@ -40332,7 +40336,7 @@ var WebSearchJobCard = ({
|
|
|
40332
40336
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "w-2 h-2 rounded-full bg-amber-500 animate-pulse flex-shrink-0" }),
|
|
40333
40337
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { className: "text-xs text-zinc-400", children: step })
|
|
40334
40338
|
] }),
|
|
40335
|
-
|
|
40339
|
+
searchesTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "pt-1", children: [
|
|
40336
40340
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
40337
40341
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { className: "text-xs text-zinc-500", children: "Web searches" }),
|
|
40338
40342
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("span", { className: "text-xs text-zinc-500 tabular-nums", children: [
|
|
@@ -40346,7 +40350,7 @@ var WebSearchJobCard = ({
|
|
|
40346
40350
|
{
|
|
40347
40351
|
className: cn(
|
|
40348
40352
|
"flex-1 h-1 rounded-full transition-all duration-300",
|
|
40349
|
-
i < searchesCompleted ? "bg-amber-500" : i === searchesCompleted ? "bg-amber-500/50 animate-pulse" : "bg-zinc-700"
|
|
40353
|
+
i < searchesCompleted ? "bg-amber-500" : phase === "ai_generation" && i === searchesCompleted ? "bg-amber-500/50 animate-pulse" : "bg-zinc-700"
|
|
40350
40354
|
)
|
|
40351
40355
|
},
|
|
40352
40356
|
i
|