pxengine 0.1.136 → 0.1.137

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.mjs CHANGED
@@ -15788,6 +15788,7 @@ var NextStepCard = ({
15788
15788
 
15789
15789
  // src/molecules/generic/PresentationJobCard/PresentationJobCard.tsx
15790
15790
  import { useCallback as useCallback4, useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState10 } from "react";
15791
+ import { createPortal } from "react-dom";
15791
15792
 
15792
15793
  // src/lib/shared-poll.ts
15793
15794
  import { useEffect as useEffect6, useRef as useRef8 } from "react";
@@ -16181,48 +16182,51 @@ var ExportModal = ({ formats, title, onClose }) => {
16181
16182
  setDownloadingKey(null);
16182
16183
  }
16183
16184
  };
16184
- return /* @__PURE__ */ jsxs109("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
16185
- /* @__PURE__ */ jsx151("div", { className: "absolute inset-0 bg-black/70 backdrop-blur-sm", onClick: onClose }),
16186
- /* @__PURE__ */ jsxs109("div", { className: "relative z-10 bg-zinc-900 border border-zinc-800 rounded-2xl w-full max-w-sm p-6 shadow-2xl", children: [
16187
- /* @__PURE__ */ jsxs109("div", { className: "flex items-start justify-between mb-5", children: [
16188
- /* @__PURE__ */ jsxs109("div", { className: "min-w-0 pr-3", children: [
16189
- /* @__PURE__ */ jsx151("h3", { className: "text-sm font-semibold text-zinc-100", children: "Export Presentation" }),
16190
- /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-500 mt-0.5 truncate", children: title })
16185
+ return createPortal(
16186
+ /* @__PURE__ */ jsxs109("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
16187
+ /* @__PURE__ */ jsx151("div", { className: "absolute inset-0 bg-black/70 backdrop-blur-sm", onClick: onClose }),
16188
+ /* @__PURE__ */ jsxs109("div", { className: "relative z-10 bg-zinc-900 border border-zinc-800 rounded-2xl w-full max-w-sm p-6 shadow-2xl", children: [
16189
+ /* @__PURE__ */ jsxs109("div", { className: "flex items-start justify-between mb-5", children: [
16190
+ /* @__PURE__ */ jsxs109("div", { className: "min-w-0 pr-3", children: [
16191
+ /* @__PURE__ */ jsx151("h3", { className: "text-sm font-semibold text-zinc-100", children: "Export Presentation" }),
16192
+ /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-500 mt-0.5 truncate", children: title })
16193
+ ] }),
16194
+ /* @__PURE__ */ jsx151("button", { onClick: onClose, className: "text-zinc-500 hover:text-zinc-200 transition-colors flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx151(CloseIcon, {}) })
16191
16195
  ] }),
16192
- /* @__PURE__ */ jsx151("button", { onClick: onClose, className: "text-zinc-500 hover:text-zinc-200 transition-colors flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx151(CloseIcon, {}) })
16193
- ] }),
16194
- /* @__PURE__ */ jsxs109("div", { className: "space-y-2.5", children: [
16195
- available.length === 0 && /* @__PURE__ */ jsx151("p", { className: "text-sm text-zinc-500 text-center py-6", children: "No formats available yet" }),
16196
- available.map((fmt) => {
16197
- const url = formats[fmt.key];
16198
- const isDownloading = downloadingKey === fmt.key;
16199
- return /* @__PURE__ */ jsxs109(
16200
- "button",
16201
- {
16202
- type: "button",
16203
- disabled: Boolean(downloadingKey),
16204
- onClick: () => handleDownload(fmt.key, url, fmt.ext),
16205
- className: cn(
16206
- "flex w-full items-center gap-3.5 p-3.5 rounded-xl border transition-all text-left",
16207
- "hover:brightness-110 disabled:opacity-60 disabled:cursor-not-allowed",
16208
- fmt.accent.bg
16209
- ),
16210
- children: [
16211
- /* @__PURE__ */ jsx151("span", { className: "text-xl flex-shrink-0", children: fmt.emoji }),
16212
- /* @__PURE__ */ jsxs109("div", { className: "flex-1 min-w-0", children: [
16213
- /* @__PURE__ */ jsx151("p", { className: cn("text-sm font-semibold", fmt.accent.text), children: isDownloading ? `Downloading ${fmt.label}...` : fmt.label }),
16214
- /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-500 mt-0.5 leading-relaxed", children: isDownloading ? "Please wait while the file is being prepared." : fmt.desc })
16215
- ] }),
16216
- /* @__PURE__ */ jsx151("span", { className: cn("flex-shrink-0", fmt.accent.text), children: /* @__PURE__ */ jsx151(DownloadIcon, {}) })
16217
- ]
16218
- },
16219
- fmt.key
16220
- );
16221
- })
16222
- ] }),
16223
- /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in 90 days" })
16224
- ] })
16225
- ] });
16196
+ /* @__PURE__ */ jsxs109("div", { className: "space-y-2.5", children: [
16197
+ available.length === 0 && /* @__PURE__ */ jsx151("p", { className: "text-sm text-zinc-500 text-center py-6", children: "No formats available yet" }),
16198
+ available.map((fmt) => {
16199
+ const url = formats[fmt.key];
16200
+ const isDownloading = downloadingKey === fmt.key;
16201
+ return /* @__PURE__ */ jsxs109(
16202
+ "button",
16203
+ {
16204
+ type: "button",
16205
+ disabled: Boolean(downloadingKey),
16206
+ onClick: () => handleDownload(fmt.key, url, fmt.ext),
16207
+ className: cn(
16208
+ "flex w-full items-center gap-3.5 p-3.5 rounded-xl border transition-all text-left",
16209
+ "hover:brightness-110 disabled:opacity-60 disabled:cursor-not-allowed",
16210
+ fmt.accent.bg
16211
+ ),
16212
+ children: [
16213
+ /* @__PURE__ */ jsx151("span", { className: "text-xl flex-shrink-0", children: fmt.emoji }),
16214
+ /* @__PURE__ */ jsxs109("div", { className: "flex-1 min-w-0", children: [
16215
+ /* @__PURE__ */ jsx151("p", { className: cn("text-sm font-semibold", fmt.accent.text), children: isDownloading ? `Downloading ${fmt.label}...` : fmt.label }),
16216
+ /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-500 mt-0.5 leading-relaxed", children: isDownloading ? "Please wait while the file is being prepared." : fmt.desc })
16217
+ ] }),
16218
+ /* @__PURE__ */ jsx151("span", { className: cn("flex-shrink-0", fmt.accent.text), children: /* @__PURE__ */ jsx151(DownloadIcon, {}) })
16219
+ ]
16220
+ },
16221
+ fmt.key
16222
+ );
16223
+ })
16224
+ ] }),
16225
+ /* @__PURE__ */ jsx151("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in 90 days" })
16226
+ ] })
16227
+ ] }),
16228
+ document.body
16229
+ );
16226
16230
  };
16227
16231
  var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) => {
16228
16232
  const [currentSlide, setCurrentSlide] = useState10(initialSlide);
@@ -16266,81 +16270,84 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
16266
16270
  setCurrentSlide(newSlide);
16267
16271
  iframe.contentWindow.postMessage({ type: "goToSlide", slide: newSlide }, "*");
16268
16272
  };
16269
- return /* @__PURE__ */ jsxs109("div", { className: "fixed inset-0 z-50 bg-black flex flex-col", children: [
16270
- /* @__PURE__ */ jsxs109("div", { className: "flex items-center justify-between gap-4 px-4 h-11 bg-zinc-950/90 border-b border-zinc-800/60 flex-shrink-0", children: [
16271
- /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-3 min-w-0", children: [
16272
- /* @__PURE__ */ jsx151("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ jsx151(SlidesIcon, {}) }),
16273
- /* @__PURE__ */ jsx151("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title }),
16274
- slideCount > 0 && /* @__PURE__ */ jsxs109("span", { className: "text-xs text-zinc-600 flex-shrink-0", children: [
16275
- currentSlide,
16276
- " / ",
16277
- slideCount
16273
+ return createPortal(
16274
+ /* @__PURE__ */ jsxs109("div", { className: "fixed inset-0 z-[100] bg-black flex flex-col", children: [
16275
+ /* @__PURE__ */ jsxs109("div", { className: "flex items-center justify-between gap-4 px-4 h-11 bg-zinc-950/90 border-b border-zinc-800/60 flex-shrink-0", children: [
16276
+ /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-3 min-w-0", children: [
16277
+ /* @__PURE__ */ jsx151("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ jsx151(SlidesIcon, {}) }),
16278
+ /* @__PURE__ */ jsx151("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title }),
16279
+ slideCount > 0 && /* @__PURE__ */ jsxs109("span", { className: "text-xs text-zinc-600 flex-shrink-0", children: [
16280
+ currentSlide,
16281
+ " / ",
16282
+ slideCount
16283
+ ] })
16284
+ ] }),
16285
+ /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
16286
+ /* @__PURE__ */ jsx151(
16287
+ "button",
16288
+ {
16289
+ onClick: () => sendSlideCommand("prevSlide"),
16290
+ disabled: !iframeReady,
16291
+ className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
16292
+ "aria-label": "Previous slide",
16293
+ children: /* @__PURE__ */ jsx151(ChevronLeft2, {})
16294
+ }
16295
+ ),
16296
+ /* @__PURE__ */ jsx151(
16297
+ "button",
16298
+ {
16299
+ onClick: () => sendSlideCommand("nextSlide"),
16300
+ disabled: !iframeReady,
16301
+ className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
16302
+ "aria-label": "Next slide",
16303
+ children: /* @__PURE__ */ jsx151(ChevronRight2, {})
16304
+ }
16305
+ ),
16306
+ /* @__PURE__ */ jsxs109(
16307
+ "button",
16308
+ {
16309
+ onClick: onClose,
16310
+ className: "flex items-center gap-1.5 px-3 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs transition-colors",
16311
+ children: [
16312
+ /* @__PURE__ */ jsx151(CloseIcon, {}),
16313
+ /* @__PURE__ */ jsx151("span", { children: "ESC" })
16314
+ ]
16315
+ }
16316
+ )
16278
16317
  ] })
16279
16318
  ] }),
16280
- /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
16281
- /* @__PURE__ */ jsx151(
16282
- "button",
16283
- {
16284
- onClick: () => sendSlideCommand("prevSlide"),
16285
- disabled: !iframeReady,
16286
- className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
16287
- "aria-label": "Previous slide",
16288
- children: /* @__PURE__ */ jsx151(ChevronLeft2, {})
16289
- }
16290
- ),
16291
- /* @__PURE__ */ jsx151(
16292
- "button",
16293
- {
16294
- onClick: () => sendSlideCommand("nextSlide"),
16295
- disabled: !iframeReady,
16296
- className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
16297
- "aria-label": "Next slide",
16298
- children: /* @__PURE__ */ jsx151(ChevronRight2, {})
16299
- }
16300
- ),
16301
- /* @__PURE__ */ jsxs109(
16302
- "button",
16303
- {
16304
- onClick: onClose,
16305
- className: "flex items-center gap-1.5 px-3 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs transition-colors",
16306
- children: [
16307
- /* @__PURE__ */ jsx151(CloseIcon, {}),
16308
- /* @__PURE__ */ jsx151("span", { children: "ESC" })
16309
- ]
16310
- }
16311
- )
16312
- ] })
16313
- ] }),
16314
- /* @__PURE__ */ jsx151("div", { ref: containerRef, className: "flex-1 relative flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx151(
16315
- "div",
16316
- {
16317
- className: "relative",
16318
- style: { width: canvasW * scale, height: canvasH * scale },
16319
- children: /* @__PURE__ */ jsx151(
16320
- "iframe",
16321
- {
16322
- ref: iframeRef,
16323
- src: url,
16324
- title,
16325
- onLoad: () => {
16326
- setIframeReady(true);
16327
- hideDeckChrome(iframeRef.current);
16328
- iframeRef.current?.contentWindow?.postMessage({ type: "goToSlide", slide: initialSlide }, "*");
16329
- },
16330
- sandbox: "allow-same-origin allow-scripts",
16331
- allow: "fullscreen",
16332
- className: "absolute top-0 left-0 border-0",
16333
- style: {
16334
- width: canvasW,
16335
- height: canvasH,
16336
- transform: `scale(${scale})`,
16337
- transformOrigin: "top left"
16319
+ /* @__PURE__ */ jsx151("div", { ref: containerRef, className: "flex-1 relative flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx151(
16320
+ "div",
16321
+ {
16322
+ className: "relative",
16323
+ style: { width: canvasW * scale, height: canvasH * scale },
16324
+ children: /* @__PURE__ */ jsx151(
16325
+ "iframe",
16326
+ {
16327
+ ref: iframeRef,
16328
+ src: url,
16329
+ title,
16330
+ onLoad: () => {
16331
+ setIframeReady(true);
16332
+ hideDeckChrome(iframeRef.current);
16333
+ iframeRef.current?.contentWindow?.postMessage({ type: "goToSlide", slide: initialSlide }, "*");
16334
+ },
16335
+ sandbox: "allow-same-origin allow-scripts",
16336
+ allow: "fullscreen",
16337
+ className: "absolute top-0 left-0 border-0",
16338
+ style: {
16339
+ width: canvasW,
16340
+ height: canvasH,
16341
+ transform: `scale(${scale})`,
16342
+ transformOrigin: "top left"
16343
+ }
16338
16344
  }
16339
- }
16340
- )
16341
- }
16342
- ) })
16343
- ] });
16345
+ )
16346
+ }
16347
+ ) })
16348
+ ] }),
16349
+ document.body
16350
+ );
16344
16351
  };
16345
16352
  var PresentationJobCard = ({
16346
16353
  job_id: _job_id,
@@ -17436,7 +17443,7 @@ var FullscreenPreviewModal = ({ url, title, onClose, isPdf }) => {
17436
17443
  src: url,
17437
17444
  title,
17438
17445
  className: "absolute inset-0 w-full h-full border-0",
17439
- ...isPdf ? {} : { sandbox: "allow-same-origin" }
17446
+ ...isPdf ? {} : { sandbox: "allow-same-origin allow-scripts" }
17440
17447
  }
17441
17448
  ) })
17442
17449
  ] });
@@ -18478,7 +18485,7 @@ var ResearchReportJobCard = (props) => {
18478
18485
  {
18479
18486
  src: htmlUrl,
18480
18487
  title,
18481
- sandbox: "allow-same-origin",
18488
+ sandbox: "allow-same-origin allow-scripts",
18482
18489
  className: "absolute inset-0 block h-full w-full border-0 pointer-events-none"
18483
18490
  }
18484
18491
  ),