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 CHANGED
@@ -10278,6 +10278,12 @@ var ChartContainer = React82.forwardRef(({ id, className, children, config, ...p
10278
10278
  ) });
10279
10279
  });
10280
10280
  ChartContainer.displayName = "Chart";
10281
+ 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]+)$/;
10282
+ function sanitizeChartColor(value) {
10283
+ if (!value) return void 0;
10284
+ const trimmed = value.trim();
10285
+ return SAFE_CSS_COLOR.test(trimmed) ? trimmed : void 0;
10286
+ }
10281
10287
  var ChartStyle = ({ id, config }) => {
10282
10288
  const colorConfig = Object.entries(config).filter(
10283
10289
  ([, config2]) => config2.theme || config2.color
@@ -10293,7 +10299,9 @@ var ChartStyle = ({ id, config }) => {
10293
10299
  ([theme, prefix]) => `
10294
10300
  ${prefix} [data-chart=${id}] {
10295
10301
  ${colorConfig.map(([key, itemConfig]) => {
10296
- const color = itemConfig.theme?.[theme] || itemConfig.color;
10302
+ const color = sanitizeChartColor(
10303
+ itemConfig.theme?.[theme] || itemConfig.color
10304
+ );
10297
10305
  return color ? ` --color-${key}: ${color};` : null;
10298
10306
  }).join("\n")}
10299
10307
  }
@@ -16780,7 +16788,11 @@ var PresentationJobCard = ({
16780
16788
  onCompleteRef.current({
16781
16789
  title: newTitle,
16782
16790
  slide_count: newSlideCount,
16783
- formats: newFormats
16791
+ formats: newFormats,
16792
+ status: newStatus,
16793
+ review_status: output.review_status,
16794
+ generation_mode: output.generation_mode,
16795
+ template_id: output.template_id
16784
16796
  });
16785
16797
  }
16786
16798
  }
@@ -16825,10 +16837,14 @@ var PresentationJobCard = ({
16825
16837
  onCompleteRef.current({
16826
16838
  title: out.title ?? title,
16827
16839
  slide_count: out.slide_count ?? slideCount,
16828
- formats: out.formats ?? formats
16840
+ formats: out.formats ?? formats,
16841
+ status: "complete",
16842
+ review_status: out.review_status || "pending_review",
16843
+ generation_mode: out.generation_mode ?? generationMode,
16844
+ template_id: out.template_id ?? templateId
16829
16845
  });
16830
16846
  }
16831
- }, [title, slideCount, formats]);
16847
+ }, [title, slideCount, formats, generationMode, templateId]);
16832
16848
  const refetchSourceAndApply = (0, import_react80.useCallback)(async () => {
16833
16849
  if (!pollUrl) return;
16834
16850
  try {