pxengine 0.1.152 → 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 +57 -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 +57 -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
|
};
|
|
@@ -22325,7 +22348,14 @@ var CampaignConceptCard = import_react90.default.memo(
|
|
|
22325
22348
|
return {
|
|
22326
22349
|
...field,
|
|
22327
22350
|
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PlatformSelectDisplay, { value: v }),
|
|
22328
|
-
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
|
+
)
|
|
22329
22359
|
};
|
|
22330
22360
|
}
|
|
22331
22361
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
@@ -27013,9 +27043,27 @@ var resolveComponent = (identifier) => {
|
|
|
27013
27043
|
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
27014
27044
|
Comp = ui_exports[normalized] || ui_exports[identifier] || null;
|
|
27015
27045
|
}
|
|
27046
|
+
if (!Comp && !CONTEXT_DEPENDENT_COMPONENTS.has(normalized)) {
|
|
27047
|
+
Comp = resolveByCaseInsensitiveName(normalized);
|
|
27048
|
+
}
|
|
27016
27049
|
COMPONENT_LOOKUP_CACHE.set(identifier, Comp);
|
|
27017
27050
|
return Comp;
|
|
27018
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
|
+
};
|
|
27019
27067
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
27020
27068
|
// Form components - require FormField + FormItem context
|
|
27021
27069
|
"FormLabel",
|