@lv-x-software-house/x_view 1.2.6-dev.86 → 1.2.6-dev.88

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 +327 -349
  2. package/dist/index.mjs +327 -349
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2698,7 +2698,9 @@ var IGNORED_KEYS = [
2698
2698
  "reviewStack",
2699
2699
  "timeline",
2700
2700
  "milestone_ids",
2701
- "dependency_ids"
2701
+ "dependency_ids",
2702
+ "quest_tree",
2703
+ "quest_abstraction_tree"
2702
2704
  ];
2703
2705
  function extractCustomPropsFromNode(node) {
2704
2706
  const customPropTypes = node._customPropTypes || {};
@@ -10711,7 +10713,146 @@ function InSceneQuestForm({
10711
10713
  title: isNameCopied ? "Nome Copiado!" : "Copiar nome formatado"
10712
10714
  },
10713
10715
  isNameCopied ? /* @__PURE__ */ React18.createElement(FiCheck9, { size: 10 }) : /* @__PURE__ */ React18.createElement(FiCopy3, { size: 10 })
10714
- ))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
10716
+ ))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2 border-t border-white/5 pt-4" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
10717
+ "button",
10718
+ {
10719
+ type: "button",
10720
+ onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
10721
+ className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
10722
+ },
10723
+ /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
10724
+ /* @__PURE__ */ React18.createElement(
10725
+ FiChevronDown6,
10726
+ {
10727
+ className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}`
10728
+ }
10729
+ )
10730
+ ), isAssigneeDropdownOpen && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
10731
+ "div",
10732
+ {
10733
+ className: "fixed inset-0 z-40",
10734
+ onClick: () => {
10735
+ setIsAssigneeDropdownOpen(false);
10736
+ setAssigneeSearchQuery("");
10737
+ }
10738
+ }
10739
+ ), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React18.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React18.createElement(
10740
+ "input",
10741
+ {
10742
+ type: "text",
10743
+ autoFocus: true,
10744
+ placeholder: "Buscar membro...",
10745
+ value: assigneeSearchQuery,
10746
+ onChange: (e) => setAssigneeSearchQuery(e.target.value),
10747
+ className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
10748
+ onClick: (e) => e.stopPropagation()
10749
+ }
10750
+ )), /* @__PURE__ */ React18.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React18.createElement(
10751
+ "li",
10752
+ {
10753
+ onClick: () => {
10754
+ setAssigneeId("");
10755
+ setIsAssigneeDropdownOpen(false);
10756
+ setAssigneeSearchQuery("");
10757
+ },
10758
+ className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
10759
+ },
10760
+ "Nenhum"
10761
+ ), viewMembers.filter((member) => {
10762
+ const search = assigneeSearchQuery.toLowerCase();
10763
+ return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10764
+ }).map((member) => /* @__PURE__ */ React18.createElement(
10765
+ "li",
10766
+ {
10767
+ key: member.id,
10768
+ onClick: () => {
10769
+ setAssigneeId(member.id);
10770
+ setIsAssigneeDropdownOpen(false);
10771
+ setAssigneeSearchQuery("");
10772
+ },
10773
+ className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${assigneeId === member.id ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
10774
+ },
10775
+ member.name || member.email || member.id
10776
+ )), viewMembers.filter((member) => {
10777
+ const search = assigneeSearchQuery.toLowerCase();
10778
+ return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10779
+ }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React18.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React18.createElement("div", { className: "pt-4 border-t border-white/5" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, create_google_doc_action && /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, docError ? /* @__PURE__ */ React18.createElement(
10780
+ "p",
10781
+ {
10782
+ className: "text-[10px] text-red-400 bg-red-400/10 px-2 py-1 rounded border border-red-400/20 max-w-[200px]",
10783
+ title: docError
10784
+ },
10785
+ docError.length > 50 ? docError.substring(0, 47) + "..." : docError
10786
+ ) : /* @__PURE__ */ React18.createElement(
10787
+ "button",
10788
+ {
10789
+ type: "button",
10790
+ onClick: handleCreateGoogleDoc,
10791
+ disabled: isLoadingDocs,
10792
+ className: "flex items-center justify-center text-slate-300 transition-all disabled:opacity-50 disabled:cursor-not-allowed group",
10793
+ title: isLoadingDocs ? "Criando Documento..." : "Criar Documento no Google Docs"
10794
+ },
10795
+ isLoadingDocs ? /* @__PURE__ */ React18.createElement(
10796
+ AiOutlineLoading3Quarters2,
10797
+ {
10798
+ className: "animate-spin",
10799
+ size: 18
10800
+ }
10801
+ ) : /* @__PURE__ */ React18.createElement(
10802
+ GoogleDocsIcon_default,
10803
+ {
10804
+ size: 18,
10805
+ className: "group-hover:scale-110 transition-transform"
10806
+ }
10807
+ )
10808
+ )), /* @__PURE__ */ React18.createElement(
10809
+ "button",
10810
+ {
10811
+ type: "button",
10812
+ onClick: handleAddProp,
10813
+ className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
10814
+ },
10815
+ /* @__PURE__ */ React18.createElement(FiPlus7, { size: 14 }),
10816
+ " Adicionar"
10817
+ ))), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React18.createElement(
10818
+ CustomPropertyDisplay,
10819
+ {
10820
+ key: prop.id,
10821
+ prop,
10822
+ onUpdate: (updatedProp) => handleUpdateProp(index, updatedProp),
10823
+ onRemove: () => handleRemoveProp(index),
10824
+ onOpenImageViewer,
10825
+ unavailableTypes: currentUsedTypes.filter(
10826
+ (t) => t !== prop.type
10827
+ ),
10828
+ onUploadFile
10829
+ }
10830
+ )), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative pt-4 border-t border-white/5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(
10831
+ DescriptionDisplay,
10832
+ {
10833
+ description,
10834
+ savedSections: [],
10835
+ availableNodes,
10836
+ availableAncestries,
10837
+ onMentionClick,
10838
+ onSaveDescription: (newDesc) => setDescription(newDesc)
10839
+ }
10840
+ ), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement(
10841
+ "button",
10842
+ {
10843
+ type: "button",
10844
+ onClick: () => setIsDescriptionModalOpen(true),
10845
+ className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors"
10846
+ },
10847
+ /* @__PURE__ */ React18.createElement(FiEdit26, { size: 14 })
10848
+ )), !description && /* @__PURE__ */ React18.createElement(
10849
+ "div",
10850
+ {
10851
+ onClick: () => setIsDescriptionModalOpen(true),
10852
+ className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
10853
+ },
10854
+ "Adicionar descri\xE7\xE3o..."
10855
+ ))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-4 border-t border-white/10 pt-4" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
10715
10856
  "button",
10716
10857
  {
10717
10858
  type: "button",
@@ -10836,70 +10977,7 @@ function InSceneQuestForm({
10836
10977
  },
10837
10978
  /* @__PURE__ */ React18.createElement("span", { className: "truncate" }, q.raw_title || q.name),
10838
10979
  /* @__PURE__ */ React18.createElement("span", { className: "text-[10px] text-slate-500" }, q.status || "Backlog")
10839
- ))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
10840
- "button",
10841
- {
10842
- type: "button",
10843
- onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
10844
- className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
10845
- },
10846
- /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
10847
- /* @__PURE__ */ React18.createElement(
10848
- FiChevronDown6,
10849
- {
10850
- className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}`
10851
- }
10852
- )
10853
- ), isAssigneeDropdownOpen && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
10854
- "div",
10855
- {
10856
- className: "fixed inset-0 z-40",
10857
- onClick: () => {
10858
- setIsAssigneeDropdownOpen(false);
10859
- setAssigneeSearchQuery("");
10860
- }
10861
- }
10862
- ), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React18.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React18.createElement(
10863
- "input",
10864
- {
10865
- type: "text",
10866
- autoFocus: true,
10867
- placeholder: "Buscar membro...",
10868
- value: assigneeSearchQuery,
10869
- onChange: (e) => setAssigneeSearchQuery(e.target.value),
10870
- className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
10871
- onClick: (e) => e.stopPropagation()
10872
- }
10873
- )), /* @__PURE__ */ React18.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React18.createElement(
10874
- "li",
10875
- {
10876
- onClick: () => {
10877
- setAssigneeId("");
10878
- setIsAssigneeDropdownOpen(false);
10879
- setAssigneeSearchQuery("");
10880
- },
10881
- className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
10882
- },
10883
- "Nenhum"
10884
- ), viewMembers.filter((member) => {
10885
- const search = assigneeSearchQuery.toLowerCase();
10886
- return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10887
- }).map((member) => /* @__PURE__ */ React18.createElement(
10888
- "li",
10889
- {
10890
- key: member.id,
10891
- onClick: () => {
10892
- setAssigneeId(member.id);
10893
- setIsAssigneeDropdownOpen(false);
10894
- setAssigneeSearchQuery("");
10895
- },
10896
- className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${assigneeId === member.id ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
10897
- },
10898
- member.name || member.email || member.id
10899
- )), viewMembers.filter((member) => {
10900
- const search = assigneeSearchQuery.toLowerCase();
10901
- return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10902
- }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React18.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Prazo / Data"), !questDate && /* @__PURE__ */ React18.createElement(
10980
+ ))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Prazo / Data"), !questDate && /* @__PURE__ */ React18.createElement(
10903
10981
  "button",
10904
10982
  {
10905
10983
  type: "button",
@@ -11069,83 +11147,7 @@ function InSceneQuestForm({
11069
11147
  onChange: setReviewStack,
11070
11148
  viewMembers
11071
11149
  }
11072
- )), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(
11073
- DescriptionDisplay,
11074
- {
11075
- description,
11076
- savedSections: [],
11077
- availableNodes,
11078
- availableAncestries,
11079
- onMentionClick,
11080
- onSaveDescription: (newDesc) => setDescription(newDesc)
11081
- }
11082
- ), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement(
11083
- "button",
11084
- {
11085
- type: "button",
11086
- onClick: () => setIsDescriptionModalOpen(true),
11087
- className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors"
11088
- },
11089
- /* @__PURE__ */ React18.createElement(FiEdit26, { size: 14 })
11090
- )), !description && /* @__PURE__ */ React18.createElement(
11091
- "div",
11092
- {
11093
- onClick: () => setIsDescriptionModalOpen(true),
11094
- className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
11095
- },
11096
- "Adicionar descri\xE7\xE3o..."
11097
- ))), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, create_google_doc_action && /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, docError ? /* @__PURE__ */ React18.createElement(
11098
- "p",
11099
- {
11100
- className: "text-[10px] text-red-400 bg-red-400/10 px-2 py-1 rounded border border-red-400/20 max-w-[200px]",
11101
- title: docError
11102
- },
11103
- docError.length > 50 ? docError.substring(0, 47) + "..." : docError
11104
- ) : /* @__PURE__ */ React18.createElement(
11105
- "button",
11106
- {
11107
- type: "button",
11108
- onClick: handleCreateGoogleDoc,
11109
- disabled: isLoadingDocs,
11110
- className: "flex items-center justify-center text-slate-300 transition-all disabled:opacity-50 disabled:cursor-not-allowed group",
11111
- title: isLoadingDocs ? "Criando Documento..." : "Criar Documento no Google Docs"
11112
- },
11113
- isLoadingDocs ? /* @__PURE__ */ React18.createElement(
11114
- AiOutlineLoading3Quarters2,
11115
- {
11116
- className: "animate-spin",
11117
- size: 18
11118
- }
11119
- ) : /* @__PURE__ */ React18.createElement(
11120
- GoogleDocsIcon_default,
11121
- {
11122
- size: 18,
11123
- className: "group-hover:scale-110 transition-transform"
11124
- }
11125
- )
11126
- )), /* @__PURE__ */ React18.createElement(
11127
- "button",
11128
- {
11129
- type: "button",
11130
- onClick: handleAddProp,
11131
- className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
11132
- },
11133
- /* @__PURE__ */ React18.createElement(FiPlus7, { size: 14 }),
11134
- " Adicionar"
11135
- ))), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React18.createElement(
11136
- CustomPropertyDisplay,
11137
- {
11138
- key: prop.id,
11139
- prop,
11140
- onUpdate: (updatedProp) => handleUpdateProp(index, updatedProp),
11141
- onRemove: () => handleRemoveProp(index),
11142
- onOpenImageViewer,
11143
- unavailableTypes: currentUsedTypes.filter(
11144
- (t) => t !== prop.type
11145
- ),
11146
- onUploadFile
11147
- }
11148
- )), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React18.createElement(
11150
+ )), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React18.createElement(
11149
11151
  "button",
11150
11152
  {
11151
11153
  key: s,
@@ -11301,7 +11303,8 @@ function NodeDetailsPanel({
11301
11303
  }
11302
11304
  };
11303
11305
  useEffect16(() => {
11304
- if ((node == null ? void 0 : node.id) !== prevNodeIdRef.current) {
11306
+ const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
11307
+ if (isNewNode || !hasUnsavedChanges) {
11305
11308
  prevNodeIdRef.current = node == null ? void 0 : node.id;
11306
11309
  setName((node == null ? void 0 : node.name) ?? "");
11307
11310
  if (node == null ? void 0 : node.type) {
@@ -11321,7 +11324,7 @@ function NodeDetailsPanel({
11321
11324
  setSelectedImageUrl((node == null ? void 0 : node.textureImageUrl) ?? null);
11322
11325
  setHasUnsavedChanges(false);
11323
11326
  }
11324
- }, [node]);
11327
+ }, [node, hasUnsavedChanges]);
11325
11328
  const hasImages = customProps.some((p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value));
11326
11329
  useEffect16(() => {
11327
11330
  if (!hasImages && useImageAsTexture) {
@@ -12135,7 +12138,8 @@ function QuestDetailsPanel({
12135
12138
  };
12136
12139
  useEffect17(() => {
12137
12140
  var _a2;
12138
- if ((node == null ? void 0 : node.id) !== prevNodeIdRef.current) {
12141
+ const isNewNode = (node == null ? void 0 : node.id) !== prevNodeIdRef.current;
12142
+ if (isNewNode || !hasUnsavedChanges) {
12139
12143
  prevNodeIdRef.current = node == null ? void 0 : node.id;
12140
12144
  const newRawTitle = (node == null ? void 0 : node.raw_title) || (((_a2 = node == null ? void 0 : node.name) == null ? void 0 : _a2.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
12141
12145
  setRawTitle(newRawTitle);
@@ -12162,7 +12166,7 @@ function QuestDetailsPanel({
12162
12166
  });
12163
12167
  setHasUnsavedChanges(false);
12164
12168
  }
12165
- }, [node]);
12169
+ }, [node, hasUnsavedChanges]);
12166
12170
  useEffect17(() => {
12167
12171
  const validExistingTypes = existingTypes.filter((t) => t && typeof t === "string" && t.trim() !== "");
12168
12172
  if (typeInput.trim() === "") {
@@ -12566,40 +12570,180 @@ ${noteText}` : noteText : entry.notes,
12566
12570
  maxWidth: "92vw",
12567
12571
  ...style
12568
12572
  },
12569
- onPointerDown: swallow,
12570
- onPointerMove: swallow,
12571
- onPointerUp: swallow,
12572
- onClick: swallow,
12573
- onWheel: swallow,
12574
- onContextMenu: swallow,
12575
- onDoubleClick: swallow
12576
- },
12577
- /* @__PURE__ */ React21.createElement("div", { onPointerDown: (e) => {
12578
- e.stopPropagation();
12579
- handleResize(e);
12580
- }, className: "absolute left-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-indigo-500/50 z-[2000] transition-colors", title: "Arraste para redimensionar" }),
12581
- isReadMode ? /* @__PURE__ */ React21.createElement(
12582
- DescriptionReadModePanel,
12573
+ onPointerDown: swallow,
12574
+ onPointerMove: swallow,
12575
+ onPointerUp: swallow,
12576
+ onClick: swallow,
12577
+ onWheel: swallow,
12578
+ onContextMenu: swallow,
12579
+ onDoubleClick: swallow
12580
+ },
12581
+ /* @__PURE__ */ React21.createElement("div", { onPointerDown: (e) => {
12582
+ e.stopPropagation();
12583
+ handleResize(e);
12584
+ }, className: "absolute left-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-indigo-500/50 z-[2000] transition-colors", title: "Arraste para redimensionar" }),
12585
+ isReadMode ? /* @__PURE__ */ React21.createElement(
12586
+ DescriptionReadModePanel,
12587
+ {
12588
+ title: standardizedName || (node == null ? void 0 : node.name),
12589
+ description,
12590
+ savedSections: existingSections,
12591
+ onBack: () => setIsReadMode(false),
12592
+ onEdit: () => {
12593
+ if (canEdit) {
12594
+ setIsReadMode(false);
12595
+ setIsDescriptionModalOpen(true);
12596
+ }
12597
+ },
12598
+ onClose: handleCancel,
12599
+ availableNodes,
12600
+ availableAncestries,
12601
+ onOpenReference,
12602
+ onMentionClick,
12603
+ onImageClick: handleImageClickFromText,
12604
+ onSaveDescription: handleSaveDescriptionInline
12605
+ }
12606
+ ) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS3[status]}, transparent)` } }), /* @__PURE__ */ React21.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React21.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React21.createElement(FiTarget3, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React21.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React21.createElement("button", { onClick: handleCopyLink, className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-sky-400"}`, title: isLinkCopied ? "Link Copiado!" : "Copiar link para esta Quest" }, isLinkCopied ? /* @__PURE__ */ React21.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React21.createElement(FiLink7, { size: 12 }))), /* @__PURE__ */ React21.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React21.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React21.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), canEdit ? /* @__PURE__ */ React21.createElement("div", { className: "relative" }, /* @__PURE__ */ React21.createElement(
12607
+ "button",
12608
+ {
12609
+ type: "button",
12610
+ onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
12611
+ className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
12612
+ },
12613
+ /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React21.createElement("span", { className: "text-slate-200 font-medium" }, isAssigneeUndefined ? "Undefined" : (assigneeMember == null ? void 0 : assigneeMember.name) || (assigneeMember == null ? void 0 : assigneeMember.email) || "Nenhum")),
12614
+ /* @__PURE__ */ React21.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
12615
+ ), isAssigneeDropdownOpen && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
12616
+ setIsAssigneeDropdownOpen(false);
12617
+ setAssigneeSearchQuery("");
12618
+ } }), /* @__PURE__ */ React21.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiSearch7, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React21.createElement(
12619
+ "input",
12620
+ {
12621
+ type: "text",
12622
+ autoFocus: true,
12623
+ placeholder: "Buscar membro...",
12624
+ value: assigneeSearchQuery,
12625
+ onChange: (e) => setAssigneeSearchQuery(e.target.value),
12626
+ className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
12627
+ onClick: (e) => e.stopPropagation()
12628
+ }
12629
+ )), /* @__PURE__ */ React21.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React21.createElement(
12630
+ "li",
12631
+ {
12632
+ onClick: () => {
12633
+ setAssigneeId("");
12634
+ const newTimeline = [...timeline, createTimelineEntry(
12635
+ (currentUser == null ? void 0 : currentUser.id) || "unknown",
12636
+ `Status "${status}" - Respons\xE1vel: Nenhum`,
12637
+ "status_changed"
12638
+ )];
12639
+ setTimeline(newTimeline);
12640
+ setHasUnsavedChanges(true);
12641
+ setIsAssigneeDropdownOpen(false);
12642
+ setAssigneeSearchQuery("");
12643
+ },
12644
+ className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
12645
+ },
12646
+ "Nenhum"
12647
+ ), isAssigneeUndefined && /* @__PURE__ */ React21.createElement(
12648
+ "li",
12649
+ {
12650
+ onClick: () => {
12651
+ setIsAssigneeDropdownOpen(false);
12652
+ setAssigneeSearchQuery("");
12653
+ },
12654
+ className: "px-3 py-2.5 text-sm cursor-pointer bg-red-500/10 text-red-300 flex items-center gap-2"
12655
+ },
12656
+ "Undefined (Removido)"
12657
+ ), viewMembers.filter((member) => {
12658
+ const search = assigneeSearchQuery.toLowerCase();
12659
+ return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
12660
+ }).map((member) => /* @__PURE__ */ React21.createElement(
12661
+ "li",
12662
+ {
12663
+ key: member.id,
12664
+ onClick: () => {
12665
+ setAssigneeId(member.id);
12666
+ const newTimeline = [...timeline, createTimelineEntry(
12667
+ (currentUser == null ? void 0 : currentUser.id) || "unknown",
12668
+ `Status "${status}" - Respons\xE1vel: ${member.name || member.email}`,
12669
+ "status_changed"
12670
+ )];
12671
+ setTimeline(newTimeline);
12672
+ setHasUnsavedChanges(true);
12673
+ setIsAssigneeDropdownOpen(false);
12674
+ setAssigneeSearchQuery("");
12675
+ },
12676
+ className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${assigneeId === member.id ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
12677
+ },
12678
+ member.name || member.email || member.id
12679
+ )))))) : /* @__PURE__ */ React21.createElement("div", { className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "opacity-50", size: 14 }), assigneeId ? assigneeMember ? assigneeMember.name || assigneeMember.email : "Undefined" : "Nenhum")), /* @__PURE__ */ React21.createElement("div", { className: "space-y-3 pt-4 border-t border-white/5" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiGitBranch4, { className: "text-indigo-400", size: 14 }), /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Estruturas Visuais"))), /* @__PURE__ */ React21.createElement("div", { className: "bg-slate-900/60 p-2 rounded-xl border border-white/10 flex flex-col gap-2" }, /* @__PURE__ */ React21.createElement(
12680
+ "button",
12583
12681
  {
12584
- title: standardizedName || (node == null ? void 0 : node.name),
12585
- description,
12586
- savedSections: existingSections,
12587
- onBack: () => setIsReadMode(false),
12588
- onEdit: () => {
12589
- if (canEdit) {
12590
- setIsReadMode(false);
12591
- setIsDescriptionModalOpen(true);
12682
+ type: "button",
12683
+ onClick: () => {
12684
+ if (setQuestTreeMode) {
12685
+ const convertPersistedTree = (storedTree) => {
12686
+ if (!storedTree) return null;
12687
+ if (storedTree.node || storedTree.is_section) return storedTree;
12688
+ const nodeId = storedTree.node_id;
12689
+ if (!nodeId) return null;
12690
+ const foundNode = availableNodes.find((n) => String(n.id) === String(nodeId)) || (String(nodeId) === String(node == null ? void 0 : node.id) ? node : null);
12691
+ return {
12692
+ node: foundNode ? { id: foundNode.id, name: foundNode.raw_title || foundNode.name } : { id: nodeId, name: `Node ${nodeId}` },
12693
+ relationship: storedTree.relationship || {},
12694
+ children: (storedTree.children || []).map(convertPersistedTree).filter(Boolean)
12695
+ };
12696
+ };
12697
+ const rootNode = { id: node == null ? void 0 : node.id, name: (node == null ? void 0 : node.raw_title) || (node == null ? void 0 : node.name) || "Quest Principal" };
12698
+ const existingTree = (node == null ? void 0 : node.quest_tree) ? convertPersistedTree(node.quest_tree) : { node: rootNode, children: [] };
12699
+ const existingAbstractionTree = (node == null ? void 0 : node.quest_abstraction_tree) ? convertPersistedTree(node.quest_abstraction_tree) : { node: rootNode, children: [] };
12700
+ setQuestTreeMode((prev) => ({
12701
+ ...prev,
12702
+ isActive: true,
12703
+ isAddingNodes: true,
12704
+ questNodeId: node == null ? void 0 : node.id,
12705
+ questNodeName: (node == null ? void 0 : node.raw_title) || (node == null ? void 0 : node.name),
12706
+ tree: existingTree,
12707
+ abstraction_tree: existingAbstractionTree,
12708
+ selectedParentId: rootNode.id
12709
+ }));
12592
12710
  }
12593
12711
  },
12594
- onClose: handleCancel,
12595
- availableNodes,
12596
- availableAncestries,
12597
- onOpenReference,
12598
- onMentionClick,
12599
- onImageClick: handleImageClickFromText,
12600
- onSaveDescription: handleSaveDescriptionInline
12601
- }
12602
- ) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS3[status]}, transparent)` } }), /* @__PURE__ */ React21.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React21.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React21.createElement(FiTarget3, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React21.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React21.createElement("button", { onClick: handleCopyLink, className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-sky-400"}`, title: isLinkCopied ? "Link Copiado!" : "Copiar link para esta Quest" }, isLinkCopied ? /* @__PURE__ */ React21.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React21.createElement(FiLink7, { size: 12 }))), /* @__PURE__ */ React21.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React21.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React21.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React21.createElement(
12712
+ className: `flex items-center gap-2 px-3 py-2 bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-300 text-xs font-medium rounded-lg transition-colors w-full justify-center border border-indigo-500/20 ${!canEdit ? "opacity-50 pointer-events-none" : ""}`
12713
+ },
12714
+ /* @__PURE__ */ React21.createElement(FiGitBranch4, { className: "text-indigo-400" }),
12715
+ " Configurar \xC1rvores"
12716
+ ), /* @__PURE__ */ React21.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React21.createElement(
12717
+ "button",
12718
+ {
12719
+ type: "button",
12720
+ onClick: () => {
12721
+ if (handleRenderQuestTree) handleRenderQuestTree(node);
12722
+ },
12723
+ className: `flex-1 flex items-center justify-center gap-2 px-2 py-1.5 text-[11px] font-medium rounded-lg border transition-colors ${((_c = (_b = node == null ? void 0 : node.quest_tree) == null ? void 0 : _b.children) == null ? void 0 : _c.length) > 0 ? "bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-400 border-indigo-500/20" : "bg-slate-800 hover:bg-slate-700 text-slate-400 border-white/5"}`
12724
+ },
12725
+ "Renderizar Horizontal"
12726
+ ), /* @__PURE__ */ React21.createElement(
12727
+ "button",
12728
+ {
12729
+ type: "button",
12730
+ onClick: () => {
12731
+ if (handleRenderQuestAbstractionTree) handleRenderQuestAbstractionTree(node);
12732
+ },
12733
+ className: `flex-1 flex items-center justify-center gap-2 px-2 py-1.5 text-[11px] font-medium rounded-lg border transition-colors ${((_e = (_d = node == null ? void 0 : node.quest_abstraction_tree) == null ? void 0 : _d.children) == null ? void 0 : _e.length) > 0 ? "bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-400 border-indigo-500/20" : "bg-slate-800 hover:bg-slate-700 text-slate-400 border-white/5"}`
12734
+ },
12735
+ "Renderizar Vertical"
12736
+ )))), /* @__PURE__ */ React21.createElement("div", { className: "pt-4 border-t border-white/5" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, canEdit && create_google_doc_action && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, docError ? /* @__PURE__ */ React21.createElement("p", { className: "text-[10px] text-red-400 bg-red-400/10 px-2 py-1 rounded border border-red-400/20 max-w-[200px]", title: docError }, docError.length > 50 ? docError.substring(0, 47) + "..." : docError) : /* @__PURE__ */ React21.createElement(
12737
+ "button",
12738
+ {
12739
+ type: "button",
12740
+ onClick: handleCreateGoogleDoc,
12741
+ disabled: isLoadingDocs,
12742
+ className: "flex items-center justify-center text-slate-300 transition-all disabled:opacity-50 disabled:cursor-not-allowed group",
12743
+ title: isLoadingDocs ? "Criando Documento..." : "Criar Documento no Google Docs"
12744
+ },
12745
+ isLoadingDocs ? /* @__PURE__ */ React21.createElement(AiOutlineLoading3Quarters4, { className: "animate-spin", size: 18 }) : /* @__PURE__ */ React21.createElement(GoogleDocsIcon_default, { size: 18, className: "group-hover:scale-110 transition-transform" })
12746
+ )), canEdit && /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React21.createElement(FiPlus9, { size: 14 }), " Adicionar"))), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React21.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React21.createElement("div", { ref: propsEndRef }))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5 relative pt-4 border-t border-white/5" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React21.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React21.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React21.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React21.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React21.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React21.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5 pt-6 border-t border-white/10 mt-6" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React21.createElement(
12603
12747
  "input",
12604
12748
  {
12605
12749
  type: "text",
@@ -12608,7 +12752,7 @@ ${noteText}` : noteText : entry.notes,
12608
12752
  readOnly: !canEdit,
12609
12753
  className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
12610
12754
  }
12611
- ), /* @__PURE__ */ React21.createElement("div", { className: "pt-1 flex items-center gap-1.5 min-w-0" }, /* @__PURE__ */ React21.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName), /* @__PURE__ */ React21.createElement(
12755
+ ), /* @__PURE__ */ React21.createElement("div", { className: "pt-1 flex items-center gap-1.5 min-w-0" }, /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName), /* @__PURE__ */ React21.createElement(
12612
12756
  "button",
12613
12757
  {
12614
12758
  type: "button",
@@ -12822,83 +12966,7 @@ ${noteText}` : noteText : entry.notes,
12822
12966
  /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS3[s] } }), s),
12823
12967
  isDisabled && /* @__PURE__ */ React21.createElement(FiRepeat2, { className: "text-amber-400/60 rotate-180", size: 12 })
12824
12968
  );
12825
- }))))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), canEdit ? /* @__PURE__ */ React21.createElement("div", { className: "relative" }, /* @__PURE__ */ React21.createElement(
12826
- "button",
12827
- {
12828
- type: "button",
12829
- onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
12830
- className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
12831
- },
12832
- /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React21.createElement("span", { className: "text-slate-200 font-medium" }, isAssigneeUndefined ? "Undefined" : (assigneeMember == null ? void 0 : assigneeMember.name) || (assigneeMember == null ? void 0 : assigneeMember.email) || "Nenhum")),
12833
- /* @__PURE__ */ React21.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
12834
- ), isAssigneeDropdownOpen && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
12835
- setIsAssigneeDropdownOpen(false);
12836
- setAssigneeSearchQuery("");
12837
- } }), /* @__PURE__ */ React21.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiSearch7, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React21.createElement(
12838
- "input",
12839
- {
12840
- type: "text",
12841
- autoFocus: true,
12842
- placeholder: "Buscar membro...",
12843
- value: assigneeSearchQuery,
12844
- onChange: (e) => setAssigneeSearchQuery(e.target.value),
12845
- className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
12846
- onClick: (e) => e.stopPropagation()
12847
- }
12848
- )), /* @__PURE__ */ React21.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React21.createElement(
12849
- "li",
12850
- {
12851
- onClick: () => {
12852
- setAssigneeId("");
12853
- const newTimeline = [...timeline, createTimelineEntry(
12854
- (currentUser == null ? void 0 : currentUser.id) || "unknown",
12855
- `Status "${status}" - Respons\xE1vel: Nenhum`,
12856
- "status_changed"
12857
- )];
12858
- setTimeline(newTimeline);
12859
- setHasUnsavedChanges(true);
12860
- setIsAssigneeDropdownOpen(false);
12861
- setAssigneeSearchQuery("");
12862
- },
12863
- className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
12864
- },
12865
- "Nenhum"
12866
- ), isAssigneeUndefined && /* @__PURE__ */ React21.createElement(
12867
- "li",
12868
- {
12869
- onClick: () => {
12870
- setIsAssigneeDropdownOpen(false);
12871
- setAssigneeSearchQuery("");
12872
- },
12873
- className: "px-3 py-2.5 text-sm cursor-pointer bg-red-500/10 text-red-300 flex items-center gap-2"
12874
- },
12875
- "Undefined (Removido)"
12876
- ), viewMembers.filter((member) => {
12877
- const search = assigneeSearchQuery.toLowerCase();
12878
- return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
12879
- }).map((member) => /* @__PURE__ */ React21.createElement(
12880
- "li",
12881
- {
12882
- key: member.id,
12883
- onClick: () => {
12884
- setAssigneeId(member.id);
12885
- const newTimeline = [...timeline, createTimelineEntry(
12886
- (currentUser == null ? void 0 : currentUser.id) || "unknown",
12887
- `Status "${status}" - Respons\xE1vel: ${member.name || member.email}`,
12888
- "status_changed"
12889
- )];
12890
- setTimeline(newTimeline);
12891
- setHasUnsavedChanges(true);
12892
- setIsAssigneeDropdownOpen(false);
12893
- setAssigneeSearchQuery("");
12894
- },
12895
- className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${assigneeId === member.id ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
12896
- },
12897
- member.name || member.email || member.id
12898
- )), viewMembers.filter((member) => {
12899
- const search = assigneeSearchQuery.toLowerCase();
12900
- return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
12901
- }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React21.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado"))))) : /* @__PURE__ */ React21.createElement("div", { className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "opacity-50", size: 14 }), assigneeId ? assigneeMember ? assigneeMember.name || assigneeMember.email : "Undefined" : "Nenhum")), /* @__PURE__ */ React21.createElement("div", { className: "pt-4 border-t border-white/5 mt-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiRepeat2, { className: `w-3.5 h-3.5 ${recurrenceConfig.enabled ? "text-indigo-400" : "text-slate-500"}` }), /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Recorr\xEAncia")), /* @__PURE__ */ React21.createElement(
12969
+ }))))), /* @__PURE__ */ React21.createElement("div", { className: "pt-4 border-t border-white/5 mt-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiRepeat2, { className: `w-3.5 h-3.5 ${recurrenceConfig.enabled ? "text-indigo-400" : "text-slate-500"}` }), /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Recorr\xEAncia")), /* @__PURE__ */ React21.createElement(
12902
12970
  "button",
12903
12971
  {
12904
12972
  type: "button",
@@ -12986,7 +13054,7 @@ ${noteText}` : noteText : entry.notes,
12986
13054
  onClick: () => setIsReturnDropdownOpen(!isReturnDropdownOpen),
12987
13055
  className: "w-full bg-slate-800/80 p-2 text-xs rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-1 focus:ring-purple-400/50 transition-colors flex items-center justify-between"
12988
13056
  },
12989
- /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "text-slate-400", size: 12 }), /* @__PURE__ */ React21.createElement("span", { className: "text-slate-200 font-medium" }, ((_b = viewMembers.find((m) => String(m.id) === String(returnAssigneeId))) == null ? void 0 : _b.name) || "Selecionar respons\xE1vel...")),
13057
+ /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiUser3, { className: "text-slate-400", size: 12 }), /* @__PURE__ */ React21.createElement("span", { className: "text-slate-200 font-medium" }, ((_f = viewMembers.find((m) => String(m.id) === String(returnAssigneeId))) == null ? void 0 : _f.name) || "Selecionar respons\xE1vel...")),
12990
13058
  /* @__PURE__ */ React21.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isReturnDropdownOpen ? "rotate-180" : ""}`, size: 14 })
12991
13059
  ), isReturnDropdownOpen && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
12992
13060
  setIsReturnDropdownOpen(false);
@@ -13030,68 +13098,7 @@ ${noteText}` : noteText : entry.notes,
13030
13098
  },
13031
13099
  /* @__PURE__ */ React21.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("path", { d: "M12 19V5M5 12l7 7 7-7" })),
13032
13100
  "Retornar para Opera\xE7\xE3o"
13033
- ))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React21.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React21.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React21.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React21.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React21.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React21.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React21.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React21.createElement("div", { className: "pt-2 border-t border-white/5 space-y-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiGitBranch4, { className: "text-indigo-400", size: 14 }), /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Estruturas Visuais"))), /* @__PURE__ */ React21.createElement("div", { className: "bg-slate-900/60 p-2 rounded-xl border border-white/10 flex flex-col gap-2" }, /* @__PURE__ */ React21.createElement(
13034
- "button",
13035
- {
13036
- type: "button",
13037
- onClick: () => {
13038
- if (setQuestTreeMode) {
13039
- const convertPersistedTree = (storedTree) => {
13040
- if (!storedTree) return null;
13041
- if (storedTree.node || storedTree.is_section) return storedTree;
13042
- const nodeId = storedTree.node_id;
13043
- if (!nodeId) return null;
13044
- const foundNode = availableNodes.find((n) => String(n.id) === String(nodeId)) || (String(nodeId) === String(node == null ? void 0 : node.id) ? node : null);
13045
- return {
13046
- node: foundNode ? { id: foundNode.id, name: foundNode.raw_title || foundNode.name } : { id: nodeId, name: `Node ${nodeId}` },
13047
- relationship: storedTree.relationship || {},
13048
- children: (storedTree.children || []).map(convertPersistedTree).filter(Boolean)
13049
- };
13050
- };
13051
- const rootNode = { id: node == null ? void 0 : node.id, name: (node == null ? void 0 : node.raw_title) || (node == null ? void 0 : node.name) || "Quest Principal" };
13052
- const existingTree = (node == null ? void 0 : node.quest_tree) ? convertPersistedTree(node.quest_tree) : { node: rootNode, children: [] };
13053
- const existingAbstractionTree = (node == null ? void 0 : node.quest_abstraction_tree) ? convertPersistedTree(node.quest_abstraction_tree) : { node: rootNode, children: [] };
13054
- setQuestTreeMode((prev) => ({
13055
- ...prev,
13056
- isActive: true,
13057
- isAddingNodes: true,
13058
- questNodeId: node == null ? void 0 : node.id,
13059
- questNodeName: (node == null ? void 0 : node.raw_title) || (node == null ? void 0 : node.name),
13060
- tree: existingTree,
13061
- abstraction_tree: existingAbstractionTree,
13062
- selectedParentId: rootNode.id
13063
- }));
13064
- }
13065
- },
13066
- className: `flex items-center gap-2 px-3 py-2 bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-300 text-xs font-medium rounded-lg transition-colors w-full justify-center border border-indigo-500/20 ${!canEdit ? "opacity-50 pointer-events-none" : ""}`
13067
- },
13068
- /* @__PURE__ */ React21.createElement(FiGitBranch4, { className: "text-indigo-400" }),
13069
- " Configurar \xC1rvores"
13070
- ), /* @__PURE__ */ React21.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React21.createElement(
13071
- "button",
13072
- {
13073
- type: "button",
13074
- onClick: () => {
13075
- if (handleRenderQuestTree) {
13076
- handleRenderQuestTree(node);
13077
- }
13078
- },
13079
- className: `flex-1 flex items-center justify-center gap-2 px-2 py-1.5 text-[11px] font-medium rounded-lg border transition-colors ${((_d = (_c = node == null ? void 0 : node.quest_tree) == null ? void 0 : _c.children) == null ? void 0 : _d.length) > 0 ? "bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-400 border-indigo-500/20" : "bg-slate-800 hover:bg-slate-700 text-slate-400 border-white/5"}`
13080
- },
13081
- "Renderizar Horizontal"
13082
- ), /* @__PURE__ */ React21.createElement(
13083
- "button",
13084
- {
13085
- type: "button",
13086
- onClick: () => {
13087
- if (handleRenderQuestAbstractionTree) {
13088
- handleRenderQuestAbstractionTree(node);
13089
- }
13090
- },
13091
- className: `flex-1 flex items-center justify-center gap-2 px-2 py-1.5 text-[11px] font-medium rounded-lg border transition-colors ${((_f = (_e = node == null ? void 0 : node.quest_abstraction_tree) == null ? void 0 : _e.children) == null ? void 0 : _f.length) > 0 ? "bg-indigo-500/10 hover:bg-indigo-500/30 text-indigo-400 border-indigo-500/20" : "bg-slate-800 hover:bg-slate-700 text-slate-400 border-white/5"}`
13092
- },
13093
- "Renderizar Vertical"
13094
- )))), /* @__PURE__ */ React21.createElement("div", { className: "pt-2 border-t border-white/5 space-y-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiLink7, { className: "text-indigo-400", size: 14 }), /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Depend\xEAncias (Quest Chain)"))), /* @__PURE__ */ React21.createElement("div", { className: `relative w-full bg-slate-900/60 p-2 min-h-[42px] flex flex-wrap gap-2 rounded-xl border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/40" : ""} transition-all` }, dependencyIds.map((depId) => {
13101
+ ))), /* @__PURE__ */ React21.createElement("div", { className: "pt-2 border-t border-white/5 space-y-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(FiLink7, { className: "text-indigo-400", size: 14 }), /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Depend\xEAncias (Quest Chain)"))), /* @__PURE__ */ React21.createElement("div", { className: `relative w-full bg-slate-900/60 p-2 min-h-[42px] flex flex-wrap gap-2 rounded-xl border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/40" : ""} transition-all` }, dependencyIds.map((depId) => {
13095
13102
  const depNode = availableNodes.find((n) => String(n.id) === String(depId));
13096
13103
  if (!depNode) return null;
13097
13104
  const isDone = depNode.status === "Done";
@@ -13147,36 +13154,7 @@ ${noteText}` : noteText : entry.notes,
13147
13154
  },
13148
13155
  /* @__PURE__ */ React21.createElement("span", { className: "truncate" }, q.raw_title || q.name),
13149
13156
  /* @__PURE__ */ React21.createElement("span", { className: `text-[10px] px-1.5 py-0.5 rounded border ${q.status === "Done" ? "text-green-400 border-green-500/30" : "text-slate-500 border-white/5"}` }, q.status || "Backlog")
13150
- )) : /* @__PURE__ */ React21.createElement("li", { className: "px-3 py-3 text-[10px] text-slate-500 italic text-center" }, "Nenhuma outra quest dispon\xEDvel")))), blockedStatus.isBlocked && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 px-3 py-2 bg-amber-500/5 rounded-lg border border-amber-500/10 animate-in fade-in slide-in-from-top-1" }, /* @__PURE__ */ React21.createElement(FiRepeat2, { className: "text-amber-400 animate-spin-slow", size: 12 }), /* @__PURE__ */ React21.createElement("p", { className: "text-[10px] text-amber-200/80 font-medium" }, "Esta quest est\xE1 bloqueada por ", blockedStatus.pendingDependencies.length, " tarefa(s) pendente(s)."))), /* @__PURE__ */ React21.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, canEdit && create_google_doc_action && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, docError ? /* @__PURE__ */ React21.createElement(
13151
- "p",
13152
- {
13153
- className: "text-[10px] text-red-400 bg-red-400/10 px-2 py-1 rounded border border-red-400/20 max-w-[200px]",
13154
- title: docError
13155
- },
13156
- docError.length > 50 ? docError.substring(0, 47) + "..." : docError
13157
- ) : /* @__PURE__ */ React21.createElement(
13158
- "button",
13159
- {
13160
- type: "button",
13161
- onClick: handleCreateGoogleDoc,
13162
- disabled: isLoadingDocs,
13163
- className: "flex items-center justify-center text-slate-300 transition-all disabled:opacity-50 disabled:cursor-not-allowed group",
13164
- title: isLoadingDocs ? "Criando Documento..." : "Criar Documento no Google Docs"
13165
- },
13166
- isLoadingDocs ? /* @__PURE__ */ React21.createElement(
13167
- AiOutlineLoading3Quarters4,
13168
- {
13169
- className: "animate-spin",
13170
- size: 18
13171
- }
13172
- ) : /* @__PURE__ */ React21.createElement(
13173
- GoogleDocsIcon_default,
13174
- {
13175
- size: 18,
13176
- className: "group-hover:scale-110 transition-transform"
13177
- }
13178
- )
13179
- )), canEdit && /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React21.createElement(FiPlus9, { size: 14 }), " Adicionar"))), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React21.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React21.createElement("div", { ref: propsEndRef }))), /* @__PURE__ */ React21.createElement("div", { className: "pt-6 border-t border-white/10 mt-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Hist\xF3rico & Notas"), /* @__PURE__ */ React21.createElement(
13157
+ )) : /* @__PURE__ */ React21.createElement("li", { className: "px-3 py-3 text-[10px] text-slate-500 italic text-center" }, "Nenhuma outra quest dispon\xEDvel")))), blockedStatus.isBlocked && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 px-3 py-2 bg-amber-500/5 rounded-lg border border-amber-500/10 animate-in fade-in slide-in-from-top-1" }, /* @__PURE__ */ React21.createElement(FiRepeat2, { className: "text-amber-400 animate-spin-slow", size: 12 }), /* @__PURE__ */ React21.createElement("p", { className: "text-[10px] text-amber-200/80 font-medium" }, "Esta quest est\xE1 bloqueada por ", blockedStatus.pendingDependencies.length, " tarefa(s) pendente(s)."))), /* @__PURE__ */ React21.createElement("div", { className: "pt-6 border-t border-white/10 mt-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "Hist\xF3rico & Notas"), /* @__PURE__ */ React21.createElement(
13180
13158
  "button",
13181
13159
  {
13182
13160
  type: "button",