pxengine 0.1.152 → 0.1.154
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 +70 -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 +70 -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,30 @@ __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
|
+
// The creators widget is registered as "CreatorWidget" and its canonical
|
|
10853
|
+
// fence tag is `creator-widget`. Agents (notably on smaller models like
|
|
10854
|
+
// Haiku) frequently emit near-synonym tags — `creator-list`, `creators`,
|
|
10855
|
+
// `creator-grid` — for the same widget. Without these aliases such a tag
|
|
10856
|
+
// kebab→PascalCases to a non-existent component ("CreatorList"), so the
|
|
10857
|
+
// block resolves to neither a built-in nor an organism and renders the
|
|
10858
|
+
// "Couldn't load this widget" placeholder. Map the synonyms to the one
|
|
10859
|
+
// real component so the creators widget renders regardless of the exact
|
|
10860
|
+
// tag the model chose. (DEV-342)
|
|
10861
|
+
"creator-list": "CreatorWidget",
|
|
10862
|
+
"creators": "CreatorWidget",
|
|
10863
|
+
"creator-grid": "CreatorWidget",
|
|
10864
|
+
"creator_list": "CreatorWidget",
|
|
10865
|
+
// Acronym-cased components: kebab→PascalCase title-cases each part
|
|
10866
|
+
// independently ("mcq" → "Mcq", "mcq-card" → "McqCard"), which does not match
|
|
10867
|
+
// the exported acronym name "MCQCard". The agent emits the `mcq` fence tag
|
|
10868
|
+
// (see server global_enforcement rules), so without this alias the block
|
|
10869
|
+
// fails to resolve and renders a "component not found" placeholder.
|
|
10870
|
+
mcq: "MCQCard",
|
|
10871
|
+
"mcq-card": "MCQCard",
|
|
10872
|
+
"mcq_card": "MCQCard",
|
|
10873
|
+
"kpi-stats-card": "KPIStatsCard",
|
|
10874
|
+
"kpi-metric-card": "KPIMetricCard"
|
|
10852
10875
|
};
|
|
10853
10876
|
function resolveFenceTagComponent(tag) {
|
|
10854
10877
|
if (FENCE_TAG_ALIASES[tag]) return FENCE_TAG_ALIASES[tag];
|
|
@@ -20332,9 +20355,20 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
20332
20355
|
}) });
|
|
20333
20356
|
};
|
|
20334
20357
|
var DEFAULT_PLATFORMS = ["Instagram", "YouTube", "TikTok"];
|
|
20358
|
+
var normalizePlatformOptions = (options) => {
|
|
20359
|
+
const raw = Array.isArray(options) ? options : typeof options === "string" && options.trim() !== "" ? options.split(",") : null;
|
|
20360
|
+
if (!raw) return null;
|
|
20361
|
+
const cleaned = Array.from(
|
|
20362
|
+
new Set(
|
|
20363
|
+
raw.map((o) => typeof o === "string" ? o.trim() : String(o?.label ?? o?.value ?? o ?? "").trim()).filter(Boolean)
|
|
20364
|
+
)
|
|
20365
|
+
);
|
|
20366
|
+
return cleaned.length > 0 ? cleaned : null;
|
|
20367
|
+
};
|
|
20335
20368
|
var PlatformSelectEdit = ({
|
|
20336
20369
|
value,
|
|
20337
|
-
onChange
|
|
20370
|
+
onChange,
|
|
20371
|
+
options
|
|
20338
20372
|
}) => {
|
|
20339
20373
|
const selectedPlatforms = useMemo6(() => {
|
|
20340
20374
|
if (Array.isArray(value)) return value;
|
|
@@ -20355,10 +20389,10 @@ var PlatformSelectEdit = ({
|
|
|
20355
20389
|
onChange([...selectedPlatforms, platform]);
|
|
20356
20390
|
}
|
|
20357
20391
|
};
|
|
20358
|
-
const
|
|
20359
|
-
return DEFAULT_PLATFORMS;
|
|
20360
|
-
}, []);
|
|
20361
|
-
return /* @__PURE__ */ jsx157("div", { className: "flex flex-wrap gap-4 py-2", children:
|
|
20392
|
+
const resolvedOptions = useMemo6(() => {
|
|
20393
|
+
return normalizePlatformOptions(options) ?? DEFAULT_PLATFORMS;
|
|
20394
|
+
}, [options]);
|
|
20395
|
+
return /* @__PURE__ */ jsx157("div", { className: "flex flex-wrap gap-4 py-2", children: resolvedOptions.map((platform) => /* @__PURE__ */ jsxs115(
|
|
20362
20396
|
"label",
|
|
20363
20397
|
{
|
|
20364
20398
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
@@ -20481,7 +20515,8 @@ function buildCampaignSeedFields(data) {
|
|
|
20481
20515
|
PlatformSelectEdit,
|
|
20482
20516
|
{
|
|
20483
20517
|
value: v,
|
|
20484
|
-
onChange
|
|
20518
|
+
onChange,
|
|
20519
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20485
20520
|
}
|
|
20486
20521
|
)
|
|
20487
20522
|
};
|
|
@@ -20646,7 +20681,8 @@ function buildSearchSpecFields(data) {
|
|
|
20646
20681
|
PlatformSelectEdit,
|
|
20647
20682
|
{
|
|
20648
20683
|
value: v,
|
|
20649
|
-
onChange
|
|
20684
|
+
onChange,
|
|
20685
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
20650
20686
|
}
|
|
20651
20687
|
)
|
|
20652
20688
|
};
|
|
@@ -21989,7 +22025,14 @@ var CampaignConceptCard = React116.memo(
|
|
|
21989
22025
|
return {
|
|
21990
22026
|
...field,
|
|
21991
22027
|
renderDisplay: (v) => /* @__PURE__ */ jsx172(PlatformSelectDisplay, { value: v }),
|
|
21992
|
-
renderEdit: (v, onChange) => /* @__PURE__ */ jsx172(
|
|
22028
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx172(
|
|
22029
|
+
PlatformSelectEdit,
|
|
22030
|
+
{
|
|
22031
|
+
value: v,
|
|
22032
|
+
onChange,
|
|
22033
|
+
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
22034
|
+
}
|
|
22035
|
+
)
|
|
21993
22036
|
};
|
|
21994
22037
|
}
|
|
21995
22038
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
@@ -26677,9 +26720,27 @@ var resolveComponent = (identifier) => {
|
|
|
26677
26720
|
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
26678
26721
|
Comp = ui_exports[normalized] || ui_exports[identifier] || null;
|
|
26679
26722
|
}
|
|
26723
|
+
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
26724
|
+
Comp = resolveByCaseInsensitiveName(normalized);
|
|
26725
|
+
}
|
|
26680
26726
|
COMPONENT_LOOKUP_CACHE.set(identifier, Comp);
|
|
26681
26727
|
return Comp;
|
|
26682
26728
|
};
|
|
26729
|
+
var CASE_INSENSITIVE_INDEX = null;
|
|
26730
|
+
var resolveByCaseInsensitiveName = (normalized) => {
|
|
26731
|
+
if (!CASE_INSENSITIVE_INDEX) {
|
|
26732
|
+
CASE_INSENSITIVE_INDEX = /* @__PURE__ */ new Map();
|
|
26733
|
+
for (const source of [atoms_exports, molecules_exports]) {
|
|
26734
|
+
for (const [exportName, comp] of Object.entries(source)) {
|
|
26735
|
+
if (typeof comp === "function" || typeof comp === "object") {
|
|
26736
|
+
CASE_INSENSITIVE_INDEX.set(exportName.toLowerCase(), comp);
|
|
26737
|
+
}
|
|
26738
|
+
}
|
|
26739
|
+
}
|
|
26740
|
+
}
|
|
26741
|
+
const key = normalized.toLowerCase();
|
|
26742
|
+
return CASE_INSENSITIVE_INDEX.get(key) || CASE_INSENSITIVE_INDEX.get(`${key}card`) || null;
|
|
26743
|
+
};
|
|
26683
26744
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
26684
26745
|
// Form components - require FormField + FormItem context
|
|
26685
26746
|
"FormLabel",
|