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.cjs CHANGED
@@ -16126,6 +16126,7 @@ var NextStepCard = ({
16126
16126
 
16127
16127
  // src/molecules/generic/PresentationJobCard/PresentationJobCard.tsx
16128
16128
  var import_react81 = require("react");
16129
+ var import_react_dom = require("react-dom");
16129
16130
 
16130
16131
  // src/lib/shared-poll.ts
16131
16132
  var import_react79 = require("react");
@@ -16519,48 +16520,51 @@ var ExportModal = ({ formats, title, onClose }) => {
16519
16520
  setDownloadingKey(null);
16520
16521
  }
16521
16522
  };
16522
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
16523
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "absolute inset-0 bg-black/70 backdrop-blur-sm", onClick: onClose }),
16524
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "relative z-10 bg-zinc-900 border border-zinc-800 rounded-2xl w-full max-w-sm p-6 shadow-2xl", children: [
16525
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-start justify-between mb-5", children: [
16526
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "min-w-0 pr-3", children: [
16527
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("h3", { className: "text-sm font-semibold text-zinc-100", children: "Export Presentation" }),
16528
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-500 mt-0.5 truncate", children: title })
16523
+ return (0, import_react_dom.createPortal)(
16524
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
16525
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "absolute inset-0 bg-black/70 backdrop-blur-sm", onClick: onClose }),
16526
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "relative z-10 bg-zinc-900 border border-zinc-800 rounded-2xl w-full max-w-sm p-6 shadow-2xl", children: [
16527
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-start justify-between mb-5", children: [
16528
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "min-w-0 pr-3", children: [
16529
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("h3", { className: "text-sm font-semibold text-zinc-100", children: "Export Presentation" }),
16530
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-500 mt-0.5 truncate", children: title })
16531
+ ] }),
16532
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("button", { onClick: onClose, className: "text-zinc-500 hover:text-zinc-200 transition-colors flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CloseIcon, {}) })
16529
16533
  ] }),
16530
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("button", { onClick: onClose, className: "text-zinc-500 hover:text-zinc-200 transition-colors flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CloseIcon, {}) })
16531
- ] }),
16532
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "space-y-2.5", children: [
16533
- available.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-sm text-zinc-500 text-center py-6", children: "No formats available yet" }),
16534
- available.map((fmt) => {
16535
- const url = formats[fmt.key];
16536
- const isDownloading = downloadingKey === fmt.key;
16537
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
16538
- "button",
16539
- {
16540
- type: "button",
16541
- disabled: Boolean(downloadingKey),
16542
- onClick: () => handleDownload(fmt.key, url, fmt.ext),
16543
- className: cn(
16544
- "flex w-full items-center gap-3.5 p-3.5 rounded-xl border transition-all text-left",
16545
- "hover:brightness-110 disabled:opacity-60 disabled:cursor-not-allowed",
16546
- fmt.accent.bg
16547
- ),
16548
- children: [
16549
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-xl flex-shrink-0", children: fmt.emoji }),
16550
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
16551
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: cn("text-sm font-semibold", fmt.accent.text), children: isDownloading ? `Downloading ${fmt.label}...` : fmt.label }),
16552
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-500 mt-0.5 leading-relaxed", children: isDownloading ? "Please wait while the file is being prepared." : fmt.desc })
16553
- ] }),
16554
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn("flex-shrink-0", fmt.accent.text), children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(DownloadIcon, {}) })
16555
- ]
16556
- },
16557
- fmt.key
16558
- );
16559
- })
16560
- ] }),
16561
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in 90 days" })
16562
- ] })
16563
- ] });
16534
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "space-y-2.5", children: [
16535
+ available.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-sm text-zinc-500 text-center py-6", children: "No formats available yet" }),
16536
+ available.map((fmt) => {
16537
+ const url = formats[fmt.key];
16538
+ const isDownloading = downloadingKey === fmt.key;
16539
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
16540
+ "button",
16541
+ {
16542
+ type: "button",
16543
+ disabled: Boolean(downloadingKey),
16544
+ onClick: () => handleDownload(fmt.key, url, fmt.ext),
16545
+ className: cn(
16546
+ "flex w-full items-center gap-3.5 p-3.5 rounded-xl border transition-all text-left",
16547
+ "hover:brightness-110 disabled:opacity-60 disabled:cursor-not-allowed",
16548
+ fmt.accent.bg
16549
+ ),
16550
+ children: [
16551
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-xl flex-shrink-0", children: fmt.emoji }),
16552
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
16553
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: cn("text-sm font-semibold", fmt.accent.text), children: isDownloading ? `Downloading ${fmt.label}...` : fmt.label }),
16554
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-500 mt-0.5 leading-relaxed", children: isDownloading ? "Please wait while the file is being prepared." : fmt.desc })
16555
+ ] }),
16556
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn("flex-shrink-0", fmt.accent.text), children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(DownloadIcon, {}) })
16557
+ ]
16558
+ },
16559
+ fmt.key
16560
+ );
16561
+ })
16562
+ ] }),
16563
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in 90 days" })
16564
+ ] })
16565
+ ] }),
16566
+ document.body
16567
+ );
16564
16568
  };
16565
16569
  var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) => {
16566
16570
  const [currentSlide, setCurrentSlide] = (0, import_react81.useState)(initialSlide);
@@ -16604,81 +16608,84 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
16604
16608
  setCurrentSlide(newSlide);
16605
16609
  iframe.contentWindow.postMessage({ type: "goToSlide", slide: newSlide }, "*");
16606
16610
  };
16607
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "fixed inset-0 z-50 bg-black flex flex-col", children: [
16608
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("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: [
16609
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
16610
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(SlidesIcon, {}) }),
16611
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title }),
16612
- slideCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "text-xs text-zinc-600 flex-shrink-0", children: [
16613
- currentSlide,
16614
- " / ",
16615
- slideCount
16611
+ return (0, import_react_dom.createPortal)(
16612
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "fixed inset-0 z-[100] bg-black flex flex-col", children: [
16613
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("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: [
16614
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
16615
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(SlidesIcon, {}) }),
16616
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title }),
16617
+ slideCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "text-xs text-zinc-600 flex-shrink-0", children: [
16618
+ currentSlide,
16619
+ " / ",
16620
+ slideCount
16621
+ ] })
16622
+ ] }),
16623
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
16624
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16625
+ "button",
16626
+ {
16627
+ onClick: () => sendSlideCommand("prevSlide"),
16628
+ disabled: !iframeReady,
16629
+ 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",
16630
+ "aria-label": "Previous slide",
16631
+ children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(ChevronLeft2, {})
16632
+ }
16633
+ ),
16634
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16635
+ "button",
16636
+ {
16637
+ onClick: () => sendSlideCommand("nextSlide"),
16638
+ disabled: !iframeReady,
16639
+ 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",
16640
+ "aria-label": "Next slide",
16641
+ children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(ChevronRight2, {})
16642
+ }
16643
+ ),
16644
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
16645
+ "button",
16646
+ {
16647
+ onClick: onClose,
16648
+ 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",
16649
+ children: [
16650
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CloseIcon, {}),
16651
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { children: "ESC" })
16652
+ ]
16653
+ }
16654
+ )
16616
16655
  ] })
16617
16656
  ] }),
16618
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
16619
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16620
- "button",
16621
- {
16622
- onClick: () => sendSlideCommand("prevSlide"),
16623
- disabled: !iframeReady,
16624
- 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",
16625
- "aria-label": "Previous slide",
16626
- children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(ChevronLeft2, {})
16627
- }
16628
- ),
16629
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16630
- "button",
16631
- {
16632
- onClick: () => sendSlideCommand("nextSlide"),
16633
- disabled: !iframeReady,
16634
- 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",
16635
- "aria-label": "Next slide",
16636
- children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(ChevronRight2, {})
16637
- }
16638
- ),
16639
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
16640
- "button",
16641
- {
16642
- onClick: onClose,
16643
- 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",
16644
- children: [
16645
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CloseIcon, {}),
16646
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { children: "ESC" })
16647
- ]
16648
- }
16649
- )
16650
- ] })
16651
- ] }),
16652
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { ref: containerRef, className: "flex-1 relative flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16653
- "div",
16654
- {
16655
- className: "relative",
16656
- style: { width: canvasW * scale, height: canvasH * scale },
16657
- children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16658
- "iframe",
16659
- {
16660
- ref: iframeRef,
16661
- src: url,
16662
- title,
16663
- onLoad: () => {
16664
- setIframeReady(true);
16665
- hideDeckChrome(iframeRef.current);
16666
- iframeRef.current?.contentWindow?.postMessage({ type: "goToSlide", slide: initialSlide }, "*");
16667
- },
16668
- sandbox: "allow-same-origin allow-scripts",
16669
- allow: "fullscreen",
16670
- className: "absolute top-0 left-0 border-0",
16671
- style: {
16672
- width: canvasW,
16673
- height: canvasH,
16674
- transform: `scale(${scale})`,
16675
- transformOrigin: "top left"
16657
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { ref: containerRef, className: "flex-1 relative flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16658
+ "div",
16659
+ {
16660
+ className: "relative",
16661
+ style: { width: canvasW * scale, height: canvasH * scale },
16662
+ children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
16663
+ "iframe",
16664
+ {
16665
+ ref: iframeRef,
16666
+ src: url,
16667
+ title,
16668
+ onLoad: () => {
16669
+ setIframeReady(true);
16670
+ hideDeckChrome(iframeRef.current);
16671
+ iframeRef.current?.contentWindow?.postMessage({ type: "goToSlide", slide: initialSlide }, "*");
16672
+ },
16673
+ sandbox: "allow-same-origin allow-scripts",
16674
+ allow: "fullscreen",
16675
+ className: "absolute top-0 left-0 border-0",
16676
+ style: {
16677
+ width: canvasW,
16678
+ height: canvasH,
16679
+ transform: `scale(${scale})`,
16680
+ transformOrigin: "top left"
16681
+ }
16676
16682
  }
16677
- }
16678
- )
16679
- }
16680
- ) })
16681
- ] });
16683
+ )
16684
+ }
16685
+ ) })
16686
+ ] }),
16687
+ document.body
16688
+ );
16682
16689
  };
16683
16690
  var PresentationJobCard = ({
16684
16691
  job_id: _job_id,
@@ -17774,7 +17781,7 @@ var FullscreenPreviewModal = ({ url, title, onClose, isPdf }) => {
17774
17781
  src: url,
17775
17782
  title,
17776
17783
  className: "absolute inset-0 w-full h-full border-0",
17777
- ...isPdf ? {} : { sandbox: "allow-same-origin" }
17784
+ ...isPdf ? {} : { sandbox: "allow-same-origin allow-scripts" }
17778
17785
  }
17779
17786
  ) })
17780
17787
  ] });
@@ -18816,7 +18823,7 @@ var ResearchReportJobCard = (props) => {
18816
18823
  {
18817
18824
  src: htmlUrl,
18818
18825
  title,
18819
- sandbox: "allow-same-origin",
18826
+ sandbox: "allow-same-origin allow-scripts",
18820
18827
  className: "absolute inset-0 block h-full w-full border-0 pointer-events-none"
18821
18828
  }
18822
18829
  ),
@@ -21674,7 +21681,7 @@ function CreatorCompactView({
21674
21681
 
21675
21682
  // src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
21676
21683
  var import_react95 = require("react");
21677
- var import_react_dom2 = __toESM(require("react-dom"), 1);
21684
+ var import_react_dom3 = __toESM(require("react-dom"), 1);
21678
21685
  var import_framer_motion5 = require("framer-motion");
21679
21686
 
21680
21687
  // src/molecules/creator-discovery/CreatorWidget/defaultFetchers.ts
@@ -22373,7 +22380,7 @@ function PlatformPostsSection({
22373
22380
 
22374
22381
  // src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
22375
22382
  var import_react93 = require("react");
22376
- var import_react_dom = __toESM(require("react-dom"), 1);
22383
+ var import_react_dom2 = __toESM(require("react-dom"), 1);
22377
22384
  var import_framer_motion3 = require("framer-motion");
22378
22385
  var import_jsx_runtime178 = require("react/jsx-runtime");
22379
22386
  var getSentimentRank = (score) => {
@@ -22419,7 +22426,7 @@ function BrandMentionDetails({
22419
22426
  (m) => m.normalizedBrand?.toLowerCase() === selectedBrand?.toLowerCase() || m.brand?.toLowerCase() === selectedBrand?.toLowerCase()
22420
22427
  ) || [];
22421
22428
  if (typeof window === "undefined") return null;
22422
- return import_react_dom.default.createPortal(
22429
+ return import_react_dom2.default.createPortal(
22423
22430
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_framer_motion3.AnimatePresence, { mode: "sync", children: open && /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
22424
22431
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
22425
22432
  import_framer_motion3.motion.div,
@@ -23394,7 +23401,7 @@ function CreatorExpandedPanel({
23394
23401
  }
23395
23402
  }, [isOpen, loadCreators]);
23396
23403
  if (typeof window === "undefined") return null;
23397
- return import_react_dom2.default.createPortal(
23404
+ return import_react_dom3.default.createPortal(
23398
23405
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_framer_motion5.AnimatePresence, { mode: "sync", children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_jsx_runtime180.Fragment, { children: [
23399
23406
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
23400
23407
  import_framer_motion5.motion.div,