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.d.cts
CHANGED
|
@@ -4218,9 +4218,15 @@ declare const KeywordBundlesEdit: ({ value, onChange, }: {
|
|
|
4218
4218
|
declare const KeywordBundlesDisplay: ({ value }: {
|
|
4219
4219
|
value: any;
|
|
4220
4220
|
}) => react_jsx_runtime.JSX.Element;
|
|
4221
|
-
declare const PlatformSelectEdit: ({ value, onChange, }: {
|
|
4221
|
+
declare const PlatformSelectEdit: ({ value, onChange, options, }: {
|
|
4222
4222
|
value: any;
|
|
4223
4223
|
onChange: (value: any) => void;
|
|
4224
|
+
/**
|
|
4225
|
+
* Dynamic platform choices supplied by the parent (from backend/schema data
|
|
4226
|
+
* such as `platform_options` / `available_platforms` / `platforms_list`).
|
|
4227
|
+
* When absent or empty, falls back to DEFAULT_PLATFORMS.
|
|
4228
|
+
*/
|
|
4229
|
+
options?: any;
|
|
4224
4230
|
}) => react_jsx_runtime.JSX.Element;
|
|
4225
4231
|
declare const PlatformSelectDisplay: ({ value }: {
|
|
4226
4232
|
value: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -4218,9 +4218,15 @@ declare const KeywordBundlesEdit: ({ value, onChange, }: {
|
|
|
4218
4218
|
declare const KeywordBundlesDisplay: ({ value }: {
|
|
4219
4219
|
value: any;
|
|
4220
4220
|
}) => react_jsx_runtime.JSX.Element;
|
|
4221
|
-
declare const PlatformSelectEdit: ({ value, onChange, }: {
|
|
4221
|
+
declare const PlatformSelectEdit: ({ value, onChange, options, }: {
|
|
4222
4222
|
value: any;
|
|
4223
4223
|
onChange: (value: any) => void;
|
|
4224
|
+
/**
|
|
4225
|
+
* Dynamic platform choices supplied by the parent (from backend/schema data
|
|
4226
|
+
* such as `platform_options` / `available_platforms` / `platforms_list`).
|
|
4227
|
+
* When absent or empty, falls back to DEFAULT_PLATFORMS.
|
|
4228
|
+
*/
|
|
4229
|
+
options?: any;
|
|
4224
4230
|
}) => react_jsx_runtime.JSX.Element;
|
|
4225
4231
|
declare const PlatformSelectDisplay: ({ value }: {
|
|
4226
4232
|
value: any;
|
package/dist/index.mjs
CHANGED
|
@@ -10848,7 +10848,17 @@ __export(molecules_exports, {
|
|
|
10848
10848
|
var FENCE_TAG_ALIASES = {
|
|
10849
10849
|
"google-sheets": "GoogleSheetsCard",
|
|
10850
10850
|
"google-sheets-connect": "GoogleSheetsConnectCard",
|
|
10851
|
-
"google-sheets-list": "GoogleSheetsListCard"
|
|
10851
|
+
"google-sheets-list": "GoogleSheetsListCard",
|
|
10852
|
+
// Acronym-cased components: kebab→PascalCase title-cases each part
|
|
10853
|
+
// independently ("mcq" → "Mcq", "mcq-card" → "McqCard"), which does not match
|
|
10854
|
+
// the exported acronym name "MCQCard". The agent emits the `mcq` fence tag
|
|
10855
|
+
// (see server global_enforcement rules), so without this alias the block
|
|
10856
|
+
// fails to resolve and renders a "component not found" placeholder.
|
|
10857
|
+
mcq: "MCQCard",
|
|
10858
|
+
"mcq-card": "MCQCard",
|
|
10859
|
+
"mcq_card": "MCQCard",
|
|
10860
|
+
"kpi-stats-card": "KPIStatsCard",
|
|
10861
|
+
"kpi-metric-card": "KPIMetricCard"
|
|
10852
10862
|
};
|
|
10853
10863
|
function resolveFenceTagComponent(tag) {
|
|
10854
10864
|
if (FENCE_TAG_ALIASES[tag]) return FENCE_TAG_ALIASES[tag];
|
|
@@ -20332,9 +20342,20 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
20332
20342
|
}) });
|
|
20333
20343
|
};
|
|
20334
20344
|
var DEFAULT_PLATFORMS = ["Instagram", "YouTube", "TikTok"];
|
|
20345
|
+
var normalizePlatformOptions = (options) => {
|
|
20346
|
+
const raw = Array.isArray(options) ? options : typeof options === "string" && options.trim() !== "" ? options.split(",") : null;
|
|
20347
|
+
if (!raw) return null;
|
|
20348
|
+
const cleaned = Array.from(
|
|
20349
|
+
new Set(
|
|
20350
|
+
raw.map((o) => typeof o === "string" ? o.trim() : String(o?.label ?? o?.value ?? o ?? "").trim()).filter(Boolean)
|
|
20351
|
+
)
|
|
20352
|
+
);
|
|
20353
|
+
return cleaned.length > 0 ? cleaned : null;
|
|
20354
|
+
};
|
|
20335
20355
|
var PlatformSelectEdit = ({
|
|
20336
20356
|
value,
|
|
20337
|
-
onChange
|
|
20357
|
+
onChange,
|
|
20358
|
+
options
|
|
20338
20359
|
}) => {
|
|
20339
20360
|
const selectedPlatforms = useMemo6(() => {
|
|
20340
20361
|
if (Array.isArray(value)) return value;
|
|
@@ -20355,10 +20376,10 @@ var PlatformSelectEdit = ({
|
|
|
20355
20376
|
onChange([...selectedPlatforms, platform]);
|
|
20356
20377
|
}
|
|
20357
20378
|
};
|
|
20358
|
-
const
|
|
20359
|
-
return DEFAULT_PLATFORMS;
|
|
20360
|
-
}, []);
|
|
20361
|
-
return /* @__PURE__ */ jsx157("div", { className: "flex flex-wrap gap-4 py-2", children:
|
|
20379
|
+
const resolvedOptions = useMemo6(() => {
|
|
20380
|
+
return normalizePlatformOptions(options) ?? DEFAULT_PLATFORMS;
|
|
20381
|
+
}, [options]);
|
|
20382
|
+
return /* @__PURE__ */ jsx157("div", { className: "flex flex-wrap gap-4 py-2", children: resolvedOptions.map((platform) => /* @__PURE__ */ jsxs115(
|
|
20362
20383
|
"label",
|
|
20363
20384
|
{
|
|
20364
20385
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
@@ -20481,7 +20502,8 @@ function buildCampaignSeedFields(data) {
|
|
|
20481
20502
|
PlatformSelectEdit,
|
|
20482
20503
|
{
|
|
20483
20504
|
value: v,
|
|
20484
|
-
onChange
|
|
20505
|
+
onChange,
|
|
20506
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20485
20507
|
}
|
|
20486
20508
|
)
|
|
20487
20509
|
};
|
|
@@ -20646,7 +20668,8 @@ function buildSearchSpecFields(data) {
|
|
|
20646
20668
|
PlatformSelectEdit,
|
|
20647
20669
|
{
|
|
20648
20670
|
value: v,
|
|
20649
|
-
onChange
|
|
20671
|
+
onChange,
|
|
20672
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20650
20673
|
}
|
|
20651
20674
|
)
|
|
20652
20675
|
};
|
|
@@ -21089,6 +21112,22 @@ A: ${label}`);
|
|
|
21089
21112
|
const selectedCount = selectedKeys.length;
|
|
21090
21113
|
const meetsMin = (selectedCount || (recommended ? 1 : 0)) >= minSel;
|
|
21091
21114
|
const isContinueDisabled = disabled || !isLatestMessage || isProceeded || isDiscovery;
|
|
21115
|
+
if (optionsEntries.length === 0) {
|
|
21116
|
+
return /* @__PURE__ */ jsxs118(
|
|
21117
|
+
"div",
|
|
21118
|
+
{
|
|
21119
|
+
"data-testid": "mcq-card-error",
|
|
21120
|
+
className: cn(
|
|
21121
|
+
"p-4 rounded-lg border border-red-500/30 bg-red-500/5 text-sm text-red-300 w-full",
|
|
21122
|
+
className
|
|
21123
|
+
),
|
|
21124
|
+
children: [
|
|
21125
|
+
resolvedQuestion || "This question",
|
|
21126
|
+
" couldn't be displayed \u2014 its answer options are missing or in an unexpected format. Ask the agent to regenerate this question."
|
|
21127
|
+
]
|
|
21128
|
+
}
|
|
21129
|
+
);
|
|
21130
|
+
}
|
|
21092
21131
|
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`;
|
|
21093
21132
|
return /* @__PURE__ */ jsxs118(
|
|
21094
21133
|
"div",
|
|
@@ -21973,7 +22012,14 @@ var CampaignConceptCard = React116.memo(
|
|
|
21973
22012
|
return {
|
|
21974
22013
|
...field,
|
|
21975
22014
|
renderDisplay: (v) => /* @__PURE__ */ jsx172(PlatformSelectDisplay, { value: v }),
|
|
21976
|
-
renderEdit: (v, onChange) => /* @__PURE__ */ jsx172(
|
|
22015
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx172(
|
|
22016
|
+
PlatformSelectEdit,
|
|
22017
|
+
{
|
|
22018
|
+
value: v,
|
|
22019
|
+
onChange,
|
|
22020
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
22021
|
+
}
|
|
22022
|
+
)
|
|
21977
22023
|
};
|
|
21978
22024
|
}
|
|
21979
22025
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
@@ -26661,9 +26707,27 @@ var resolveComponent = (identifier) => {
|
|
|
26661
26707
|
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
26662
26708
|
Comp = ui_exports[normalized] || ui_exports[identifier] || null;
|
|
26663
26709
|
}
|
|
26710
|
+
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
26711
|
+
Comp = resolveByCaseInsensitiveName(normalized);
|
|
26712
|
+
}
|
|
26664
26713
|
COMPONENT_LOOKUP_CACHE.set(identifier, Comp);
|
|
26665
26714
|
return Comp;
|
|
26666
26715
|
};
|
|
26716
|
+
var CASE_INSENSITIVE_INDEX = null;
|
|
26717
|
+
var resolveByCaseInsensitiveName = (normalized) => {
|
|
26718
|
+
if (!CASE_INSENSITIVE_INDEX) {
|
|
26719
|
+
CASE_INSENSITIVE_INDEX = /* @__PURE__ */ new Map();
|
|
26720
|
+
for (const source of [atoms_exports, molecules_exports]) {
|
|
26721
|
+
for (const [exportName, comp] of Object.entries(source)) {
|
|
26722
|
+
if (typeof comp === "function" || typeof comp === "object") {
|
|
26723
|
+
CASE_INSENSITIVE_INDEX.set(exportName.toLowerCase(), comp);
|
|
26724
|
+
}
|
|
26725
|
+
}
|
|
26726
|
+
}
|
|
26727
|
+
}
|
|
26728
|
+
const key = normalized.toLowerCase();
|
|
26729
|
+
return CASE_INSENSITIVE_INDEX.get(key) || CASE_INSENSITIVE_INDEX.get(`${key}card`) || null;
|
|
26730
|
+
};
|
|
26667
26731
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
26668
26732
|
// Form components - require FormField + FormItem context
|
|
26669
26733
|
"FormLabel",
|