@lv-x-software-house/x_view 1.3.7 → 1.3.9

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.
Files changed (3) hide show
  1. package/dist/index.js +430 -279
  2. package/dist/index.mjs +354 -203
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  // src/XViewScene.jsx
2
- import React36, {
2
+ import React37, {
3
3
  useCallback as useCallback8,
4
4
  useEffect as useEffect27,
5
5
  useRef as useRef25,
6
- useState as useState33,
6
+ useState as useState34,
7
7
  useMemo as useMemo15
8
8
  } from "react";
9
9
  import { useRouter, useSearchParams } from "next/navigation";
@@ -2169,7 +2169,6 @@ var userActionHandlers = {
2169
2169
  }
2170
2170
  });
2171
2171
  if (updates.length > 0) {
2172
- console.log(`[syncQuestTemplateFlags] Sincronizando ${updates.length} quests...`);
2173
2172
  for (const quest of updates) {
2174
2173
  const idx = sceneDataRef.current.quest_nodes.findIndex((q) => String(q.id) === String(quest.id));
2175
2174
  if (idx !== -1) sceneDataRef.current.quest_nodes[idx] = quest;
@@ -2511,7 +2510,7 @@ var userActionHandlers = {
2511
2510
  if (actions.delete_file && nodeData) {
2512
2511
  const urls = extractFileUrlsFromProperties(nodeData);
2513
2512
  if (urls.length > 0) {
2514
- Promise.all(urls.map((url) => actions.delete_file(url))).then(() => console.log("Arquivos do node deletados.")).catch(
2513
+ Promise.all(urls.map((url) => actions.delete_file(url))).catch(
2515
2514
  (err) => console.error("Erro ao deletar arquivos do node:", err)
2516
2515
  );
2517
2516
  }
@@ -2922,7 +2921,6 @@ var userActionHandlers = {
2922
2921
  }
2923
2922
  if (foundProcess && foundTreeContext) {
2924
2923
  if (foundTreeContext.nodeRef.is_choice) {
2925
- console.log("N\xF3 de escolha detectado. Aguardando sele\xE7\xE3o manual.");
2926
2924
  keepOpen = true;
2927
2925
  if (context.setters.setDetailsNode) {
2928
2926
  context.setters.setDetailsNode({ ...nodeToSave, _scrollToChoice: true });
@@ -5121,8 +5119,8 @@ function ContextMenu({
5121
5119
  const handleClickOutside = (e) => {
5122
5120
  if (menuRef.current && !menuRef.current.contains(e.target)) onClose();
5123
5121
  };
5124
- document.addEventListener("mousedown", handleClickOutside);
5125
- return () => document.removeEventListener("mousedown", handleClickOutside);
5122
+ document.addEventListener("pointerdown", handleClickOutside);
5123
+ return () => document.removeEventListener("pointerdown", handleClickOutside);
5126
5124
  }, [data.visible, onClose]);
5127
5125
  const visibleLinkIds = useMemo(() => {
5128
5126
  var _a2;
@@ -5562,7 +5560,7 @@ function ContextMenu({
5562
5560
  "div",
5563
5561
  {
5564
5562
  ref: menuRef,
5565
- className: "ui-overlay context-menu-class origin-top-left rounded-xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white min-w-[220px] max-w-[min(95vw,420px)] w-max overflow-hidden",
5563
+ className: "ui-overlay context-menu-class origin-top-left rounded-xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white min-w-[220px] max-w-[min(95vw,420px)] max-h-[85vh] overflow-y-auto custom-scrollbar w-max",
5566
5564
  style: { position: "absolute", left: `${menuPos.left}px`, top: `${menuPos.top}px`, zIndex: 1e3 },
5567
5565
  onPointerDown: swallow,
5568
5566
  onPointerMove: swallow,
@@ -8341,7 +8339,6 @@ function DescriptionDisplay({
8341
8339
  mentionCount++;
8342
8340
  }
8343
8341
  });
8344
- console.log("[DescriptionDisplay] flatNavigation computed:", navItems.length, "items", navItems);
8345
8342
  return navItems;
8346
8343
  }, [sections]);
8347
8344
  const [currentStepIndex, setCurrentStepIndex] = useState7(0);
@@ -8388,24 +8385,14 @@ function DescriptionDisplay({
8388
8385
  const handleKeyDown = (e) => {
8389
8386
  if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA") return;
8390
8387
  const currentItem = flatNavigation[currentStepIndex];
8391
- if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
8392
- console.log(`[DescriptionDisplay] Key pressed: ${e.key}`, {
8393
- currentStepIndex,
8394
- flatNavigationLength: flatNavigation.length,
8395
- currentItem,
8396
- currentBranchDirection
8397
- });
8398
- }
8399
8388
  if (e.key === "ArrowRight") {
8400
8389
  e.preventDefault();
8401
8390
  e.stopPropagation();
8402
8391
  if (currentStepIndex === 0 && currentBranchDirection === "left") {
8403
- console.log("[DescriptionDisplay] ArrowRight: Navigating back from left branch");
8404
8392
  if (onBranchNav) onBranchNav(null, "back");
8405
8393
  return;
8406
8394
  }
8407
8395
  if (currentItem && currentItem.type === "mention" && onBranchNav) {
8408
- console.log("[DescriptionDisplay] ArrowRight: Opening right branch for node", currentItem.nodeId);
8409
8396
  onBranchNav(currentItem.nodeId, "open", "right");
8410
8397
  return;
8411
8398
  }
@@ -8414,12 +8401,10 @@ function DescriptionDisplay({
8414
8401
  e.preventDefault();
8415
8402
  e.stopPropagation();
8416
8403
  if (currentStepIndex === 0 && currentBranchDirection === "right") {
8417
- console.log("[DescriptionDisplay] ArrowLeft: Navigating back from right branch");
8418
8404
  if (onBranchNav) onBranchNav(null, "back");
8419
8405
  return;
8420
8406
  }
8421
8407
  if (currentItem && currentItem.type === "mention" && onBranchNav) {
8422
- console.log("[DescriptionDisplay] ArrowLeft: Opening left branch for node", currentItem.nodeId);
8423
8408
  onBranchNav(currentItem.nodeId, "open", "left");
8424
8409
  return;
8425
8410
  }
@@ -8427,29 +8412,16 @@ function DescriptionDisplay({
8427
8412
  if (e.key === "ArrowDown") {
8428
8413
  e.preventDefault();
8429
8414
  if (flatNavigation.length > 1) {
8430
- setCurrentStepIndex((prev) => {
8431
- const next = Math.min(prev + 1, flatNavigation.length - 1);
8432
- console.log(`[DescriptionDisplay] ArrowDown: ${prev} -> ${next}`);
8433
- return next;
8434
- });
8415
+ setCurrentStepIndex((prev) => Math.min(prev + 1, flatNavigation.length - 1));
8435
8416
  }
8436
8417
  }
8437
8418
  if (e.key === "ArrowUp") {
8438
8419
  e.preventDefault();
8439
8420
  if (flatNavigation.length > 1) {
8440
- setCurrentStepIndex((prev) => {
8441
- const next = Math.max(prev - 1, 0);
8442
- console.log(`[DescriptionDisplay] ArrowUp: ${prev} -> ${next}`);
8443
- return next;
8444
- });
8421
+ setCurrentStepIndex((prev) => Math.max(prev - 1, 0));
8445
8422
  }
8446
8423
  }
8447
8424
  };
8448
- console.log("[DescriptionDisplay] Attaching keydown listener", {
8449
- flatNavigationLength: flatNavigation.length,
8450
- currentStepIndex,
8451
- currentBranchDirection
8452
- });
8453
8425
  window.addEventListener("keydown", handleKeyDown);
8454
8426
  return () => {
8455
8427
  window.removeEventListener("keydown", handleKeyDown);
@@ -11868,7 +11840,6 @@ function InSceneCreationForm({
11868
11840
  if (typeInput.trim() === "") {
11869
11841
  result = validExistingTypes.filter((t) => !types.includes(t));
11870
11842
  } else {
11871
- console.log("InSceneCreationForm: Filtrando tipos com input:", typeInput);
11872
11843
  try {
11873
11844
  const lowercasedInput = typeInput.toLowerCase();
11874
11845
  result = validExistingTypes.filter((t) => {
@@ -13818,14 +13789,18 @@ function NodeDetailsPanel({
13818
13789
  });
13819
13790
  const [selectedImageUrl, setSelectedImageUrl] = useState20((node == null ? void 0 : node.textureImageUrl) ?? null);
13820
13791
  const [hasUnsavedChanges, setHasUnsavedChanges] = useState20(false);
13821
- const maxPanelW = typeof window !== "undefined" ? window.innerWidth * 0.92 : 1200;
13792
+ const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
13793
+ const maxPanelW = typeof window !== "undefined" ? Math.min(window.innerWidth - 32, 1200) : 1200;
13794
+ const defaultWidth = isMobile ? typeof window !== "undefined" ? window.innerWidth - 32 : 360 : isReadMode ? 700 : 440;
13822
13795
  const { width: panelWidth, isResizing, handlePointerDown: handleResize, setWidth } = useResizablePanel({
13823
- initialWidth: isReadMode ? 700 : 440,
13824
- minWidth: 320,
13796
+ initialWidth: defaultWidth,
13797
+ minWidth: typeof window !== "undefined" ? Math.min(280, window.innerWidth - 32) : 280,
13825
13798
  maxWidth: maxPanelW
13826
13799
  });
13827
13800
  useEffect17(() => {
13828
- setWidth(isReadMode ? 700 : 440);
13801
+ const isMob = typeof window !== "undefined" && window.innerWidth < 640;
13802
+ const targetW = isMob ? typeof window !== "undefined" ? window.innerWidth - 32 : 360 : isReadMode ? 700 : 440;
13803
+ setWidth(targetW);
13829
13804
  }, [isReadMode, setWidth]);
13830
13805
  const prevNodeIdRef = useRef15(null);
13831
13806
  const propsEndRef = useRef15(null);
@@ -13871,7 +13846,6 @@ function NodeDetailsPanel({
13871
13846
  if (typeInput.trim() === "") {
13872
13847
  setFilteredTypes(validExistingTypes.filter((t) => !types.includes(t)));
13873
13848
  } else {
13874
- console.log("NodeDetailsPanel: Filtrando tipos com input:", typeInput);
13875
13849
  try {
13876
13850
  const lowercasedInput = typeInput.toLowerCase();
13877
13851
  setFilteredTypes(
@@ -14839,7 +14813,6 @@ function QuestDetailsPanel({
14839
14813
  if (typeInput.trim() === "") {
14840
14814
  setFilteredTypes(validExistingTypes.filter((t) => !types.includes(t)));
14841
14815
  } else {
14842
- console.log("QuestDetailsPanel: Filtrando tipos com input:", typeInput);
14843
14816
  try {
14844
14817
  const lowercasedInput = typeInput.toLowerCase();
14845
14818
  setFilteredTypes(
@@ -17523,8 +17496,8 @@ function MultiNodeContextMenu({
17523
17496
  const handleClickOutside = (e) => {
17524
17497
  if (menuRef.current && !menuRef.current.contains(e.target)) onClose();
17525
17498
  };
17526
- document.addEventListener("mousedown", handleClickOutside);
17527
- return () => document.removeEventListener("mousedown", handleClickOutside);
17499
+ document.addEventListener("pointerdown", handleClickOutside);
17500
+ return () => document.removeEventListener("pointerdown", handleClickOutside);
17528
17501
  }, [data.visible, onClose]);
17529
17502
  if (!data.visible || !data.nodeIds || data.nodeIds.size === 0) return null;
17530
17503
  const swallow = (e) => e.stopPropagation();
@@ -17965,8 +17938,8 @@ function RelationshipContextMenu({
17965
17938
  const handleClickOutside = (e) => {
17966
17939
  if (menuRef.current && !menuRef.current.contains(e.target)) onClose();
17967
17940
  };
17968
- document.addEventListener("mousedown", handleClickOutside);
17969
- return () => document.removeEventListener("mousedown", handleClickOutside);
17941
+ document.addEventListener("pointerdown", handleClickOutside);
17942
+ return () => document.removeEventListener("pointerdown", handleClickOutside);
17970
17943
  }, [data.visible, onClose]);
17971
17944
  if (!data.visible) return null;
17972
17945
  const swallow = (e) => e.stopPropagation();
@@ -19559,63 +19532,201 @@ function MilestoneManager({
19559
19532
  }
19560
19533
 
19561
19534
  // src/components/UpgradeModal.jsx
19535
+ import React36, { useState as useState33 } from "react";
19536
+
19537
+ // src/components/icons/UltraMinimalIcon.jsx
19562
19538
  import React35 from "react";
19563
- import { Sparkles, X, Rocket, Zap, ShieldCheck } from "lucide-react";
19539
+ function UltraMinimalIcon({
19540
+ size = 13,
19541
+ className = "",
19542
+ strokeWidth = 1.5,
19543
+ ...props
19544
+ }) {
19545
+ return /* @__PURE__ */ React35.createElement(
19546
+ "svg",
19547
+ {
19548
+ width: size,
19549
+ height: size,
19550
+ viewBox: "0 0 24 24",
19551
+ fill: "none",
19552
+ xmlns: "http://www.w3.org/2000/svg",
19553
+ className: `inline-block shrink-0 transition-transform duration-200 ${className}`,
19554
+ ...props
19555
+ },
19556
+ /* @__PURE__ */ React35.createElement(
19557
+ "path",
19558
+ {
19559
+ d: "M6 3h12l4 6-10 12L2 9l4-6z",
19560
+ stroke: "currentColor",
19561
+ strokeWidth,
19562
+ strokeLinecap: "round",
19563
+ strokeLinejoin: "round"
19564
+ }
19565
+ ),
19566
+ /* @__PURE__ */ React35.createElement(
19567
+ "path",
19568
+ {
19569
+ d: "M11 3v6",
19570
+ stroke: "currentColor",
19571
+ strokeWidth,
19572
+ strokeLinecap: "round",
19573
+ strokeLinejoin: "round"
19574
+ }
19575
+ ),
19576
+ /* @__PURE__ */ React35.createElement(
19577
+ "path",
19578
+ {
19579
+ d: "M13 3v6",
19580
+ stroke: "currentColor",
19581
+ strokeWidth,
19582
+ strokeLinecap: "round",
19583
+ strokeLinejoin: "round"
19584
+ }
19585
+ ),
19586
+ /* @__PURE__ */ React35.createElement(
19587
+ "path",
19588
+ {
19589
+ d: "M2 9h20",
19590
+ stroke: "currentColor",
19591
+ strokeWidth,
19592
+ strokeLinecap: "round",
19593
+ strokeLinejoin: "round"
19594
+ }
19595
+ ),
19596
+ /* @__PURE__ */ React35.createElement(
19597
+ "path",
19598
+ {
19599
+ d: "M12 21L8 9",
19600
+ stroke: "currentColor",
19601
+ strokeWidth,
19602
+ strokeLinecap: "round",
19603
+ strokeLinejoin: "round"
19604
+ }
19605
+ ),
19606
+ /* @__PURE__ */ React35.createElement(
19607
+ "path",
19608
+ {
19609
+ d: "M12 21l4-12",
19610
+ stroke: "currentColor",
19611
+ strokeWidth,
19612
+ strokeLinecap: "round",
19613
+ strokeLinejoin: "round"
19614
+ }
19615
+ )
19616
+ );
19617
+ }
19618
+
19619
+ // src/components/UpgradeModal.jsx
19564
19620
  function UpgradeModal({
19565
19621
  isOpen,
19566
19622
  onClose,
19567
- nodeCounter,
19623
+ nodeCounter = 0,
19568
19624
  nodeLimit = 100,
19625
+ plan,
19569
19626
  onUpgrade
19570
19627
  }) {
19628
+ const [isSubmitting, setIsSubmitting] = useState33(false);
19571
19629
  if (!isOpen) return null;
19572
- return /* @__PURE__ */ React35.createElement("div", { className: "fixed inset-0 z-[10000] flex items-center justify-center p-4" }, /* @__PURE__ */ React35.createElement("style", null, `
19573
- @keyframes modalShow {
19574
- from { opacity: 0; transform: scale(0.95); }
19575
- to { opacity: 1; transform: scale(1); }
19576
- }
19577
- @keyframes backdropShow {
19578
- from { opacity: 0; }
19579
- to { opacity: 1; }
19580
- }
19581
- .animate-modal { animation: modalShow 0.3s ease-out forwards; }
19582
- .animate-backdrop { animation: backdropShow 0.3s ease-out forwards; }
19583
- `), /* @__PURE__ */ React35.createElement(
19630
+ const currentPlan = plan || (nodeLimit === -1 ? "premium" : "free");
19631
+ const handleUpgradeClick = async () => {
19632
+ if (isSubmitting) return;
19633
+ setIsSubmitting(true);
19634
+ try {
19635
+ if (onUpgrade) {
19636
+ await onUpgrade();
19637
+ } else {
19638
+ alert("Redirecting to checkout...");
19639
+ }
19640
+ } catch (error) {
19641
+ console.error("Error during upgrade:", error);
19642
+ } finally {
19643
+ setIsSubmitting(false);
19644
+ }
19645
+ };
19646
+ const limit = nodeLimit === -1 ? 100 : nodeLimit;
19647
+ const safeNodeCounter = Math.max(0, nodeCounter || 0);
19648
+ const usagePercentage = Math.min(
19649
+ 100,
19650
+ Math.round(safeNodeCounter / limit * 100)
19651
+ );
19652
+ return /* @__PURE__ */ React36.createElement("div", { className: "fixed inset-0 bg-slate-950/40 backdrop-blur-md z-[10000] flex justify-center items-center p-4 animate-in fade-in duration-300 font-sans select-none" }, /* @__PURE__ */ React36.createElement("div", { className: "bg-[#0b1224]/80 border border-cyan-600/20 p-7 rounded-3xl shadow-[0_0_50px_-12px_rgba(6,182,212,0.2)] w-full max-w-[380px] relative text-center overflow-hidden animate-in zoom-in-95 duration-300" }, /* @__PURE__ */ React36.createElement("div", { className: "absolute -top-20 left-1/2 -translate-x-1/2 w-40 h-40 bg-cyan-600/10 rounded-full blur-[60px] pointer-events-none" }), /* @__PURE__ */ React36.createElement("div", { className: "flex justify-center mb-4 relative" }, /* @__PURE__ */ React36.createElement("div", { className: "relative w-14 h-14 flex items-center justify-center" }, /* @__PURE__ */ React36.createElement("div", { className: "absolute inset-0 bg-cyan-500 rounded-full blur-2xl opacity-20 animate-pulse" }), /* @__PURE__ */ React36.createElement("div", { className: "relative w-12 h-12 rounded-xl bg-slate-900 border border-cyan-400/30 shadow-lg flex items-center justify-center z-10 animate-float" }, /* @__PURE__ */ React36.createElement(
19653
+ UltraMinimalIcon,
19654
+ {
19655
+ size: 22,
19656
+ className: "text-cyan-400",
19657
+ strokeWidth: 2
19658
+ }
19659
+ )))), /* @__PURE__ */ React36.createElement("h2", { className: "text-xl font-bold text-white mb-1 tracking-tight font-sans" }, "Upgrade x.plore"), /* @__PURE__ */ React36.createElement("p", { className: "text-slate-400 text-[11px] mb-6 leading-relaxed px-4 font-medium italic" }, "Unlock unlimited nodes and community features."), /* @__PURE__ */ React36.createElement("div", { className: "grid grid-cols-2 gap-3 mb-3 text-left" }, /* @__PURE__ */ React36.createElement("div", { className: "bg-gradient-to-b from-[#0e172a]/90 to-[#070c18]/90 border border-cyan-500/20 hover:border-cyan-400/40 p-3.5 rounded-2xl flex flex-col justify-between shadow-md transition-all duration-300" }, /* @__PURE__ */ React36.createElement("div", null, /* @__PURE__ */ React36.createElement("span", { className: "text-xs font-sans font-normal text-cyan-400/80 tracking-normal block mb-1.5" }, "Node Usage"), /* @__PURE__ */ React36.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React36.createElement("span", { className: "text-lg font-bold text-white font-sans tracking-tight" }, nodeCounter), /* @__PURE__ */ React36.createElement("span", { className: "text-xs font-sans font-medium text-slate-400" }, "/ ", currentPlan === "premium" ? "\u221E" : "100"))), currentPlan !== "premium" && /* @__PURE__ */ React36.createElement("div", { className: "mt-2.5" }, /* @__PURE__ */ React36.createElement("div", { className: "w-full h-1.5 bg-slate-900 border border-white/5 rounded-full overflow-hidden p-[1px]" }, /* @__PURE__ */ React36.createElement(
19584
19660
  "div",
19585
19661
  {
19586
- className: "absolute inset-0 bg-black/60 backdrop-blur-xl animate-backdrop",
19587
- onClick: onClose
19662
+ className: `h-full rounded-full transition-all duration-500 ${usagePercentage >= 100 ? "bg-gradient-to-r from-rose-500 to-pink-500 shadow-[0_0_8px_#f43f5e]" : "bg-gradient-to-r from-cyan-500 to-sky-300 shadow-[0_0_8px_#22d3ee]"}`,
19663
+ style: { width: `${usagePercentage}%` }
19588
19664
  }
19589
- ), /* @__PURE__ */ React35.createElement("div", { className: "relative w-full max-w-xl overflow-hidden rounded-[2.5rem] border border-white/10 bg-[#0d1117]/80 shadow-[0_0_100px_-20px_rgba(56,189,248,0.3)] animate-modal" }, /* @__PURE__ */ React35.createElement("div", { className: "absolute inset-0 -z-10 bg-gradient-to-br from-sky-500/10 via-transparent to-purple-500/10" }), /* @__PURE__ */ React35.createElement("div", { className: "absolute -top-24 -left-24 w-48 h-48 bg-sky-500/20 blur-[100px] rounded-full" }), /* @__PURE__ */ React35.createElement("div", { className: "absolute -bottom-24 -right-24 w-48 h-48 bg-purple-500/20 blur-[100px] rounded-full" }), /* @__PURE__ */ React35.createElement(
19665
+ )))), /* @__PURE__ */ React36.createElement("div", { className: "bg-gradient-to-b from-[#0e172a]/90 to-[#070c18]/90 border border-cyan-500/20 hover:border-cyan-400/40 p-3.5 rounded-2xl flex flex-col justify-between shadow-md transition-all duration-300" }, /* @__PURE__ */ React36.createElement("div", null, /* @__PURE__ */ React36.createElement("span", { className: "text-xs font-sans font-normal text-cyan-400/80 tracking-normal block mb-1.5" }, "Current Plan"), /* @__PURE__ */ React36.createElement("div", { className: "mt-1" }, /* @__PURE__ */ React36.createElement(
19666
+ "span",
19667
+ {
19668
+ className: `inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg border text-xs font-normal font-sans tracking-normal ${currentPlan === "premium" ? "bg-indigo-500/15 border-indigo-400/30 text-indigo-300" : "bg-cyan-500/10 border-cyan-400/30 text-cyan-300"}`
19669
+ },
19670
+ /* @__PURE__ */ React36.createElement(
19671
+ "span",
19672
+ {
19673
+ className: `w-1.5 h-1.5 rounded-full animate-pulse ${currentPlan === "premium" ? "bg-indigo-400 shadow-[0_0_6px_#818cf8]" : "bg-cyan-400 shadow-[0_0_6px_#22d3ee]"}`
19674
+ }
19675
+ ),
19676
+ currentPlan === "premium" ? "Premium" : "Free"
19677
+ ))))), /* @__PURE__ */ React36.createElement("div", { className: "bg-gradient-to-b from-[#0e172a]/70 to-[#070c18]/80 border border-cyan-500/15 p-3.5 rounded-2xl space-y-2.5 mb-5 text-left shadow-sm" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-2.5 text-slate-200 text-xs font-medium" }, /* @__PURE__ */ React36.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-cyan-400 shadow-[0_0_6px_#22d3ee] shrink-0" }), /* @__PURE__ */ React36.createElement("span", null, "Unlimited Nodes")), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-2.5 text-slate-200 text-xs font-medium" }, /* @__PURE__ */ React36.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-cyan-400 shadow-[0_0_6px_#22d3ee] shrink-0" }), /* @__PURE__ */ React36.createElement("span", null, "Community and collaboration features"))), /* @__PURE__ */ React36.createElement("div", { className: "space-y-2.5" }, currentPlan !== "premium" ? /* @__PURE__ */ React36.createElement(
19590
19678
  "button",
19591
19679
  {
19592
- onClick: onClose,
19593
- className: "absolute top-6 right-6 p-2 rounded-full hover:bg-white/5 text-white/40 hover:text-white transition-all duration-300"
19680
+ onClick: handleUpgradeClick,
19681
+ disabled: isSubmitting,
19682
+ className: "group relative w-full py-3.5 rounded-xl bg-gradient-to-r from-cyan-400 to-cyan-500 hover:from-cyan-300 hover:to-cyan-400 text-slate-950 font-normal text-sm tracking-normal font-sans shadow-[0_0_15px_rgba(34,211,238,0.22)] hover:shadow-[0_0_22px_rgba(34,211,238,0.38)] hover:scale-[1.01] active:scale-[0.98] transition-all duration-300 overflow-hidden cursor-pointer border border-cyan-300/30 disabled:opacity-30 disabled:grayscale"
19594
19683
  },
19595
- /* @__PURE__ */ React35.createElement(X, { size: 20 })
19596
- ), /* @__PURE__ */ React35.createElement("div", { className: "p-12 flex flex-col items-center text-center" }, /* @__PURE__ */ React35.createElement("div", { className: "w-20 h-20 rounded-[2rem] bg-gradient-to-br from-sky-400 to-indigo-600 p-[1px] mb-8 shadow-lg shadow-sky-500/20" }, /* @__PURE__ */ React35.createElement("div", { className: "w-full h-full rounded-[2rem] bg-[#0d1117] flex items-center justify-center" }, /* @__PURE__ */ React35.createElement(Zap, { className: "text-sky-400 fill-sky-400/20", size: 32 }))), /* @__PURE__ */ React35.createElement("h2", { className: "text-3xl font-bold text-white mb-4 tracking-tight" }, "Limite de Nodes", " ", /* @__PURE__ */ React35.createElement("span", { className: "bg-clip-text text-transparent bg-gradient-to-r from-sky-400 to-indigo-400" }, "Atingido")), /* @__PURE__ */ React35.createElement("p", { className: "text-white/60 text-lg leading-relaxed mb-10 max-w-md" }, "Voc\xEA atingiu o limite de", " ", /* @__PURE__ */ React35.createElement("span", { className: "text-white font-semibold" }, nodeLimit, " nodes"), " ", "do seu plano Free. Seu universo est\xE1 crescendo r\xE1pido!"), /* @__PURE__ */ React35.createElement("div", { className: "w-full grid grid-cols-2 gap-4 mb-10" }, /* @__PURE__ */ React35.createElement("div", { className: "bg-white/5 border border-white/10 rounded-3xl p-6 backdrop-blur-md" }, /* @__PURE__ */ React35.createElement("p", { className: "text-white/30 text-[10px] font-bold uppercase tracking-widest mb-1" }, "Status Atual"), /* @__PURE__ */ React35.createElement("p", { className: "text-2xl font-bold text-white" }, nodeCounter, " / ", nodeLimit)), /* @__PURE__ */ React35.createElement("div", { className: "bg-white/5 border border-white/10 rounded-3xl p-6 backdrop-blur-md" }, /* @__PURE__ */ React35.createElement("p", { className: "text-white/30 text-[10px] font-bold uppercase tracking-widest mb-1" }, "Pr\xF3ximo Plano"), /* @__PURE__ */ React35.createElement("p", { className: "text-2xl font-bold text-sky-400" }, "Ilimitado"))), /* @__PURE__ */ React35.createElement("div", { className: "w-full space-y-4 mb-10 text-left px-4" }, /* @__PURE__ */ React35.createElement("div", { className: "flex items-center gap-3 text-white/70 text-sm" }, /* @__PURE__ */ React35.createElement("div", { className: "w-6 h-6 rounded-full bg-sky-500/10 flex items-center justify-center shrink-0" }, /* @__PURE__ */ React35.createElement(Rocket, { size: 14, className: "text-sky-400" })), /* @__PURE__ */ React35.createElement("span", null, "Cria\xE7\xE3o de Nodes ilimitada")), /* @__PURE__ */ React35.createElement("div", { className: "flex items-center gap-3 text-white/70 text-sm" }, /* @__PURE__ */ React35.createElement("div", { className: "w-6 h-6 rounded-full bg-sky-500/10 flex items-center justify-center shrink-0" }, /* @__PURE__ */ React35.createElement(ShieldCheck, { size: 14, className: "text-sky-400" })), /* @__PURE__ */ React35.createElement("span", null, "Acesso expandido \xE0s funcionalidades colaborativas e de comunidade"))), /* @__PURE__ */ React35.createElement("div", { className: "w-full flex flex-col gap-4" }, /* @__PURE__ */ React35.createElement(
19684
+ /* @__PURE__ */ React36.createElement("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-in-out pointer-events-none" }),
19685
+ isSubmitting ? /* @__PURE__ */ React36.createElement("div", { className: "relative z-10 flex items-center justify-center gap-2" }, /* @__PURE__ */ React36.createElement("div", { className: "h-4 w-4 border-2 border-slate-950/30 border-t-slate-950 rounded-full animate-spin" })) : /* @__PURE__ */ React36.createElement("span", { className: "relative z-10 font-normal" }, "Upgrade Now")
19686
+ ) : /* @__PURE__ */ React36.createElement("div", { className: "w-full py-3 rounded-xl bg-indigo-500/10 border border-indigo-500/30 text-indigo-300 font-normal text-sm text-center flex items-center justify-center gap-2 font-sans tracking-normal" }, /* @__PURE__ */ React36.createElement("span", null, "Your Account is Premium")), /* @__PURE__ */ React36.createElement(
19597
19687
  "button",
19598
19688
  {
19599
- className: "w-full py-5 rounded-[1.5rem] bg-gradient-to-r from-sky-500 to-indigo-600 text-white font-bold text-sm uppercase tracking-widest hover:shadow-[0_0_30px_-5px_rgba(56,189,248,0.5)] hover:scale-[1.02] active:scale-95 transition-all duration-300 flex items-center justify-center gap-2",
19600
- onClick: async () => {
19601
- if (onUpgrade) {
19602
- await onUpgrade();
19603
- } else {
19604
- alert("Redirecionando para upgrade... (Em breve)");
19605
- }
19606
- onClose();
19607
- }
19689
+ onClick: onClose,
19690
+ className: "w-full py-2.5 rounded-xl bg-slate-950/50 hover:bg-slate-900 border border-slate-800 text-slate-400 hover:text-white text-xs font-semibold transition-all duration-300 active:scale-[0.98] cursor-pointer text-center"
19608
19691
  },
19609
- "Fazer Upgrade Agora",
19610
- /* @__PURE__ */ React35.createElement(Sparkles, { size: 16 })
19611
- ), /* @__PURE__ */ React35.createElement(
19692
+ currentPlan === "premium" ? "Close" : "Continue with Free Plan"
19693
+ )), /* @__PURE__ */ React36.createElement(
19612
19694
  "button",
19613
19695
  {
19614
19696
  onClick: onClose,
19615
- className: "w-full py-5 rounded-[1.5rem] bg-white/5 border border-white/10 text-white/40 font-bold text-sm uppercase tracking-widest hover:bg-white/10 hover:text-white transition-all duration-300"
19697
+ className: "absolute top-6 right-6 text-slate-500 hover:text-cyan-400 transition-all duration-300 p-1 hover:rotate-90 cursor-pointer",
19698
+ "aria-label": "Close modal"
19616
19699
  },
19617
- "Talvez depois"
19618
- )))));
19700
+ /* @__PURE__ */ React36.createElement(
19701
+ "svg",
19702
+ {
19703
+ xmlns: "http://www.w3.org/2000/svg",
19704
+ width: "18",
19705
+ height: "18",
19706
+ viewBox: "0 0 24 24",
19707
+ fill: "none",
19708
+ stroke: "currentColor",
19709
+ strokeWidth: "2.5",
19710
+ strokeLinecap: "round",
19711
+ strokeLinejoin: "round"
19712
+ },
19713
+ /* @__PURE__ */ React36.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
19714
+ /* @__PURE__ */ React36.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
19715
+ )
19716
+ )), /* @__PURE__ */ React36.createElement("style", null, `
19717
+ @keyframes float {
19718
+ 0%,
19719
+ 100% {
19720
+ transform: translateY(0px);
19721
+ }
19722
+ 50% {
19723
+ transform: translateY(-8px);
19724
+ }
19725
+ }
19726
+ .animate-float {
19727
+ animation: float 4s ease-in-out infinite;
19728
+ }
19729
+ `));
19619
19730
  }
19620
19731
 
19621
19732
  // src/XViewScene.jsx
@@ -19849,44 +19960,46 @@ function XViewScene({
19849
19960
  const parentDataRef = useRef25(null);
19850
19961
  const graphDataRef = parentDataRef;
19851
19962
  const ancestryDataRef = useRef25(null);
19852
- const [isLoading, setIsLoading] = useState33(true);
19853
- const [isProcessing, setIsProcessing] = useState33(false);
19854
- const [permissionStatus, setPermissionStatus] = useState33("loading");
19855
- const [userPermissionRole, setUserPermissionRole] = useState33(null);
19856
- const [viewMembers, setViewMembers] = useState33([]);
19857
- const [isInitialized, setIsInitialized] = useState33(false);
19858
- const [sceneVersion, setSceneVersion] = useState33(0);
19859
- const [contextMenu, setContextMenu] = useState33({
19963
+ const [isLoading, setIsLoading] = useState34(true);
19964
+ const [isProcessing, setIsProcessing] = useState34(false);
19965
+ const [permissionStatus, setPermissionStatus] = useState34("loading");
19966
+ const [userPermissionRole, setUserPermissionRole] = useState34(null);
19967
+ const [viewMembers, setViewMembers] = useState34([]);
19968
+ const [isInitialized, setIsInitialized] = useState34(false);
19969
+ const [sceneVersion, setSceneVersion] = useState34(0);
19970
+ const [contextMenu, setContextMenu] = useState34({
19860
19971
  visible: false,
19861
19972
  x: 0,
19862
19973
  y: 0,
19863
19974
  nodeData: null
19864
19975
  });
19865
- const [multiContextMenu, setMultiContextMenu] = useState33({
19976
+ const [multiContextMenu, setMultiContextMenu] = useState34({
19866
19977
  visible: false,
19867
19978
  x: 0,
19868
19979
  y: 0,
19869
19980
  nodeIds: null
19870
19981
  });
19871
- const [relationshipMenu, setRelationshipMenu] = useState33({
19982
+ const [relationshipMenu, setRelationshipMenu] = useState34({
19872
19983
  visible: false,
19873
19984
  x: 0,
19874
19985
  y: 0,
19875
19986
  linkObject: null
19876
19987
  });
19877
- const [creationMode, setCreationMode] = useState33({
19988
+ const [creationMode, setCreationMode] = useState34({
19878
19989
  isActive: false,
19879
19990
  sourceNodeData: null
19880
19991
  });
19881
- const [versionMode, setVersionMode] = useState33({
19992
+ const [versionMode, setVersionMode] = useState34({
19882
19993
  isActive: false,
19883
19994
  sourceNodeData: null
19884
19995
  });
19885
- const [questMode, setQuestMode] = useState33({ isActive: false });
19886
- const [processMode, setProcessMode] = useState33({ isActive: false });
19887
- const [hasFocusedInitial, setHasFocusedInitial] = useState33(false);
19888
- const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] = useState33(false);
19889
- const [questTreeMode, setQuestTreeMode] = useState33({
19996
+ const [questMode, setQuestMode] = useState34({ isActive: false });
19997
+ const [processMode, setProcessMode] = useState34({ isActive: false });
19998
+ const longPressTimeoutRef = useRef25(null);
19999
+ const isLongPressTriggeredRef = useRef25(false);
20000
+ const [hasFocusedInitial, setHasFocusedInitial] = useState34(false);
20001
+ const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] = useState34(false);
20002
+ const [questTreeMode, setQuestTreeMode] = useState34({
19890
20003
  isActive: false,
19891
20004
  questNodeId: null,
19892
20005
  questTempData: null,
@@ -19896,7 +20009,7 @@ function XViewScene({
19896
20009
  isAddingNodes: false,
19897
20010
  isAddingAbstractionNodes: false
19898
20011
  });
19899
- const [processTreeMode, setProcessTreeMode] = useState33({
20012
+ const [processTreeMode, setProcessTreeMode] = useState34({
19900
20013
  isActive: false,
19901
20014
  processNodeId: null,
19902
20015
  processTempData: null,
@@ -19906,7 +20019,7 @@ function XViewScene({
19906
20019
  isAddingNodes: false,
19907
20020
  isAddingAbstractionNodes: false
19908
20021
  });
19909
- const [ancestryMode, setAncestryMode] = useState33({
20022
+ const [ancestryMode, setAncestryMode] = useState34({
19910
20023
  isActive: false,
19911
20024
  tree: null,
19912
20025
  selectedParentId: null,
@@ -19917,41 +20030,41 @@ function XViewScene({
19917
20030
  ancestryDescriptionSections: [],
19918
20031
  isAddingNodes: false
19919
20032
  });
19920
- const [readingMode, setReadingMode] = useState33({
20033
+ const [readingMode, setReadingMode] = useState34({
19921
20034
  isActive: false,
19922
20035
  ancestry: null,
19923
20036
  branchStack: [],
19924
20037
  autoAbstraction: false
19925
20038
  });
19926
- const [formPosition, setFormPosition] = useState33({
20039
+ const [formPosition, setFormPosition] = useState34({
19927
20040
  left: 16,
19928
20041
  top: 16,
19929
20042
  opacity: 0
19930
20043
  });
19931
- const [detailsNode, setDetailsNode] = useState33(null);
19932
- const [detailsLink, setDetailsLink] = useState33(null);
19933
- const [ancestryLinkDetails, setAncestryLinkDetails] = useState33(null);
19934
- const [imageViewer, setImageViewer] = useState33({
20044
+ const [detailsNode, setDetailsNode] = useState34(null);
20045
+ const [detailsLink, setDetailsLink] = useState34(null);
20046
+ const [ancestryLinkDetails, setAncestryLinkDetails] = useState34(null);
20047
+ const [imageViewer, setImageViewer] = useState34({
19935
20048
  visible: false,
19936
20049
  images: [],
19937
20050
  startIndex: 0
19938
20051
  });
19939
- const [editingAncestryRel, setEditingAncestryRel] = useState33({
20052
+ const [editingAncestryRel, setEditingAncestryRel] = useState34({
19940
20053
  visible: false,
19941
20054
  data: null,
19942
20055
  path: null
19943
20056
  });
19944
- const [isImportModalOpen, setIsImportModalOpen] = useState33(false);
19945
- const [importSuccessMessage, setImportSuccessMessage] = useState33("");
19946
- const [invalidTargetError, setInvalidTargetError] = useState33(null);
19947
- const [highlightedNodeId, setHighlightedNodeId] = useState33(null);
19948
- const [isBoardsOpen, setIsBoardsOpen] = useState33(false);
19949
- const [boardItems, setBoardItems] = useState33([]);
19950
- const [isSidebarOpen, setIsSidebarOpen] = useState33(false);
19951
- const [isMilestoneManagerOpen, setIsMilestoneManagerOpen] = useState33(false);
19952
- const [nodeCounter, setNodeCounter] = useState33(0);
19953
- const [isUpgradeModalOpen, setIsUpgradeModalOpen] = useState33(false);
19954
- const [nodeLimit, setNodeLimit] = useState33(100);
20057
+ const [isImportModalOpen, setIsImportModalOpen] = useState34(false);
20058
+ const [importSuccessMessage, setImportSuccessMessage] = useState34("");
20059
+ const [invalidTargetError, setInvalidTargetError] = useState34(null);
20060
+ const [highlightedNodeId, setHighlightedNodeId] = useState34(null);
20061
+ const [isBoardsOpen, setIsBoardsOpen] = useState34(false);
20062
+ const [boardItems, setBoardItems] = useState34([]);
20063
+ const [isSidebarOpen, setIsSidebarOpen] = useState34(false);
20064
+ const [isMilestoneManagerOpen, setIsMilestoneManagerOpen] = useState34(false);
20065
+ const [nodeCounter, setNodeCounter] = useState34(0);
20066
+ const [isUpgradeModalOpen, setIsUpgradeModalOpen] = useState34(false);
20067
+ const [nodeLimit, setNodeLimit] = useState34(100);
19955
20068
  const mountRef = useRef25(null);
19956
20069
  const tooltipRef = useRef25(null);
19957
20070
  const formRef = useRef25(null);
@@ -20078,7 +20191,6 @@ function XViewScene({
20078
20191
  const type = viewParams == null ? void 0 : viewParams.type;
20079
20192
  const tab = type === "database" ? "datasets" : "views";
20080
20193
  const targetUrl = `/dashboard/xview?tab=${tab}`;
20081
- console.log("X-View: Navegando para o Dashboard", { type, tab, targetUrl });
20082
20194
  try {
20083
20195
  router.push(targetUrl);
20084
20196
  } catch (e) {
@@ -20701,18 +20813,6 @@ function XViewScene({
20701
20813
  };
20702
20814
  parentDataRef.current = sceneResponse.data.parent;
20703
20815
  ancestryDataRef.current = sceneResponse.data.ancestry;
20704
- console.log(
20705
- "Console de sceneResponse.data.scene:",
20706
- sceneDataRef.current
20707
- );
20708
- console.log(
20709
- "Console de sceneResponse.data.parent:",
20710
- parentDataRef.current
20711
- );
20712
- console.log(
20713
- "Console de sceneResponse.data.ancestry:",
20714
- ancestryDataRef.current
20715
- );
20716
20816
  setNodeCounter(sceneResponse.data.node_counter || 0);
20717
20817
  if (sceneResponse.data.node_limit !== void 0) {
20718
20818
  setNodeLimit(sceneResponse.data.node_limit);
@@ -21192,11 +21292,17 @@ function XViewScene({
21192
21292
  renderer.outputColorSpace = THREE3.SRGBColorSpace;
21193
21293
  renderer.toneMapping = THREE3.ACESFilmicToneMapping;
21194
21294
  renderer.toneMappingExposure = 1.2;
21295
+ currentMount.style.touchAction = "none";
21296
+ renderer.domElement.style.touchAction = "none";
21195
21297
  currentMount.appendChild(renderer.domElement);
21196
21298
  stateRef.current.renderer = renderer;
21197
21299
  const controls = new OrbitControls(camera, renderer.domElement);
21198
21300
  controls.enableDamping = true;
21199
21301
  controls.dampingFactor = 0.05;
21302
+ controls.touches = {
21303
+ ONE: THREE3.TOUCH.ROTATE,
21304
+ TWO: THREE3.TOUCH.DOLLY_PAN
21305
+ };
21200
21306
  stateRef.current.controls = controls;
21201
21307
  scene.add(new THREE3.AmbientLight(16777215, 0.1));
21202
21308
  const directionalLight = new THREE3.DirectionalLight(16777215, 0.2);
@@ -21421,21 +21527,58 @@ function XViewScene({
21421
21527
  stateRef.current.dragCandidate = null;
21422
21528
  return;
21423
21529
  }
21424
- if (event.button !== 0) return;
21530
+ if (event.button !== 0 && event.pointerType !== "touch") return;
21425
21531
  if (picked && !stateRef.current.ancestry.isActive) {
21426
21532
  stateRef.current.controls.enabled = false;
21427
21533
  }
21428
21534
  stateRef.current.pointerDown = {
21429
21535
  isDown: true,
21430
21536
  x: event.clientX,
21431
- y: event.clientY
21537
+ y: event.clientY,
21538
+ pointerType: event.pointerType
21432
21539
  };
21433
21540
  stateRef.current.dragCandidate = picked;
21541
+ if (event.pointerType === "touch" || event.pointerType === "pen") {
21542
+ if (longPressTimeoutRef.current) {
21543
+ clearTimeout(longPressTimeoutRef.current);
21544
+ }
21545
+ isLongPressTriggeredRef.current = false;
21546
+ if (picked) {
21547
+ const touchX = event.clientX;
21548
+ const touchY = event.clientY;
21549
+ longPressTimeoutRef.current = setTimeout(() => {
21550
+ isLongPressTriggeredRef.current = true;
21551
+ if (typeof navigator !== "undefined" && navigator.vibrate) {
21552
+ navigator.vibrate(40);
21553
+ }
21554
+ setContextMenu({
21555
+ visible: true,
21556
+ x: touchX,
21557
+ y: touchY,
21558
+ nodeData: picked.userData
21559
+ });
21560
+ setMultiContextMenu((prev) => ({ ...prev, visible: false }));
21561
+ setRelationshipMenu((prev) => ({ ...prev, visible: false }));
21562
+ setDetailsNode(null);
21563
+ }, 450);
21564
+ }
21565
+ }
21434
21566
  }
21435
21567
  function onPointerMove(event) {
21436
21568
  if (stateRef.current.camera) stateRef.current.camera.layers.enableAll();
21437
21569
  if (isFromUiOverlay(event)) return;
21438
21570
  setMouseFromEvent(event);
21571
+ if (stateRef.current.pointerDown.isDown) {
21572
+ const dx = event.clientX - stateRef.current.pointerDown.x;
21573
+ const dy = event.clientY - stateRef.current.pointerDown.y;
21574
+ const dist = Math.hypot(dx, dy);
21575
+ if (dist > (x_view_config.DRAG_THRESHOLD_PX || 5)) {
21576
+ if (longPressTimeoutRef.current) {
21577
+ clearTimeout(longPressTimeoutRef.current);
21578
+ longPressTimeoutRef.current = null;
21579
+ }
21580
+ }
21581
+ }
21439
21582
  if (stateRef.current.isDragging && stateRef.current.draggedNode) {
21440
21583
  const raycaster2 = new THREE3.Raycaster();
21441
21584
  raycaster2.setFromCamera(mouse, camera);
@@ -21478,7 +21621,7 @@ function XViewScene({
21478
21621
  return;
21479
21622
  }
21480
21623
  if (stateRef.current.creation.isActive) return;
21481
- if (stateRef.current.pointerDown.isDown && stateRef.current.dragCandidate) {
21624
+ if (stateRef.current.pointerDown.isDown && stateRef.current.dragCandidate && !isLongPressTriggeredRef.current) {
21482
21625
  const dx = event.clientX - stateRef.current.pointerDown.x;
21483
21626
  const dy = event.clientY - stateRef.current.pointerDown.y;
21484
21627
  if (Math.hypot(dx, dy) > x_view_config.DRAG_THRESHOLD_PX) {
@@ -21510,6 +21653,17 @@ function XViewScene({
21510
21653
  async function onPointerUp(event) {
21511
21654
  var _a2, _b2, _c2;
21512
21655
  if (stateRef.current.camera) stateRef.current.camera.layers.enableAll();
21656
+ if (longPressTimeoutRef.current) {
21657
+ clearTimeout(longPressTimeoutRef.current);
21658
+ longPressTimeoutRef.current = null;
21659
+ }
21660
+ if (isLongPressTriggeredRef.current) {
21661
+ isLongPressTriggeredRef.current = false;
21662
+ stateRef.current.pointerDown.isDown = false;
21663
+ stateRef.current.dragCandidate = null;
21664
+ stateRef.current.controls.enabled = true;
21665
+ return;
21666
+ }
21513
21667
  if (isFromUiOverlay(event)) return;
21514
21668
  const {
21515
21669
  connection,
@@ -21744,7 +21898,7 @@ function XViewScene({
21744
21898
  stateRef.current.dragCandidate = null;
21745
21899
  return;
21746
21900
  }
21747
- if (event.button === 0 && !stateRef.current.creation.isActive && stateRef.current.pointerDown.isDown) {
21901
+ if ((event.button === 0 || event.pointerType === "touch") && !stateRef.current.creation.isActive && stateRef.current.pointerDown.isDown) {
21748
21902
  setMouseFromEvent(event);
21749
21903
  const clickedNode = stateRef.current.dragCandidate || tryPickNode();
21750
21904
  stateRef.current.dragCandidate = null;
@@ -21753,6 +21907,9 @@ function XViewScene({
21753
21907
  stateRef.current.selectedNodes.clear();
21754
21908
  }
21755
21909
  if (clickedNode) {
21910
+ setContextMenu((prev) => prev.visible ? { ...prev, visible: false } : prev);
21911
+ setMultiContextMenu((prev) => prev.visible ? { ...prev, visible: false } : prev);
21912
+ setRelationshipMenu((prev) => prev.visible ? { ...prev, visible: false } : prev);
21756
21913
  setDetailsNode({ ...clickedNode.userData });
21757
21914
  setDetailsLink(null);
21758
21915
  return;
@@ -21788,6 +21945,14 @@ function XViewScene({
21788
21945
  if (stateRef.current.camera) stateRef.current.camera.layers.enableAll();
21789
21946
  if (isFromUiOverlay(event)) return;
21790
21947
  event.preventDefault();
21948
+ if (longPressTimeoutRef.current) {
21949
+ clearTimeout(longPressTimeoutRef.current);
21950
+ longPressTimeoutRef.current = null;
21951
+ }
21952
+ isLongPressTriggeredRef.current = true;
21953
+ stateRef.current.pointerDown.isDown = false;
21954
+ stateRef.current.dragCandidate = null;
21955
+ setDetailsNode(null);
21791
21956
  if (stateRef.current.creation.isActive || stateRef.current.connection.isActive || stateRef.current.relink.isActive)
21792
21957
  return;
21793
21958
  setMouseFromEvent(event);
@@ -23093,11 +23258,6 @@ function XViewScene({
23093
23258
  }
23094
23259
  });
23095
23260
  }
23096
- console.log("[handleRenderAncestry] Start", {
23097
- ancestryId: ancestryObject.ancestry_id,
23098
- allowedSectionIds: allowedSectionIds ? Array.from(allowedSectionIds) : null,
23099
- activeSectionIdForFocus
23100
- });
23101
23261
  const { ancestryGroup, nodeObjects, renderer, renderedAncestries } = stateRef.current;
23102
23262
  const currentRenderLimit = stateRef.current.maxAncestryRenderIndex || 0;
23103
23263
  const isFullRenderRequest = !normalizedAllowedIds;
@@ -23395,11 +23555,6 @@ function XViewScene({
23395
23555
  let currentAnchorPosition = currentAnchorMesh.userData.id ? targetPositionsCache.get(String(currentAnchorMesh.userData.id)) || currentAnchorMesh.position : currentAnchorMesh.position;
23396
23556
  for (const section of sections) {
23397
23557
  const deveRenderizar = checkShouldRender(section);
23398
- console.log("[handleRenderAncestry] Section check:", {
23399
- id: section.id,
23400
- numericId: section.section_numeric_id,
23401
- deveRenderizar
23402
- });
23403
23558
  if (deveRenderizar) {
23404
23559
  const sectionNodes = section.children || [];
23405
23560
  if (sectionNodes.length > 0) {
@@ -24262,15 +24417,9 @@ function XViewScene({
24262
24417
  }, []);
24263
24418
  const handleSaveAncestry = useCallback8(
24264
24419
  async (ancestryName, ancestryDescription, ancestrySections, keepOpen = false, treeOverride = null, ancestryCustomProps = {}) => {
24265
- var _a2, _b2;
24420
+ var _a2;
24266
24421
  const treeToUse = treeOverride || ancestryMode.tree;
24267
24422
  const { isEditMode, currentAncestryId } = ancestryMode;
24268
- console.log("[handleSaveAncestry] received:", {
24269
- name: ancestryName,
24270
- descLength: ancestryDescription == null ? void 0 : ancestryDescription.length,
24271
- sectionsCount: ancestrySections == null ? void 0 : ancestrySections.length,
24272
- treeRoot: (_a2 = treeToUse.node) == null ? void 0 : _a2.id
24273
- });
24274
24423
  if (!treeToUse || !treeToUse.node) {
24275
24424
  alert(
24276
24425
  "Erro: A estrutura da ancestralidade \xE9 inv\xE1lida (Node raiz ausente)."
@@ -24475,7 +24624,7 @@ function XViewScene({
24475
24624
  currentAncestryId: ancestryObjectToSave.ancestry_id
24476
24625
  }));
24477
24626
  }
24478
- if (readingMode.isActive && ((_b2 = readingMode.ancestry) == null ? void 0 : _b2.ancestry_id) === ancestryObjectToSave.ancestry_id) {
24627
+ if (readingMode.isActive && ((_a2 = readingMode.ancestry) == null ? void 0 : _a2.ancestry_id) === ancestryObjectToSave.ancestry_id) {
24479
24628
  setReadingMode((prev) => ({
24480
24629
  ...prev,
24481
24630
  ancestry: ancestryObjectToSave
@@ -25175,7 +25324,7 @@ function XViewScene({
25175
25324
  // <-- handleCancelQuest adicionado aqui
25176
25325
  ]);
25177
25326
  if (isLoading || status === "loading" || permissionStatus === "loading") {
25178
- return /* @__PURE__ */ React36.createElement(LoadingScreen, null);
25327
+ return /* @__PURE__ */ React37.createElement(LoadingScreen, null);
25179
25328
  }
25180
25329
  const overlayHiddenStyle = questTreeMode.isActive || processTreeMode.isActive ? {
25181
25330
  opacity: 0,
@@ -25184,7 +25333,7 @@ function XViewScene({
25184
25333
  transition: "all 300ms ease-in-out"
25185
25334
  } : {};
25186
25335
  if (permissionStatus === "corrupted") {
25187
- return /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React36.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md animate-fade-in" }, /* @__PURE__ */ React36.createElement("div", { className: "mb-4 text-amber-500" }, /* @__PURE__ */ React36.createElement(
25336
+ return /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React37.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md animate-fade-in" }, /* @__PURE__ */ React37.createElement("div", { className: "mb-4 text-amber-500" }, /* @__PURE__ */ React37.createElement(
25188
25337
  "svg",
25189
25338
  {
25190
25339
  xmlns: "http://www.w3.org/2000/svg",
@@ -25194,7 +25343,7 @@ function XViewScene({
25194
25343
  stroke: "currentColor",
25195
25344
  className: "w-16 h-16 mx-auto"
25196
25345
  },
25197
- /* @__PURE__ */ React36.createElement(
25346
+ /* @__PURE__ */ React37.createElement(
25198
25347
  "path",
25199
25348
  {
25200
25349
  strokeLinecap: "round",
@@ -25202,13 +25351,13 @@ function XViewScene({
25202
25351
  d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
25203
25352
  }
25204
25353
  )
25205
- )), /* @__PURE__ */ React36.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Link Inv\xE1lido"), /* @__PURE__ */ React36.createElement("p", { className: "text-slate-400 mb-6" }, "O link de acesso a este cen\xE1rio est\xE1 corrompido, incompleto ou foi alterado de forma incorreta. Por favor, verifique a URL ou retorne ao dashboard."), /* @__PURE__ */ React36.createElement(
25354
+ )), /* @__PURE__ */ React37.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Link Inv\xE1lido"), /* @__PURE__ */ React37.createElement("p", { className: "text-slate-400 mb-6" }, "O link de acesso a este cen\xE1rio est\xE1 corrompido, incompleto ou foi alterado de forma incorreta. Por favor, verifique a URL ou retorne ao dashboard."), /* @__PURE__ */ React37.createElement(
25206
25355
  "button",
25207
25356
  {
25208
25357
  onClick: handleNavigateBack,
25209
25358
  className: "flex items-center justify-center gap-2 w-full py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors font-medium cursor-pointer"
25210
25359
  },
25211
- /* @__PURE__ */ React36.createElement(
25360
+ /* @__PURE__ */ React37.createElement(
25212
25361
  "svg",
25213
25362
  {
25214
25363
  xmlns: "http://www.w3.org/2000/svg",
@@ -25218,7 +25367,7 @@ function XViewScene({
25218
25367
  stroke: "currentColor",
25219
25368
  className: "w-5 h-5"
25220
25369
  },
25221
- /* @__PURE__ */ React36.createElement(
25370
+ /* @__PURE__ */ React37.createElement(
25222
25371
  "path",
25223
25372
  {
25224
25373
  strokeLinecap: "round",
@@ -25231,7 +25380,7 @@ function XViewScene({
25231
25380
  )));
25232
25381
  }
25233
25382
  if (permissionStatus === "denied") {
25234
- return /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React36.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md" }, /* @__PURE__ */ React36.createElement("div", { className: "mb-4 text-red-500" }, /* @__PURE__ */ React36.createElement(
25383
+ return /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React37.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md" }, /* @__PURE__ */ React37.createElement("div", { className: "mb-4 text-red-500" }, /* @__PURE__ */ React37.createElement(
25235
25384
  "svg",
25236
25385
  {
25237
25386
  xmlns: "http://www.w3.org/2000/svg",
@@ -25241,7 +25390,7 @@ function XViewScene({
25241
25390
  stroke: "currentColor",
25242
25391
  className: "w-16 h-16 mx-auto"
25243
25392
  },
25244
- /* @__PURE__ */ React36.createElement(
25393
+ /* @__PURE__ */ React37.createElement(
25245
25394
  "path",
25246
25395
  {
25247
25396
  strokeLinecap: "round",
@@ -25249,13 +25398,13 @@ function XViewScene({
25249
25398
  d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
25250
25399
  }
25251
25400
  )
25252
- )), /* @__PURE__ */ React36.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Acesso Negado"), /* @__PURE__ */ React36.createElement("p", { className: "text-slate-400 mb-6" }, "Voc\xEA n\xE3o tem permiss\xE3o para acessar este conte\xFAdo. Solicite acesso ao propriet\xE1rio ou verifique se est\xE1 na conta correta."), /* @__PURE__ */ React36.createElement(
25401
+ )), /* @__PURE__ */ React37.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Acesso Negado"), /* @__PURE__ */ React37.createElement("p", { className: "text-slate-400 mb-6" }, "Voc\xEA n\xE3o tem permiss\xE3o para acessar este conte\xFAdo. Solicite acesso ao propriet\xE1rio ou verifique se est\xE1 na conta correta."), /* @__PURE__ */ React37.createElement(
25253
25402
  "button",
25254
25403
  {
25255
25404
  onClick: handleNavigateBack,
25256
25405
  className: "flex items-center justify-center gap-2 w-full py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors font-medium"
25257
25406
  },
25258
- /* @__PURE__ */ React36.createElement(
25407
+ /* @__PURE__ */ React37.createElement(
25259
25408
  "svg",
25260
25409
  {
25261
25410
  xmlns: "http://www.w3.org/2000/svg",
@@ -25265,7 +25414,7 @@ function XViewScene({
25265
25414
  stroke: "currentColor",
25266
25415
  className: "w-5 h-5"
25267
25416
  },
25268
- /* @__PURE__ */ React36.createElement(
25417
+ /* @__PURE__ */ React37.createElement(
25269
25418
  "path",
25270
25419
  {
25271
25420
  strokeLinecap: "round",
@@ -25277,7 +25426,7 @@ function XViewScene({
25277
25426
  "Voltar para o X.View"
25278
25427
  )));
25279
25428
  }
25280
- return /* @__PURE__ */ React36.createElement(
25429
+ return /* @__PURE__ */ React37.createElement(
25281
25430
  "div",
25282
25431
  {
25283
25432
  ref: mountRef,
@@ -25289,7 +25438,7 @@ function XViewScene({
25289
25438
  cursor: isProcessing ? "progress" : stateRef.current.connection.isActive || stateRef.current.relink.isActive || ancestryMode.isActive ? "crosshair" : creationMode.isActive ? "default" : "grab"
25290
25439
  }
25291
25440
  },
25292
- userPermissionRole !== "link_viewer" && /* @__PURE__ */ React36.createElement(
25441
+ userPermissionRole !== "link_viewer" && /* @__PURE__ */ React37.createElement(
25293
25442
  XViewSidebar,
25294
25443
  {
25295
25444
  dbNodes: searchableDbNodes,
@@ -25318,7 +25467,7 @@ function XViewScene({
25318
25467
  viewMembers
25319
25468
  }
25320
25469
  ),
25321
- creationMode.isActive && /* @__PURE__ */ React36.createElement(
25470
+ creationMode.isActive && /* @__PURE__ */ React37.createElement(
25322
25471
  InSceneCreationForm,
25323
25472
  {
25324
25473
  onSave: (data) => userActionHandlers.handleSaveNode(actionHandlerContext, data),
@@ -25353,7 +25502,7 @@ function XViewScene({
25353
25502
  view_google_folder_id: (_h = sceneDataRef.current) == null ? void 0 : _h.view_google_folder_id
25354
25503
  }
25355
25504
  ),
25356
- versionMode.isActive && /* @__PURE__ */ React36.createElement(
25505
+ versionMode.isActive && /* @__PURE__ */ React37.createElement(
25357
25506
  InSceneVersionForm,
25358
25507
  {
25359
25508
  onSave: (data) => userActionHandlers.handleSaveVersionNode(actionHandlerContext, data),
@@ -25380,7 +25529,7 @@ function XViewScene({
25380
25529
  availableAncestries: allAvailableAncestries
25381
25530
  }
25382
25531
  ),
25383
- questTreeMode.isActive && /* @__PURE__ */ React36.createElement(
25532
+ questTreeMode.isActive && /* @__PURE__ */ React37.createElement(
25384
25533
  CreateQuestTreePanel,
25385
25534
  {
25386
25535
  questTreeMode,
@@ -25389,7 +25538,7 @@ function XViewScene({
25389
25538
  onClose: handleCloseQuestTree
25390
25539
  }
25391
25540
  ),
25392
- processTreeMode.isActive && /* @__PURE__ */ React36.createElement(
25541
+ processTreeMode.isActive && /* @__PURE__ */ React37.createElement(
25393
25542
  CreateProcessTreePanel,
25394
25543
  {
25395
25544
  processTreeMode,
@@ -25398,7 +25547,7 @@ function XViewScene({
25398
25547
  onClose: handleCloseProcessTree
25399
25548
  }
25400
25549
  ),
25401
- questMode.isActive && /* @__PURE__ */ React36.createElement(
25550
+ questMode.isActive && /* @__PURE__ */ React37.createElement(
25402
25551
  InSceneQuestForm,
25403
25552
  {
25404
25553
  onSave: (data) => handleSaveQuestNode(actionHandlerContext, data),
@@ -25429,7 +25578,7 @@ function XViewScene({
25429
25578
  view_google_folder_id: (_m = sceneDataRef.current) == null ? void 0 : _m.view_google_folder_id
25430
25579
  }
25431
25580
  ),
25432
- processMode.isActive && /* @__PURE__ */ React36.createElement(
25581
+ processMode.isActive && /* @__PURE__ */ React37.createElement(
25433
25582
  InSceneProcessForm,
25434
25583
  {
25435
25584
  onSave: (data) => handleSaveProcessNode(actionHandlerContext, data),
@@ -25456,7 +25605,7 @@ function XViewScene({
25456
25605
  view_google_folder_id: (_n = sceneDataRef.current) == null ? void 0 : _n.view_google_folder_id
25457
25606
  }
25458
25607
  ),
25459
- readingMode.isActive && readingMode.ancestry && /* @__PURE__ */ React36.createElement(
25608
+ readingMode.isActive && readingMode.ancestry && /* @__PURE__ */ React37.createElement(
25460
25609
  "div",
25461
25610
  {
25462
25611
  className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isReadModeResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
@@ -25469,7 +25618,7 @@ function XViewScene({
25469
25618
  maxWidth: "92vw"
25470
25619
  }
25471
25620
  },
25472
- /* @__PURE__ */ React36.createElement(
25621
+ /* @__PURE__ */ React37.createElement(
25473
25622
  "div",
25474
25623
  {
25475
25624
  onPointerDown: (e) => {
@@ -25480,7 +25629,7 @@ function XViewScene({
25480
25629
  title: "Arraste para redimensionar"
25481
25630
  }
25482
25631
  ),
25483
- /* @__PURE__ */ React36.createElement(
25632
+ /* @__PURE__ */ React37.createElement(
25484
25633
  DescriptionReadModePanel,
25485
25634
  {
25486
25635
  key: readingMode.branchStack.length > 0 ? readingMode.branchStack[readingMode.branchStack.length - 1].branchId : readingMode.ancestry.ancestry_id,
@@ -25515,7 +25664,7 @@ function XViewScene({
25515
25664
  }
25516
25665
  )
25517
25666
  ),
25518
- ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */ React36.createElement(
25667
+ ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */ React37.createElement(
25519
25668
  CreateAncestryPanel,
25520
25669
  {
25521
25670
  ancestryMode,
@@ -25551,7 +25700,7 @@ function XViewScene({
25551
25700
  onRenderAbstractionTree: (data, targetId) => handleRenderAbstractionTree(data, targetId)
25552
25701
  }
25553
25702
  ),
25554
- editingAncestryRel.visible && /* @__PURE__ */ React36.createElement(
25703
+ editingAncestryRel.visible && /* @__PURE__ */ React37.createElement(
25555
25704
  AncestryRelationshipPanel,
25556
25705
  {
25557
25706
  data: editingAncestryRel.data,
@@ -25565,8 +25714,8 @@ function XViewScene({
25565
25714
  onUploadFile: upload_file_action
25566
25715
  }
25567
25716
  ),
25568
- isProcessing && /* @__PURE__ */ React36.createElement("div", { className: "fixed bottom-8 right-8 z-[2000] flex items-center gap-3 px-4 py-2 bg-slate-900/80 backdrop-blur-md border border-white/10 rounded-full shadow-2xl animate-pulse" }, /* @__PURE__ */ React36.createElement("div", { className: "w-4 h-4 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin" }), /* @__PURE__ */ React36.createElement("span", { className: "text-xs font-medium text-indigo-200 tracking-wider uppercase" }, "Sincronizando Processo...")),
25569
- detailsNode && detailsNode.is_quest && /* @__PURE__ */ React36.createElement(
25717
+ isProcessing && /* @__PURE__ */ React37.createElement("div", { className: "fixed bottom-8 right-8 z-[2000] flex items-center gap-3 px-4 py-2 bg-slate-900/80 backdrop-blur-md border border-white/10 rounded-full shadow-2xl animate-pulse" }, /* @__PURE__ */ React37.createElement("div", { className: "w-4 h-4 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin" }), /* @__PURE__ */ React37.createElement("span", { className: "text-xs font-medium text-indigo-200 tracking-wider uppercase" }, "Sincronizando Processo...")),
25718
+ detailsNode && detailsNode.is_quest && /* @__PURE__ */ React37.createElement(
25570
25719
  QuestDetailsPanel,
25571
25720
  {
25572
25721
  node: detailsNode,
@@ -25598,7 +25747,7 @@ function XViewScene({
25598
25747
  style: overlayHiddenStyle
25599
25748
  }
25600
25749
  ),
25601
- detailsNode && detailsNode.is_process && /* @__PURE__ */ React36.createElement(
25750
+ detailsNode && detailsNode.is_process && /* @__PURE__ */ React37.createElement(
25602
25751
  ProcessDetailsPanel,
25603
25752
  {
25604
25753
  node: detailsNode,
@@ -25628,7 +25777,7 @@ function XViewScene({
25628
25777
  style: overlayHiddenStyle
25629
25778
  }
25630
25779
  ),
25631
- detailsNode && !detailsNode.is_quest && !detailsNode.is_process && /* @__PURE__ */ React36.createElement(
25780
+ detailsNode && !detailsNode.is_quest && !detailsNode.is_process && /* @__PURE__ */ React37.createElement(
25632
25781
  NodeDetailsPanel,
25633
25782
  {
25634
25783
  node: detailsNode,
@@ -25663,7 +25812,7 @@ function XViewScene({
25663
25812
  style: overlayHiddenStyle
25664
25813
  }
25665
25814
  ),
25666
- detailsLink && /* @__PURE__ */ React36.createElement(
25815
+ detailsLink && /* @__PURE__ */ React37.createElement(
25667
25816
  RelationshipDetailsPanel,
25668
25817
  {
25669
25818
  link: detailsLink,
@@ -25678,7 +25827,7 @@ function XViewScene({
25678
25827
  onHighlight: handleReadModeHighlight
25679
25828
  }
25680
25829
  ),
25681
- ancestryLinkDetails && /* @__PURE__ */ React36.createElement(
25830
+ ancestryLinkDetails && /* @__PURE__ */ React37.createElement(
25682
25831
  AncestryLinkDetailsPanel,
25683
25832
  {
25684
25833
  data: ancestryLinkDetails,
@@ -25690,7 +25839,7 @@ function XViewScene({
25690
25839
  onHighlight: handleReadModeHighlight
25691
25840
  }
25692
25841
  ),
25693
- /* @__PURE__ */ React36.createElement(
25842
+ /* @__PURE__ */ React37.createElement(
25694
25843
  "div",
25695
25844
  {
25696
25845
  ref: tooltipRef,
@@ -25717,7 +25866,7 @@ function XViewScene({
25717
25866
  }
25718
25867
  }
25719
25868
  ),
25720
- /* @__PURE__ */ React36.createElement(
25869
+ /* @__PURE__ */ React37.createElement(
25721
25870
  ContextMenu,
25722
25871
  {
25723
25872
  data: contextMenu,
@@ -25756,7 +25905,7 @@ function XViewScene({
25756
25905
  onInitiateProcess: (data) => userActionHandlers.handleInitiateProcess(actionHandlerContext, data)
25757
25906
  }
25758
25907
  ),
25759
- /* @__PURE__ */ React36.createElement(
25908
+ /* @__PURE__ */ React37.createElement(
25760
25909
  MultiNodeContextMenu,
25761
25910
  {
25762
25911
  data: multiContextMenu,
@@ -25776,7 +25925,7 @@ function XViewScene({
25776
25925
  )
25777
25926
  }
25778
25927
  ),
25779
- /* @__PURE__ */ React36.createElement(
25928
+ /* @__PURE__ */ React37.createElement(
25780
25929
  RelationshipContextMenu,
25781
25930
  {
25782
25931
  data: relationshipMenu,
@@ -25794,14 +25943,14 @@ function XViewScene({
25794
25943
  onDelete: (data) => userActionHandlers.handleDeleteLink(actionHandlerContext, data)
25795
25944
  }
25796
25945
  ),
25797
- /* @__PURE__ */ React36.createElement(
25946
+ /* @__PURE__ */ React37.createElement(
25798
25947
  ImageViewer,
25799
25948
  {
25800
25949
  data: imageViewer,
25801
25950
  onClose: () => setImageViewer({ ...imageViewer, visible: false })
25802
25951
  }
25803
25952
  ),
25804
- /* @__PURE__ */ React36.createElement(
25953
+ /* @__PURE__ */ React37.createElement(
25805
25954
  Boards,
25806
25955
  {
25807
25956
  isOpen: isBoardsOpen,
@@ -25814,7 +25963,7 @@ function XViewScene({
25814
25963
  userRole: userPermissionRole
25815
25964
  }
25816
25965
  ),
25817
- /* @__PURE__ */ React36.createElement(
25966
+ /* @__PURE__ */ React37.createElement(
25818
25967
  MilestoneManager,
25819
25968
  {
25820
25969
  isOpen: isMilestoneManagerOpen,
@@ -25823,7 +25972,7 @@ function XViewScene({
25823
25972
  onUpdateMilestones: handleUpdateMilestones
25824
25973
  }
25825
25974
  ),
25826
- /* @__PURE__ */ React36.createElement(
25975
+ /* @__PURE__ */ React37.createElement(
25827
25976
  ImportParentFileModal,
25828
25977
  {
25829
25978
  isOpen: isImportModalOpen,
@@ -25836,7 +25985,7 @@ function XViewScene({
25836
25985
  currentAncestries: ancestryDataRef.current || []
25837
25986
  }
25838
25987
  ),
25839
- invalidTargetError && /* @__PURE__ */ React36.createElement(
25988
+ invalidTargetError && /* @__PURE__ */ React37.createElement(
25840
25989
  "div",
25841
25990
  {
25842
25991
  className: "ui-overlay",
@@ -25861,13 +26010,13 @@ function XViewScene({
25861
26010
  animation: "fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
25862
26011
  }
25863
26012
  },
25864
- /* @__PURE__ */ React36.createElement("style", null, `
26013
+ /* @__PURE__ */ React37.createElement("style", null, `
25865
26014
  @keyframes fadeInDown {
25866
26015
  from { opacity: 0; transform: translate(-50%, -20px); }
25867
26016
  to { opacity: 1; transform: translate(-50%, 0); }
25868
26017
  }
25869
26018
  `),
25870
- /* @__PURE__ */ React36.createElement(
26019
+ /* @__PURE__ */ React37.createElement(
25871
26020
  "svg",
25872
26021
  {
25873
26022
  width: "20",
@@ -25879,12 +26028,12 @@ function XViewScene({
25879
26028
  strokeLinecap: "round",
25880
26029
  strokeLinejoin: "round"
25881
26030
  },
25882
- /* @__PURE__ */ React36.createElement("circle", { cx: "12", cy: "12", r: "10" }),
25883
- /* @__PURE__ */ React36.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
25884
- /* @__PURE__ */ React36.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
26031
+ /* @__PURE__ */ React37.createElement("circle", { cx: "12", cy: "12", r: "10" }),
26032
+ /* @__PURE__ */ React37.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
26033
+ /* @__PURE__ */ React37.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
25885
26034
  ),
25886
- /* @__PURE__ */ React36.createElement("span", { style: { fontSize: "14px", fontWeight: 500 } }, invalidTargetError),
25887
- /* @__PURE__ */ React36.createElement(
26035
+ /* @__PURE__ */ React37.createElement("span", { style: { fontSize: "14px", fontWeight: 500 } }, invalidTargetError),
26036
+ /* @__PURE__ */ React37.createElement(
25888
26037
  "button",
25889
26038
  {
25890
26039
  onClick: () => setInvalidTargetError(null),
@@ -25912,7 +26061,7 @@ function XViewScene({
25912
26061
  "Fechar"
25913
26062
  )
25914
26063
  ),
25915
- /* @__PURE__ */ React36.createElement(
26064
+ /* @__PURE__ */ React37.createElement(
25916
26065
  UpgradeModal,
25917
26066
  {
25918
26067
  isOpen: isUpgradeModalOpen,
@@ -25924,7 +26073,9 @@ function XViewScene({
25924
26073
  const res = await onUpgrade();
25925
26074
  if (res.success) {
25926
26075
  setNodeLimit(-1);
25927
- alert("Upgrade realizado com sucesso! Sua conta agora \xE9 Premium.");
26076
+ alert(
26077
+ "Upgrade realizado com sucesso! Sua conta agora \xE9 Premium."
26078
+ );
25928
26079
  } else {
25929
26080
  alert("Erro ao realizar upgrade: " + res.error);
25930
26081
  }