pxengine 0.1.89 → 0.1.91
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/README.md +132 -132
- package/config/tailwind-preset.js +159 -159
- package/dist/index.cjs +416 -302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -37
- package/dist/index.d.ts +94 -37
- package/dist/index.mjs +154 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +109 -109
- package/dist/registry.json +0 -18353
package/dist/index.mjs
CHANGED
|
@@ -33639,14 +33639,22 @@ __export(molecules_exports, {
|
|
|
33639
33639
|
TimelineCard: () => TimelineCard,
|
|
33640
33640
|
TopPostsGrid: () => TopPostsGrid,
|
|
33641
33641
|
WebSearchJobCard: () => WebSearchJobCard,
|
|
33642
|
+
WidgetThemeContext: () => WidgetThemeContext,
|
|
33642
33643
|
defaultFetchSelections: () => defaultFetchSelections,
|
|
33643
33644
|
defaultPersistSelection: () => defaultPersistSelection,
|
|
33644
33645
|
th: () => th,
|
|
33645
33646
|
useCreatorWidgetPolling: () => useCreatorWidgetPolling,
|
|
33647
|
+
useWidgetTheme: () => useWidgetTheme,
|
|
33646
33648
|
withAlpha: () => withAlpha
|
|
33647
33649
|
});
|
|
33648
33650
|
|
|
33649
33651
|
// src/molecules/generic/widgetTheme.ts
|
|
33652
|
+
import { createContext as createContext5, useContext as useContext6 } from "react";
|
|
33653
|
+
var WidgetThemeContext = createContext5(void 0);
|
|
33654
|
+
function useWidgetTheme(explicit) {
|
|
33655
|
+
const ctx = useContext6(WidgetThemeContext);
|
|
33656
|
+
return explicit ?? ctx;
|
|
33657
|
+
}
|
|
33650
33658
|
function withAlpha(color, alpha) {
|
|
33651
33659
|
const hex = color.replace("#", "");
|
|
33652
33660
|
if (hex.length === 6) {
|
|
@@ -33659,13 +33667,22 @@ function withAlpha(color, alpha) {
|
|
|
33659
33667
|
}
|
|
33660
33668
|
function th(theme) {
|
|
33661
33669
|
const T = theme ?? {};
|
|
33670
|
+
const shape = {
|
|
33671
|
+
...typeof T.borderWidth === "number" && { borderWidth: T.borderWidth },
|
|
33672
|
+
...typeof T.radius === "number" && { borderRadius: T.radius },
|
|
33673
|
+
...T.shadow && { boxShadow: T.shadow },
|
|
33674
|
+
...T.fontFamily && { fontFamily: T.fontFamily }
|
|
33675
|
+
};
|
|
33662
33676
|
const root = {
|
|
33663
33677
|
...T.background && { backgroundColor: T.background },
|
|
33664
|
-
...T.border && { borderColor: T.border }
|
|
33678
|
+
...T.border && { borderColor: T.border },
|
|
33679
|
+
...shape
|
|
33665
33680
|
};
|
|
33666
33681
|
const surface = {
|
|
33667
33682
|
...T.surface && { backgroundColor: T.surface },
|
|
33668
|
-
...T.border && { borderColor: T.border }
|
|
33683
|
+
...T.border && { borderColor: T.border },
|
|
33684
|
+
...typeof T.borderWidth === "number" && { borderWidth: T.borderWidth },
|
|
33685
|
+
...typeof T.radius === "number" && { borderRadius: Math.max(0, T.radius - 4) }
|
|
33669
33686
|
};
|
|
33670
33687
|
const text = {
|
|
33671
33688
|
...T.text && { color: T.text }
|
|
@@ -33682,10 +33699,31 @@ function th(theme) {
|
|
|
33682
33699
|
const accentBorder = {
|
|
33683
33700
|
...T.accent && { borderColor: T.accent }
|
|
33684
33701
|
};
|
|
33702
|
+
const accentText = {
|
|
33703
|
+
...T.accentForeground && { color: T.accentForeground }
|
|
33704
|
+
};
|
|
33685
33705
|
const accentSubtle = (alpha = 0.12) => ({
|
|
33686
33706
|
...T.accent && { backgroundColor: withAlpha(T.accent, alpha) }
|
|
33687
33707
|
});
|
|
33688
|
-
|
|
33708
|
+
const semantic = (kind) => ({
|
|
33709
|
+
...T[kind] && { color: T[kind] }
|
|
33710
|
+
});
|
|
33711
|
+
const gradientBg = {
|
|
33712
|
+
...T.gradient && { backgroundImage: T.gradient }
|
|
33713
|
+
};
|
|
33714
|
+
return {
|
|
33715
|
+
root,
|
|
33716
|
+
surface,
|
|
33717
|
+
text,
|
|
33718
|
+
muted,
|
|
33719
|
+
accent,
|
|
33720
|
+
accentBg,
|
|
33721
|
+
accentBorder,
|
|
33722
|
+
accentText,
|
|
33723
|
+
accentSubtle,
|
|
33724
|
+
semantic,
|
|
33725
|
+
gradientBg
|
|
33726
|
+
};
|
|
33689
33727
|
}
|
|
33690
33728
|
|
|
33691
33729
|
// src/molecules/generic/EditableField/EditableField.tsx
|
|
@@ -39784,6 +39822,7 @@ var WebSearchJobCard = ({
|
|
|
39784
39822
|
summary: initialSummary,
|
|
39785
39823
|
results: initialResults,
|
|
39786
39824
|
error: initialError,
|
|
39825
|
+
progress: initialProgress,
|
|
39787
39826
|
pollUrl,
|
|
39788
39827
|
authToken,
|
|
39789
39828
|
className,
|
|
@@ -39798,6 +39837,7 @@ var WebSearchJobCard = ({
|
|
|
39798
39837
|
const [summary, setSummary] = useState12(initialSummary || "");
|
|
39799
39838
|
const [results, setResults] = useState12(initialResults || []);
|
|
39800
39839
|
const [error, setError] = useState12(initialError);
|
|
39840
|
+
const [progress, setProgress] = useState12(initialProgress);
|
|
39801
39841
|
const intervalRef = useRef7(null);
|
|
39802
39842
|
const onCompleteRef = useRef7(onComplete);
|
|
39803
39843
|
const onFailedRef = useRef7(onFailed);
|
|
@@ -39828,6 +39868,11 @@ var WebSearchJobCard = ({
|
|
|
39828
39868
|
useEffect8(() => {
|
|
39829
39869
|
if (initialError) setError(initialError);
|
|
39830
39870
|
}, [initialError]);
|
|
39871
|
+
const progressPct = initialProgress?.percentage;
|
|
39872
|
+
const progressStep = initialProgress?.current_step;
|
|
39873
|
+
useEffect8(() => {
|
|
39874
|
+
if (initialProgress) setProgress(initialProgress);
|
|
39875
|
+
}, [progressPct, progressStep]);
|
|
39831
39876
|
const isTerminal = status === "complete" || status === "failed";
|
|
39832
39877
|
useEffect8(() => {
|
|
39833
39878
|
if (isTerminal || !pollUrl) return;
|
|
@@ -39840,6 +39885,9 @@ var WebSearchJobCard = ({
|
|
|
39840
39885
|
const data = await res.json();
|
|
39841
39886
|
const newStatus = data.status;
|
|
39842
39887
|
setStatus(newStatus);
|
|
39888
|
+
if (data.progress) {
|
|
39889
|
+
setProgress(data.progress);
|
|
39890
|
+
}
|
|
39843
39891
|
if (newStatus === "complete" && data.output) {
|
|
39844
39892
|
const output = data.output;
|
|
39845
39893
|
setQuery(output.query || "");
|
|
@@ -39876,31 +39924,87 @@ var WebSearchJobCard = ({
|
|
|
39876
39924
|
}
|
|
39877
39925
|
}, [isTerminal]);
|
|
39878
39926
|
if (status === "pending" || status === "running") {
|
|
39879
|
-
|
|
39880
|
-
|
|
39881
|
-
|
|
39882
|
-
|
|
39883
|
-
|
|
39884
|
-
|
|
39885
|
-
|
|
39927
|
+
const pct = progress?.percentage ?? 0;
|
|
39928
|
+
const step = progress?.current_step ?? "Starting web search...";
|
|
39929
|
+
const details = progress?.details;
|
|
39930
|
+
const searchesCompleted = details?.searches_completed ?? 0;
|
|
39931
|
+
const searchesTotal = details?.searches_total ?? 0;
|
|
39932
|
+
const phase = details?.phase ?? progress?.step_type ?? "initializing";
|
|
39933
|
+
const getPhaseIcon = () => {
|
|
39934
|
+
switch (phase) {
|
|
39935
|
+
case "ai_generation":
|
|
39936
|
+
return "\u{1F50D}";
|
|
39937
|
+
case "processing":
|
|
39938
|
+
return "\u2699\uFE0F";
|
|
39939
|
+
case "uploading":
|
|
39940
|
+
return "\u2601\uFE0F";
|
|
39941
|
+
default:
|
|
39942
|
+
return "\u2728";
|
|
39943
|
+
}
|
|
39944
|
+
};
|
|
39945
|
+
return /* @__PURE__ */ jsx149("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs110("div", { className: "bg-zinc-900 border border-zinc-800 rounded-2xl overflow-hidden", children: [
|
|
39946
|
+
/* @__PURE__ */ jsx149(
|
|
39947
|
+
"div",
|
|
39948
|
+
{
|
|
39949
|
+
className: "h-[3px]",
|
|
39950
|
+
style: {
|
|
39951
|
+
background: "linear-gradient(90deg, #d97706, #f59e0b, #d97706)",
|
|
39952
|
+
backgroundSize: "200% 100%",
|
|
39953
|
+
animation: "gradient-shift 2s ease-in-out infinite"
|
|
39954
|
+
}
|
|
39955
|
+
}
|
|
39956
|
+
),
|
|
39957
|
+
/* @__PURE__ */ jsxs110("div", { className: "p-5", children: [
|
|
39958
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-start gap-3", children: [
|
|
39959
|
+
/* @__PURE__ */ jsx149("div", { className: "w-10 h-10 rounded-xl bg-amber-500/10 border border-amber-500/20 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx149("span", { className: "text-lg", children: getPhaseIcon() }) }),
|
|
39960
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex-1 min-w-0", children: [
|
|
39961
|
+
/* @__PURE__ */ jsx149("h3", { className: "text-sm font-semibold text-zinc-100 truncate leading-tight", children: query || initialTitle || "Web Search" }),
|
|
39962
|
+
/* @__PURE__ */ jsx149("p", { className: "text-xs text-zinc-500 mt-0.5", children: "In progress" })
|
|
39886
39963
|
] })
|
|
39887
39964
|
] }),
|
|
39888
|
-
/* @__PURE__ */
|
|
39889
|
-
|
|
39890
|
-
|
|
39891
|
-
|
|
39892
|
-
|
|
39893
|
-
|
|
39894
|
-
|
|
39895
|
-
|
|
39896
|
-
|
|
39897
|
-
|
|
39898
|
-
|
|
39899
|
-
|
|
39900
|
-
|
|
39901
|
-
|
|
39902
|
-
|
|
39903
|
-
|
|
39965
|
+
/* @__PURE__ */ jsxs110("div", { className: "mt-4 space-y-3", children: [
|
|
39966
|
+
/* @__PURE__ */ jsxs110("div", { className: "relative", children: [
|
|
39967
|
+
/* @__PURE__ */ jsx149("div", { className: "h-2 bg-zinc-800 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx149(
|
|
39968
|
+
"div",
|
|
39969
|
+
{
|
|
39970
|
+
className: "h-full rounded-full transition-all duration-500 ease-out",
|
|
39971
|
+
style: {
|
|
39972
|
+
width: `${Math.max(pct, 2)}%`,
|
|
39973
|
+
background: "linear-gradient(90deg, #d97706, #f59e0b)"
|
|
39974
|
+
}
|
|
39975
|
+
}
|
|
39976
|
+
) }),
|
|
39977
|
+
/* @__PURE__ */ jsxs110("span", { className: "absolute right-0 -top-5 text-xs text-zinc-500 font-medium tabular-nums", children: [
|
|
39978
|
+
pct,
|
|
39979
|
+
"%"
|
|
39980
|
+
] })
|
|
39981
|
+
] }),
|
|
39982
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center gap-2", children: [
|
|
39983
|
+
/* @__PURE__ */ jsx149("div", { className: "w-2 h-2 rounded-full bg-amber-500 animate-pulse flex-shrink-0" }),
|
|
39984
|
+
/* @__PURE__ */ jsx149("span", { className: "text-xs text-zinc-400", children: step })
|
|
39985
|
+
] }),
|
|
39986
|
+
phase === "ai_generation" && searchesTotal > 0 && /* @__PURE__ */ jsxs110("div", { className: "pt-1", children: [
|
|
39987
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
39988
|
+
/* @__PURE__ */ jsx149("span", { className: "text-xs text-zinc-500", children: "Web searches" }),
|
|
39989
|
+
/* @__PURE__ */ jsxs110("span", { className: "text-xs text-zinc-500 tabular-nums", children: [
|
|
39990
|
+
searchesCompleted,
|
|
39991
|
+
"/",
|
|
39992
|
+
searchesTotal
|
|
39993
|
+
] })
|
|
39994
|
+
] }),
|
|
39995
|
+
/* @__PURE__ */ jsx149("div", { className: "flex gap-1", children: Array.from({ length: Math.min(searchesTotal, 20) }).map((_, i) => /* @__PURE__ */ jsx149(
|
|
39996
|
+
"div",
|
|
39997
|
+
{
|
|
39998
|
+
className: cn(
|
|
39999
|
+
"flex-1 h-1 rounded-full transition-all duration-300",
|
|
40000
|
+
i < searchesCompleted ? "bg-amber-500" : i === searchesCompleted ? "bg-amber-500/50 animate-pulse" : "bg-zinc-700"
|
|
40001
|
+
)
|
|
40002
|
+
},
|
|
40003
|
+
i
|
|
40004
|
+
)) })
|
|
40005
|
+
] })
|
|
40006
|
+
] })
|
|
40007
|
+
] })
|
|
39904
40008
|
] }) });
|
|
39905
40009
|
}
|
|
39906
40010
|
if (status === "failed") {
|
|
@@ -40993,6 +41097,7 @@ var MCQCard = React111.memo(
|
|
|
40993
41097
|
onAction,
|
|
40994
41098
|
disabled = false,
|
|
40995
41099
|
disableContinueInDiscovery,
|
|
41100
|
+
theme,
|
|
40996
41101
|
// Self-contained props
|
|
40997
41102
|
sessionId,
|
|
40998
41103
|
sendMessage,
|
|
@@ -41002,8 +41107,7 @@ var MCQCard = React111.memo(
|
|
|
41002
41107
|
}) => {
|
|
41003
41108
|
const resolvedQuestion = question || allProps.Question || allProps.q || "";
|
|
41004
41109
|
const resolvedOptions = options || allProps.Options || allProps.opts || {};
|
|
41005
|
-
const
|
|
41006
|
-
console.log("[MCQCard] FULL PROPS:", { allProps, resolvedQuestion, resolvedOptions: Object.keys(resolvedOptions || {}), resolvedRecommended });
|
|
41110
|
+
const t = th(theme);
|
|
41007
41111
|
const [selectedOption, setSelectedOption] = React111.useState(propsSelectedOption);
|
|
41008
41112
|
const [isProceeded, setIsProceeded] = React111.useState(false);
|
|
41009
41113
|
const fetchedSessionRef = React111.useRef("");
|
|
@@ -41028,24 +41132,20 @@ var MCQCard = React111.memo(
|
|
|
41028
41132
|
if (propsSelectedOption) return;
|
|
41029
41133
|
fetchedSessionRef.current = fetchKey;
|
|
41030
41134
|
const questionKey = buildQuestionKey(sessionId, resolvedQuestion);
|
|
41031
|
-
console.log("[MCQCard] Fetching with key:", questionKey, "(question:", resolvedQuestion, ")");
|
|
41032
41135
|
fetchSelections(sessionId).then((selections) => {
|
|
41033
|
-
console.log("[MCQCard] Got selections:", selections);
|
|
41034
41136
|
const stored = selections[questionKey] || selections[resolvedQuestion] || selections[`mcq_${sessionId}`];
|
|
41035
41137
|
if (stored) {
|
|
41036
|
-
console.log("[MCQCard] Setting selected:", stored);
|
|
41037
41138
|
setSelectedOption(stored);
|
|
41038
41139
|
setIsProceeded(true);
|
|
41039
41140
|
}
|
|
41040
|
-
}).catch((
|
|
41141
|
+
}).catch(() => {
|
|
41142
|
+
});
|
|
41041
41143
|
}, [sessionId, propsSelectedOption, resolvedQuestion, buildQuestionKey]);
|
|
41042
41144
|
const isDiscovery = disableContinueInDiscovery !== void 0 ? disableContinueInDiscovery : typeof window !== "undefined" && window.location.pathname.includes("creator-discovery");
|
|
41043
41145
|
const handleOptionClick = (key, e) => {
|
|
41044
41146
|
e.preventDefault();
|
|
41045
41147
|
e.stopPropagation();
|
|
41046
|
-
console.log("[MCQCard] Option clicked:", key, "Can select:", isLatestMessage && !isLoading && !disabled && !isProceeded);
|
|
41047
41148
|
if (isLatestMessage && !isLoading && !disabled && !isProceeded) {
|
|
41048
|
-
console.log("[MCQCard] Setting selected to:", key);
|
|
41049
41149
|
setSelectedOption(key);
|
|
41050
41150
|
onSelect?.(key);
|
|
41051
41151
|
}
|
|
@@ -41063,7 +41163,6 @@ var MCQCard = React111.memo(
|
|
|
41063
41163
|
setIsProceeded(true);
|
|
41064
41164
|
if (sessionId && resolvedQuestion) {
|
|
41065
41165
|
const questionKey = buildQuestionKey(sessionId, resolvedQuestion);
|
|
41066
|
-
console.log("[MCQCard] Persisting:", questionKey, result);
|
|
41067
41166
|
await persistSelection(sessionId, questionKey, result);
|
|
41068
41167
|
}
|
|
41069
41168
|
if (sendMessage) {
|
|
@@ -41091,8 +41190,9 @@ A: ${label}`);
|
|
|
41091
41190
|
"p-4 rounded-lg border border-gray400 bg-cardSurface w-full",
|
|
41092
41191
|
className
|
|
41093
41192
|
),
|
|
41193
|
+
style: t.root,
|
|
41094
41194
|
children: [
|
|
41095
|
-
/* @__PURE__ */ jsx153("div", { className: "mb-4", children: /* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", children: resolvedQuestion || "Select an option:" }) }),
|
|
41195
|
+
/* @__PURE__ */ jsx153("div", { className: "mb-4", children: /* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", style: t.text, children: resolvedQuestion || "Select an option:" }) }),
|
|
41096
41196
|
/* @__PURE__ */ jsx153("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
|
|
41097
41197
|
const isSelected = selectedOption === key;
|
|
41098
41198
|
const isRecommended = key === recommended;
|
|
@@ -41107,6 +41207,7 @@ A: ${label}`);
|
|
|
41107
41207
|
!selectedOption && !isOptionsDisabled && "hover:border-gray500",
|
|
41108
41208
|
(isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
|
|
41109
41209
|
),
|
|
41210
|
+
style: isSelected ? { ...t.surface, ...t.accentBorder } : t.surface,
|
|
41110
41211
|
children: /* @__PURE__ */ jsxs114("div", { className: "flex items-start gap-3", children: [
|
|
41111
41212
|
/* @__PURE__ */ jsx153("div", { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsx153(
|
|
41112
41213
|
"div",
|
|
@@ -41118,12 +41219,13 @@ A: ${label}`);
|
|
|
41118
41219
|
!selectedOption && !isOptionsDisabled && "hover:border-gold"
|
|
41119
41220
|
)
|
|
41120
41221
|
),
|
|
41121
|
-
|
|
41222
|
+
style: isSelected ? t.accentBorder : void 0,
|
|
41223
|
+
children: isSelected && /* @__PURE__ */ jsx153("div", { className: "w-2 h-2 rounded-full bg-gold", style: t.accentBg })
|
|
41122
41224
|
}
|
|
41123
41225
|
) }),
|
|
41124
41226
|
/* @__PURE__ */ jsxs114("div", { className: "flex-1 min-w-0", children: [
|
|
41125
|
-
isRecommended && /* @__PURE__ */ jsx153("p", { className: "text-xs font-semibold text-gold mb-1", children: "Recommended" }),
|
|
41126
|
-
/* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", children: label })
|
|
41227
|
+
isRecommended && /* @__PURE__ */ jsx153("p", { className: "text-xs font-semibold text-gold mb-1", style: t.accent, children: "Recommended" }),
|
|
41228
|
+
/* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", style: t.text, children: label })
|
|
41127
41229
|
] })
|
|
41128
41230
|
] })
|
|
41129
41231
|
},
|
|
@@ -41140,6 +41242,7 @@ A: ${label}`);
|
|
|
41140
41242
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
41141
41243
|
"bg-cardSurface hover:bg-cardSurface/80 text-gold border-cardBorder"
|
|
41142
41244
|
),
|
|
41245
|
+
style: { ...t.surface, ...t.accent },
|
|
41143
41246
|
children: isLoading ? "Sending..." : "Continue"
|
|
41144
41247
|
}
|
|
41145
41248
|
) })
|
|
@@ -42969,7 +43072,7 @@ function PlatformMetricsBanner({
|
|
|
42969
43072
|
return /* @__PURE__ */ jsxs132(
|
|
42970
43073
|
"div",
|
|
42971
43074
|
{
|
|
42972
|
-
className: "\
|
|
43075
|
+
className: "\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\n ",
|
|
42973
43076
|
style: { backgroundColor: bgColor },
|
|
42974
43077
|
children: [
|
|
42975
43078
|
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-center md:min-w-0", children: [
|
|
@@ -46015,6 +46118,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
46015
46118
|
|
|
46016
46119
|
// src/render/PXEngineRenderer.tsx
|
|
46017
46120
|
import { jsx as jsx187, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
46121
|
+
var MOLECULE_REFS = new Set(Object.values(molecules_exports));
|
|
46018
46122
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
46019
46123
|
// Form components - require FormField + FormItem context
|
|
46020
46124
|
"FormLabel",
|
|
@@ -46208,8 +46312,11 @@ var normalizeProps = (props) => {
|
|
|
46208
46312
|
var PXEngineRenderer = ({
|
|
46209
46313
|
schema,
|
|
46210
46314
|
onAction,
|
|
46211
|
-
disabled
|
|
46315
|
+
disabled,
|
|
46316
|
+
theme
|
|
46212
46317
|
}) => {
|
|
46318
|
+
const contextTheme = React117.useContext(WidgetThemeContext);
|
|
46319
|
+
const effectiveTheme = theme ?? contextTheme;
|
|
46213
46320
|
if (!schema) return null;
|
|
46214
46321
|
const root = schema.root || schema;
|
|
46215
46322
|
const renderRecursive = (component, index) => {
|
|
@@ -46299,6 +46406,9 @@ var PXEngineRenderer = ({
|
|
|
46299
46406
|
"ResizableAtom"
|
|
46300
46407
|
]);
|
|
46301
46408
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
46409
|
+
if (effectiveTheme && finalProps.theme === void 0 && MOLECULE_REFS.has(TargetComponent)) {
|
|
46410
|
+
finalProps.theme = effectiveTheme;
|
|
46411
|
+
}
|
|
46302
46412
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
46303
46413
|
if (isAtomWithRenderProp) {
|
|
46304
46414
|
return /* @__PURE__ */ jsx187(
|
|
@@ -46325,7 +46435,7 @@ var PXEngineRenderer = ({
|
|
|
46325
46435
|
);
|
|
46326
46436
|
}
|
|
46327
46437
|
};
|
|
46328
|
-
return /* @__PURE__ */ jsx187("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
46438
|
+
return /* @__PURE__ */ jsx187(WidgetThemeContext.Provider, { value: effectiveTheme, children: /* @__PURE__ */ jsx187("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) }) });
|
|
46329
46439
|
};
|
|
46330
46440
|
export {
|
|
46331
46441
|
Accordion,
|
|
@@ -46634,6 +46744,7 @@ export {
|
|
|
46634
46744
|
TopPostsGrid,
|
|
46635
46745
|
VideoAtom,
|
|
46636
46746
|
WebSearchJobCard,
|
|
46747
|
+
WidgetThemeContext,
|
|
46637
46748
|
cn,
|
|
46638
46749
|
defaultFetchSelections,
|
|
46639
46750
|
defaultPersistSelection,
|
|
@@ -46645,6 +46756,7 @@ export {
|
|
|
46645
46756
|
submitWidgetToAgent,
|
|
46646
46757
|
th,
|
|
46647
46758
|
useCreatorWidgetPolling,
|
|
46759
|
+
useWidgetTheme,
|
|
46648
46760
|
withAlpha
|
|
46649
46761
|
};
|
|
46650
46762
|
/*! Bundled license information:
|