pxengine 0.1.130 → 0.1.132
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 +20 -4
- 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 +20 -4
- 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
|
@@ -9928,6 +9928,12 @@ var ChartContainer = React82.forwardRef(({ id, className, children, config, ...p
|
|
|
9928
9928
|
) });
|
|
9929
9929
|
});
|
|
9930
9930
|
ChartContainer.displayName = "Chart";
|
|
9931
|
+
var SAFE_CSS_COLOR = /^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\(\s*[\d.%\s,/]+\s*\)|hsla?\(\s*[\d.%\s,/]+\s*\)|var\(\s*--[a-zA-Z0-9_-]+\s*\)|[a-zA-Z]+)$/;
|
|
9932
|
+
function sanitizeChartColor(value) {
|
|
9933
|
+
if (!value) return void 0;
|
|
9934
|
+
const trimmed = value.trim();
|
|
9935
|
+
return SAFE_CSS_COLOR.test(trimmed) ? trimmed : void 0;
|
|
9936
|
+
}
|
|
9931
9937
|
var ChartStyle = ({ id, config }) => {
|
|
9932
9938
|
const colorConfig = Object.entries(config).filter(
|
|
9933
9939
|
([, config2]) => config2.theme || config2.color
|
|
@@ -9943,7 +9949,9 @@ var ChartStyle = ({ id, config }) => {
|
|
|
9943
9949
|
([theme, prefix]) => `
|
|
9944
9950
|
${prefix} [data-chart=${id}] {
|
|
9945
9951
|
${colorConfig.map(([key, itemConfig]) => {
|
|
9946
|
-
const color =
|
|
9952
|
+
const color = sanitizeChartColor(
|
|
9953
|
+
itemConfig.theme?.[theme] || itemConfig.color
|
|
9954
|
+
);
|
|
9947
9955
|
return color ? ` --color-${key}: ${color};` : null;
|
|
9948
9956
|
}).join("\n")}
|
|
9949
9957
|
}
|
|
@@ -16448,7 +16456,11 @@ var PresentationJobCard = ({
|
|
|
16448
16456
|
onCompleteRef.current({
|
|
16449
16457
|
title: newTitle,
|
|
16450
16458
|
slide_count: newSlideCount,
|
|
16451
|
-
formats: newFormats
|
|
16459
|
+
formats: newFormats,
|
|
16460
|
+
status: newStatus,
|
|
16461
|
+
review_status: output.review_status,
|
|
16462
|
+
generation_mode: output.generation_mode,
|
|
16463
|
+
template_id: output.template_id
|
|
16452
16464
|
});
|
|
16453
16465
|
}
|
|
16454
16466
|
}
|
|
@@ -16493,10 +16505,14 @@ var PresentationJobCard = ({
|
|
|
16493
16505
|
onCompleteRef.current({
|
|
16494
16506
|
title: out.title ?? title,
|
|
16495
16507
|
slide_count: out.slide_count ?? slideCount,
|
|
16496
|
-
formats: out.formats ?? formats
|
|
16508
|
+
formats: out.formats ?? formats,
|
|
16509
|
+
status: "complete",
|
|
16510
|
+
review_status: out.review_status || "pending_review",
|
|
16511
|
+
generation_mode: out.generation_mode ?? generationMode,
|
|
16512
|
+
template_id: out.template_id ?? templateId
|
|
16497
16513
|
});
|
|
16498
16514
|
}
|
|
16499
|
-
}, [title, slideCount, formats]);
|
|
16515
|
+
}, [title, slideCount, formats, generationMode, templateId]);
|
|
16500
16516
|
const refetchSourceAndApply = useCallback4(async () => {
|
|
16501
16517
|
if (!pollUrl) return;
|
|
16502
16518
|
try {
|