pxengine 0.1.131 → 0.1.133
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 +16 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.mjs +16 -52
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3567,6 +3567,17 @@ interface PresentationJobOutput {
|
|
|
3567
3567
|
title: string;
|
|
3568
3568
|
slide_count: number;
|
|
3569
3569
|
formats: PresentationFormats;
|
|
3570
|
+
/**
|
|
3571
|
+
* Included so the consuming chat wrapper's cardData stays in sync with
|
|
3572
|
+
* whatever phase change caused `formats` to populate — its remount key
|
|
3573
|
+
* derives from these same fields, and a partial update here (formats
|
|
3574
|
+
* without status/review_status) leaves the key computation reading a
|
|
3575
|
+
* stale phase, causing an incorrect remount back to an earlier UI phase.
|
|
3576
|
+
*/
|
|
3577
|
+
status?: string;
|
|
3578
|
+
review_status?: string;
|
|
3579
|
+
generation_mode?: string;
|
|
3580
|
+
template_id?: string;
|
|
3570
3581
|
}
|
|
3571
3582
|
/** One planned slide in a deck outline (content only, no styling). */
|
|
3572
3583
|
interface DeckOutlineSlide {
|
package/dist/index.d.ts
CHANGED
|
@@ -3567,6 +3567,17 @@ interface PresentationJobOutput {
|
|
|
3567
3567
|
title: string;
|
|
3568
3568
|
slide_count: number;
|
|
3569
3569
|
formats: PresentationFormats;
|
|
3570
|
+
/**
|
|
3571
|
+
* Included so the consuming chat wrapper's cardData stays in sync with
|
|
3572
|
+
* whatever phase change caused `formats` to populate — its remount key
|
|
3573
|
+
* derives from these same fields, and a partial update here (formats
|
|
3574
|
+
* without status/review_status) leaves the key computation reading a
|
|
3575
|
+
* stale phase, causing an incorrect remount back to an earlier UI phase.
|
|
3576
|
+
*/
|
|
3577
|
+
status?: string;
|
|
3578
|
+
review_status?: string;
|
|
3579
|
+
generation_mode?: string;
|
|
3580
|
+
template_id?: string;
|
|
3570
3581
|
}
|
|
3571
3582
|
/** One planned slide in a deck outline (content only, no styling). */
|
|
3572
3583
|
interface DeckOutlineSlide {
|
package/dist/index.mjs
CHANGED
|
@@ -16305,9 +16305,7 @@ var PresentationJobCard = ({
|
|
|
16305
16305
|
const [rowError, setRowError] = useState10(null);
|
|
16306
16306
|
const [regenPollUrl, setRegenPollUrl] = useState10(null);
|
|
16307
16307
|
const [currentSlide, setCurrentSlide] = useState10(1);
|
|
16308
|
-
const [previewScale, setPreviewScale] = useState10(1);
|
|
16309
16308
|
const [iframeReady, setIframeReady] = useState10(false);
|
|
16310
|
-
const previewRef = useRef9(null);
|
|
16311
16309
|
const iframeRef = useRef9(null);
|
|
16312
16310
|
useEffect7(() => {
|
|
16313
16311
|
setStatus(initialStatus);
|
|
@@ -16373,17 +16371,9 @@ var PresentationJobCard = ({
|
|
|
16373
16371
|
cancelled = true;
|
|
16374
16372
|
};
|
|
16375
16373
|
}, [reviewStatus, slideTemplateOptions, templatesUrl, authToken]);
|
|
16376
|
-
const updateScale = useCallback4(() => {
|
|
16377
|
-
if (previewRef.current) setPreviewScale(previewRef.current.offsetWidth / 1280);
|
|
16378
|
-
}, []);
|
|
16379
16374
|
useEffect7(() => {
|
|
16380
|
-
updateScale();
|
|
16381
16375
|
setIframeReady(false);
|
|
16382
|
-
|
|
16383
|
-
const ro = new ResizeObserver(updateScale);
|
|
16384
|
-
if (previewRef.current) ro.observe(previewRef.current);
|
|
16385
|
-
return () => ro.disconnect();
|
|
16386
|
-
}, [updateScale, formats.html_url]);
|
|
16376
|
+
}, [formats.html_url]);
|
|
16387
16377
|
useEffect7(() => {
|
|
16388
16378
|
const handler = (e) => {
|
|
16389
16379
|
if (e.data?.type === "slideChanged") {
|
|
@@ -16456,7 +16446,11 @@ var PresentationJobCard = ({
|
|
|
16456
16446
|
onCompleteRef.current({
|
|
16457
16447
|
title: newTitle,
|
|
16458
16448
|
slide_count: newSlideCount,
|
|
16459
|
-
formats: newFormats
|
|
16449
|
+
formats: newFormats,
|
|
16450
|
+
status: newStatus,
|
|
16451
|
+
review_status: output.review_status,
|
|
16452
|
+
generation_mode: output.generation_mode,
|
|
16453
|
+
template_id: output.template_id
|
|
16460
16454
|
});
|
|
16461
16455
|
}
|
|
16462
16456
|
}
|
|
@@ -16501,10 +16495,14 @@ var PresentationJobCard = ({
|
|
|
16501
16495
|
onCompleteRef.current({
|
|
16502
16496
|
title: out.title ?? title,
|
|
16503
16497
|
slide_count: out.slide_count ?? slideCount,
|
|
16504
|
-
formats: out.formats ?? formats
|
|
16498
|
+
formats: out.formats ?? formats,
|
|
16499
|
+
status: "complete",
|
|
16500
|
+
review_status: out.review_status || "pending_review",
|
|
16501
|
+
generation_mode: out.generation_mode ?? generationMode,
|
|
16502
|
+
template_id: out.template_id ?? templateId
|
|
16505
16503
|
});
|
|
16506
16504
|
}
|
|
16507
|
-
}, [title, slideCount, formats]);
|
|
16505
|
+
}, [title, slideCount, formats, generationMode, templateId]);
|
|
16508
16506
|
const refetchSourceAndApply = useCallback4(async () => {
|
|
16509
16507
|
if (!pollUrl) return;
|
|
16510
16508
|
try {
|
|
@@ -17169,10 +17167,8 @@ var PresentationJobCard = ({
|
|
|
17169
17167
|
/* @__PURE__ */ jsxs109(
|
|
17170
17168
|
"div",
|
|
17171
17169
|
{
|
|
17172
|
-
ref: previewRef,
|
|
17173
17170
|
onClick: () => setShowFullscreen(true),
|
|
17174
|
-
className: "group relative overflow-hidden rounded-xl bg-zinc-950 border border-zinc-800/50 cursor-pointer",
|
|
17175
|
-
style: { height: Math.round(previewScale * 720) },
|
|
17171
|
+
className: "group relative aspect-video w-full overflow-hidden rounded-xl bg-zinc-950 border border-zinc-800/50 cursor-pointer",
|
|
17176
17172
|
title: "Click to open fullscreen",
|
|
17177
17173
|
children: [
|
|
17178
17174
|
/* @__PURE__ */ jsx151(
|
|
@@ -17183,15 +17179,7 @@ var PresentationJobCard = ({
|
|
|
17183
17179
|
title,
|
|
17184
17180
|
sandbox: "allow-same-origin allow-scripts",
|
|
17185
17181
|
onLoad: () => setIframeReady(true),
|
|
17186
|
-
|
|
17187
|
-
width: 1280,
|
|
17188
|
-
height: 720,
|
|
17189
|
-
transform: `scale(${previewScale})`,
|
|
17190
|
-
transformOrigin: "top left",
|
|
17191
|
-
border: "none",
|
|
17192
|
-
pointerEvents: "none",
|
|
17193
|
-
display: "block"
|
|
17194
|
-
}
|
|
17182
|
+
className: "absolute inset-0 block h-full w-full border-0 pointer-events-none"
|
|
17195
17183
|
}
|
|
17196
17184
|
),
|
|
17197
17185
|
/* @__PURE__ */ jsx151("div", { className: "absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/30 transition-colors", children: /* @__PURE__ */ jsxs109("span", { className: "opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-2 bg-zinc-900/80 backdrop-blur-sm border border-zinc-700 rounded-lg px-3 py-1.5 text-xs text-zinc-200 font-medium", children: [
|
|
@@ -17489,7 +17477,6 @@ var ResearchReportJobCard = (props) => {
|
|
|
17489
17477
|
const [progress, setProgress] = useState11(initialProgress);
|
|
17490
17478
|
const [showPreview, setShowPreview] = useState11(false);
|
|
17491
17479
|
const [showExport, setShowExport] = useState11(false);
|
|
17492
|
-
const [previewScale, setPreviewScale] = useState11(1);
|
|
17493
17480
|
const [copied, setCopied] = useState11(false);
|
|
17494
17481
|
const [approving, setApproving] = useState11(false);
|
|
17495
17482
|
const [regenerating, setRegenerating] = useState11(false);
|
|
@@ -17500,7 +17487,6 @@ var ResearchReportJobCard = (props) => {
|
|
|
17500
17487
|
const [rowError, setRowError] = useState11(null);
|
|
17501
17488
|
const [outlineWritePollUrl, setOutlineWritePollUrl] = useState11(null);
|
|
17502
17489
|
const [regenPollUrl, setRegenPollUrl] = useState11(null);
|
|
17503
|
-
const previewRef = useRef10(null);
|
|
17504
17490
|
const onCompleteRef = useRef10(onComplete);
|
|
17505
17491
|
const onFailedRef = useRef10(onFailed);
|
|
17506
17492
|
const hasNotifiedRef = useRef10(false);
|
|
@@ -17563,18 +17549,6 @@ var ResearchReportJobCard = (props) => {
|
|
|
17563
17549
|
const primaryColor = theme?.primary || DEFAULT_THEME.primary;
|
|
17564
17550
|
const hasHTML = Boolean(htmlUrl);
|
|
17565
17551
|
const building = Boolean(outlineWritePollUrl) || approvingOutline;
|
|
17566
|
-
const updateScale = useCallback5(() => {
|
|
17567
|
-
if (previewRef.current) {
|
|
17568
|
-
setPreviewScale(previewRef.current.offsetWidth / 800);
|
|
17569
|
-
}
|
|
17570
|
-
}, []);
|
|
17571
|
-
useEffect8(() => {
|
|
17572
|
-
updateScale();
|
|
17573
|
-
if (typeof ResizeObserver === "undefined") return;
|
|
17574
|
-
const ro = new ResizeObserver(updateScale);
|
|
17575
|
-
if (previewRef.current) ro.observe(previewRef.current);
|
|
17576
|
-
return () => ro.disconnect();
|
|
17577
|
-
}, [updateScale, htmlUrl]);
|
|
17578
17552
|
useSharedPoll(
|
|
17579
17553
|
{
|
|
17580
17554
|
key: !isTerminal && pollUrl ? pollUrl : null,
|
|
@@ -18362,10 +18336,8 @@ var ResearchReportJobCard = (props) => {
|
|
|
18362
18336
|
hasHTML && !compact && /* @__PURE__ */ jsx152("div", { className: "mt-4", children: /* @__PURE__ */ jsxs110(
|
|
18363
18337
|
"div",
|
|
18364
18338
|
{
|
|
18365
|
-
ref: previewRef,
|
|
18366
18339
|
onClick: () => setShowPreview(true),
|
|
18367
|
-
className: "group relative overflow-hidden rounded-xl bg-white border border-zinc-800/50 cursor-pointer",
|
|
18368
|
-
style: { height: Math.round(previewScale * 400) },
|
|
18340
|
+
className: "group relative aspect-[2/1] w-full overflow-hidden rounded-xl bg-white border border-zinc-800/50 cursor-pointer",
|
|
18369
18341
|
title: "Click to open fullscreen",
|
|
18370
18342
|
children: [
|
|
18371
18343
|
/* @__PURE__ */ jsx152(
|
|
@@ -18374,15 +18346,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
18374
18346
|
src: htmlUrl,
|
|
18375
18347
|
title,
|
|
18376
18348
|
sandbox: "allow-same-origin",
|
|
18377
|
-
|
|
18378
|
-
width: 800,
|
|
18379
|
-
height: 400,
|
|
18380
|
-
transform: `scale(${previewScale})`,
|
|
18381
|
-
transformOrigin: "top left",
|
|
18382
|
-
border: "none",
|
|
18383
|
-
pointerEvents: "none",
|
|
18384
|
-
display: "block"
|
|
18385
|
-
}
|
|
18349
|
+
className: "absolute inset-0 block h-full w-full border-0 pointer-events-none"
|
|
18386
18350
|
}
|
|
18387
18351
|
),
|
|
18388
18352
|
/* @__PURE__ */ jsx152("div", { className: "absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/30 transition-colors", children: /* @__PURE__ */ jsxs110("span", { className: "opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-2 bg-zinc-900/80 backdrop-blur-sm border border-zinc-700 rounded-lg px-3 py-1.5 text-xs text-zinc-200 font-medium", children: [
|