pxengine 0.1.151 → 0.1.153
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 +73 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +73 -9
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +6 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11196,7 +11196,17 @@ __export(molecules_exports, {
|
|
|
11196
11196
|
var FENCE_TAG_ALIASES = {
|
|
11197
11197
|
"google-sheets": "GoogleSheetsCard",
|
|
11198
11198
|
"google-sheets-connect": "GoogleSheetsConnectCard",
|
|
11199
|
-
"google-sheets-list": "GoogleSheetsListCard"
|
|
11199
|
+
"google-sheets-list": "GoogleSheetsListCard",
|
|
11200
|
+
// Acronym-cased components: kebab→PascalCase title-cases each part
|
|
11201
|
+
// independently ("mcq" → "Mcq", "mcq-card" → "McqCard"), which does not match
|
|
11202
|
+
// the exported acronym name "MCQCard". The agent emits the `mcq` fence tag
|
|
11203
|
+
// (see server global_enforcement rules), so without this alias the block
|
|
11204
|
+
// fails to resolve and renders a "component not found" placeholder.
|
|
11205
|
+
mcq: "MCQCard",
|
|
11206
|
+
"mcq-card": "MCQCard",
|
|
11207
|
+
"mcq_card": "MCQCard",
|
|
11208
|
+
"kpi-stats-card": "KPIStatsCard",
|
|
11209
|
+
"kpi-metric-card": "KPIMetricCard"
|
|
11200
11210
|
};
|
|
11201
11211
|
function resolveFenceTagComponent(tag) {
|
|
11202
11212
|
if (FENCE_TAG_ALIASES[tag]) return FENCE_TAG_ALIASES[tag];
|
|
@@ -20668,9 +20678,20 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
20668
20678
|
}) });
|
|
20669
20679
|
};
|
|
20670
20680
|
var DEFAULT_PLATFORMS = ["Instagram", "YouTube", "TikTok"];
|
|
20681
|
+
var normalizePlatformOptions = (options) => {
|
|
20682
|
+
const raw = Array.isArray(options) ? options : typeof options === "string" && options.trim() !== "" ? options.split(",") : null;
|
|
20683
|
+
if (!raw) return null;
|
|
20684
|
+
const cleaned = Array.from(
|
|
20685
|
+
new Set(
|
|
20686
|
+
raw.map((o) => typeof o === "string" ? o.trim() : String(o?.label ?? o?.value ?? o ?? "").trim()).filter(Boolean)
|
|
20687
|
+
)
|
|
20688
|
+
);
|
|
20689
|
+
return cleaned.length > 0 ? cleaned : null;
|
|
20690
|
+
};
|
|
20671
20691
|
var PlatformSelectEdit = ({
|
|
20672
20692
|
value,
|
|
20673
|
-
onChange
|
|
20693
|
+
onChange,
|
|
20694
|
+
options
|
|
20674
20695
|
}) => {
|
|
20675
20696
|
const selectedPlatforms = (0, import_react85.useMemo)(() => {
|
|
20676
20697
|
if (Array.isArray(value)) return value;
|
|
@@ -20691,10 +20712,10 @@ var PlatformSelectEdit = ({
|
|
|
20691
20712
|
onChange([...selectedPlatforms, platform]);
|
|
20692
20713
|
}
|
|
20693
20714
|
};
|
|
20694
|
-
const
|
|
20695
|
-
return DEFAULT_PLATFORMS;
|
|
20696
|
-
}, []);
|
|
20697
|
-
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "flex flex-wrap gap-4 py-2", children:
|
|
20715
|
+
const resolvedOptions = (0, import_react85.useMemo)(() => {
|
|
20716
|
+
return normalizePlatformOptions(options) ?? DEFAULT_PLATFORMS;
|
|
20717
|
+
}, [options]);
|
|
20718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "flex flex-wrap gap-4 py-2", children: resolvedOptions.map((platform) => /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
|
|
20698
20719
|
"label",
|
|
20699
20720
|
{
|
|
20700
20721
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
@@ -20817,7 +20838,8 @@ function buildCampaignSeedFields(data) {
|
|
|
20817
20838
|
PlatformSelectEdit,
|
|
20818
20839
|
{
|
|
20819
20840
|
value: v,
|
|
20820
|
-
onChange
|
|
20841
|
+
onChange,
|
|
20842
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20821
20843
|
}
|
|
20822
20844
|
)
|
|
20823
20845
|
};
|
|
@@ -20982,7 +21004,8 @@ function buildSearchSpecFields(data) {
|
|
|
20982
21004
|
PlatformSelectEdit,
|
|
20983
21005
|
{
|
|
20984
21006
|
value: v,
|
|
20985
|
-
onChange
|
|
21007
|
+
onChange,
|
|
21008
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20986
21009
|
}
|
|
20987
21010
|
)
|
|
20988
21011
|
};
|
|
@@ -21425,6 +21448,22 @@ A: ${label}`);
|
|
|
21425
21448
|
const selectedCount = selectedKeys.length;
|
|
21426
21449
|
const meetsMin = (selectedCount || (recommended ? 1 : 0)) >= minSel;
|
|
21427
21450
|
const isContinueDisabled = disabled || !isLatestMessage || isProceeded || isDiscovery;
|
|
21451
|
+
if (optionsEntries.length === 0) {
|
|
21452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(
|
|
21453
|
+
"div",
|
|
21454
|
+
{
|
|
21455
|
+
"data-testid": "mcq-card-error",
|
|
21456
|
+
className: cn(
|
|
21457
|
+
"p-4 rounded-lg border border-red-500/30 bg-red-500/5 text-sm text-red-300 w-full",
|
|
21458
|
+
className
|
|
21459
|
+
),
|
|
21460
|
+
children: [
|
|
21461
|
+
resolvedQuestion || "This question",
|
|
21462
|
+
" couldn't be displayed \u2014 its answer options are missing or in an unexpected format. Ask the agent to regenerate this question."
|
|
21463
|
+
]
|
|
21464
|
+
}
|
|
21465
|
+
);
|
|
21466
|
+
}
|
|
21428
21467
|
const guidance = !isMulti ? "Select one option" : isSelectAll ? "Select all that apply" : minSel === maxSel ? `Select ${maxSel} options` : minSel <= 1 ? `Choose up to ${maxSel} options` : `Select between ${minSel} and ${maxSel} options`;
|
|
21429
21468
|
return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(
|
|
21430
21469
|
"div",
|
|
@@ -22309,7 +22348,14 @@ var CampaignConceptCard = import_react90.default.memo(
|
|
|
22309
22348
|
return {
|
|
22310
22349
|
...field,
|
|
22311
22350
|
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PlatformSelectDisplay, { value: v }),
|
|
22312
|
-
renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
22351
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
22352
|
+
PlatformSelectEdit,
|
|
22353
|
+
{
|
|
22354
|
+
value: v,
|
|
22355
|
+
onChange,
|
|
22356
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
22357
|
+
}
|
|
22358
|
+
)
|
|
22313
22359
|
};
|
|
22314
22360
|
}
|
|
22315
22361
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
@@ -26997,9 +27043,27 @@ var resolveComponent = (identifier) => {
|
|
|
26997
27043
|
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
26998
27044
|
Comp = ui_exports[normalized] || ui_exports[identifier] || null;
|
|
26999
27045
|
}
|
|
27046
|
+
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
27047
|
+
Comp = resolveByCaseInsensitiveName(normalized);
|
|
27048
|
+
}
|
|
27000
27049
|
COMPONENT_LOOKUP_CACHE.set(identifier, Comp);
|
|
27001
27050
|
return Comp;
|
|
27002
27051
|
};
|
|
27052
|
+
var CASE_INSENSITIVE_INDEX = null;
|
|
27053
|
+
var resolveByCaseInsensitiveName = (normalized) => {
|
|
27054
|
+
if (!CASE_INSENSITIVE_INDEX) {
|
|
27055
|
+
CASE_INSENSITIVE_INDEX = /* @__PURE__ */ new Map();
|
|
27056
|
+
for (const source of [atoms_exports, molecules_exports]) {
|
|
27057
|
+
for (const [exportName, comp] of Object.entries(source)) {
|
|
27058
|
+
if (typeof comp === "function" || typeof comp === "object") {
|
|
27059
|
+
CASE_INSENSITIVE_INDEX.set(exportName.toLowerCase(), comp);
|
|
27060
|
+
}
|
|
27061
|
+
}
|
|
27062
|
+
}
|
|
27063
|
+
}
|
|
27064
|
+
const key = normalized.toLowerCase();
|
|
27065
|
+
return CASE_INSENSITIVE_INDEX.get(key) || CASE_INSENSITIVE_INDEX.get(`${key}card`) || null;
|
|
27066
|
+
};
|
|
27003
27067
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
27004
27068
|
// Form components - require FormField + FormItem context
|
|
27005
27069
|
"FormLabel",
|