@lv-x-software-house/x_view 1.2.6-dev.51 → 1.2.6-dev.52

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 +197 -346
  2. package/dist/index.mjs +197 -346
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -3869,11 +3869,11 @@ function XViewSidebar({
3869
3869
  const [isFilterMenuOpen, setIsFilterMenuOpen] = useState3(false);
3870
3870
  const [filterCategory, setFilterCategory] = useState3("Type");
3871
3871
  const [filterValue, setFilterValue] = useState3("");
3872
+ const [activeSubMenu, setActiveSubMenu] = useState3(null);
3872
3873
  const [questFilterAssignee, setQuestFilterAssignee] = useState3("");
3873
3874
  const [questFilterStatus, setQuestFilterStatus] = useState3("");
3874
- const [isQuestLensMenuOpen, setIsQuestLensMenuOpen] = useState3(false);
3875
3875
  const [questFilterMilestone, setQuestFilterMilestone] = useState3("");
3876
- const [isReshapeLensMenuOpen, setIsReshapeLensMenuOpen] = useState3(false);
3876
+ const [isQuestLensLoading, setIsQuestLensLoading] = useState3(false);
3877
3877
  const [reshapeLayoutType, setReshapeLayoutType] = useState3("Star");
3878
3878
  const [reshapeColumnCount, setReshapeColumnCount] = useState3(4);
3879
3879
  const [reshapeCenterNodeId, setReshapeCenterNodeId] = useState3("");
@@ -3883,8 +3883,7 @@ function XViewSidebar({
3883
3883
  const inputRef = useRef2(null);
3884
3884
  const filterMenuRef = useRef2(null);
3885
3885
  const typeDropdownRef = useRef2(null);
3886
- const questLensRef = useRef2(null);
3887
- const reshapeLensRef = useRef2(null);
3886
+ const annexedPanelRef = useRef2(null);
3888
3887
  const ability = useMemo2(() => {
3889
3888
  return defineAbilityFor(userRole);
3890
3889
  }, [userRole]);
@@ -3990,19 +3989,17 @@ function XViewSidebar({
3990
3989
  return () => document.removeEventListener("mousedown", handleClickOutside);
3991
3990
  }, [isFilterMenuOpen, isTypeDropdownOpen]);
3992
3991
  useEffect2(() => {
3993
- const handleClickOutsideQuestAndReshape = (event) => {
3994
- if (questLensRef.current && !questLensRef.current.contains(event.target)) {
3995
- setIsQuestLensMenuOpen(false);
3996
- }
3997
- if (reshapeLensRef.current && !reshapeLensRef.current.contains(event.target)) {
3998
- setIsReshapeLensMenuOpen(false);
3992
+ const handleClickOutsideAnnexed = (event) => {
3993
+ if (annexedPanelRef.current && !annexedPanelRef.current.contains(event.target)) {
3994
+ if (event.target.closest(".lens-button")) return;
3995
+ setActiveSubMenu(null);
3999
3996
  }
4000
3997
  };
4001
- if (isQuestLensMenuOpen || isReshapeLensMenuOpen) {
4002
- document.addEventListener("mousedown", handleClickOutsideQuestAndReshape);
3998
+ if (activeSubMenu) {
3999
+ document.addEventListener("mousedown", handleClickOutsideAnnexed);
4003
4000
  }
4004
- return () => document.removeEventListener("mousedown", handleClickOutsideQuestAndReshape);
4005
- }, [isQuestLensMenuOpen, isReshapeLensMenuOpen]);
4001
+ return () => document.removeEventListener("mousedown", handleClickOutsideAnnexed);
4002
+ }, [activeSubMenu]);
4006
4003
  useEffect2(() => {
4007
4004
  if (!query) setSelectedNodeId(null);
4008
4005
  }, [query]);
@@ -4100,359 +4097,213 @@ function XViewSidebar({
4100
4097
  if (!isOpen) return ToggleButton;
4101
4098
  const buttonBaseClass = "w-full px-3 py-2 rounded-md bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/30 text-sm text-indigo-200 transition-colors flex items-center justify-center gap-2";
4102
4099
  const buttonDisabledClass = "w-full px-3 py-2 rounded-md bg-slate-800/50 border border-white/5 text-sm text-slate-500 cursor-not-allowed flex items-center justify-center gap-2";
4103
- return /* @__PURE__ */ React2.createElement(
4104
- "div",
4105
- {
4106
- ref: containerRef,
4107
- className: "ui-overlay fixed left-0 top-0 h-[100dvh] w-[min(92vw,320px)] z-40 overflow-hidden",
4108
- onPointerDown: swallow,
4109
- onPointerMove: swallow,
4110
- onPointerUp: swallow,
4111
- onClick: swallow,
4112
- onWheel: swallow,
4113
- onContextMenu: swallow,
4114
- onDoubleClick: swallow
4115
- },
4116
- /* @__PURE__ */ React2.createElement("div", { className: "h-full flex flex-col overflow-hidden bg-slate-950/80 backdrop-blur-xl border-r border-white/10 shadow-[0_0_40px_rgba(0,0,0,0.45)]" }, /* @__PURE__ */ React2.createElement("div", { className: "relative px-4 py-3 border-b border-white/10 flex items-center gap-2" }, /* @__PURE__ */ React2.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_10px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React2.createElement("h3", { className: "text-sm font-medium text-slate-100" }, "Ferramentas"), /* @__PURE__ */ React2.createElement(
4117
- "button",
4118
- {
4119
- className: "ml-auto p-2 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
4120
- onClick: () => onToggle(false),
4121
- title: "Fechar"
4122
- },
4123
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement(
4124
- "path",
4125
- {
4126
- fillRule: "evenodd",
4127
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
4128
- clipRule: "evenodd"
4129
- }
4130
- ))
4131
- )), /* @__PURE__ */ React2.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-4 space-y-6" }, /* @__PURE__ */ React2.createElement("section", null, /* @__PURE__ */ React2.createElement("div", { className: "mb-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Pesquisar Node")), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement(
4100
+ const renderAnnexedPanel = () => {
4101
+ if (!activeSubMenu) return null;
4102
+ return /* @__PURE__ */ React2.createElement(
4132
4103
  "div",
4133
4104
  {
4134
- className: "w-full bg-slate-800/70 p-1.5 flex flex-wrap items-center gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all cursor-text min-h-[42px]",
4135
- onClick: () => {
4136
- var _a;
4137
- return (_a = inputRef.current) == null ? void 0 : _a.focus();
4138
- }
4105
+ ref: annexedPanelRef,
4106
+ className: "flex flex-col h-full w-[100vw] md:w-[280px] min-w-[100vw] md:min-w-[280px] bg-slate-950/95 md:bg-slate-950/80 backdrop-blur-2xl border-r border-white/10 shadow-2xl"
4139
4107
  },
4140
- activeFilters.map((filter, idx) => /* @__PURE__ */ React2.createElement("span", { key: idx, className: "flex items-center gap-1.5 bg-indigo-500/20 text-indigo-200 border border-indigo-500/30 px-2 py-0.5 rounded text-xs font-medium max-w-full" }, filter.type === "Color" && /* @__PURE__ */ React2.createElement(
4141
- "span",
4108
+ /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-b border-white/10 flex items-center gap-2 bg-white/5" }, /* @__PURE__ */ React2.createElement(
4109
+ "button",
4142
4110
  {
4143
- className: "inline-block w-2.5 h-2.5 rounded-full border border-white/20",
4144
- style: { backgroundColor: filter.value }
4145
- }
4146
- ), /* @__PURE__ */ React2.createElement("span", { className: "truncate max-w-[120px]" }, filter.type, ": ", filter.value), /* @__PURE__ */ React2.createElement(
4111
+ onClick: () => setActiveSubMenu(null),
4112
+ className: "p-1.5 -ml-1 rounded-md text-slate-400 hover:text-white hover:bg-white/10 md:hidden transition-colors",
4113
+ title: "Voltar"
4114
+ },
4115
+ /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { fillRule: "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", clipRule: "evenodd" }))
4116
+ ), /* @__PURE__ */ React2.createElement("h3", { className: "text-sm font-semibold text-indigo-100 uppercase tracking-wider" }, activeSubMenu === "quest" ? "Quest Lens" : "Reshape Lens"), /* @__PURE__ */ React2.createElement(
4147
4117
  "button",
4148
4118
  {
4149
- type: "button",
4150
- onClick: (e) => {
4151
- e.stopPropagation();
4152
- handleRemoveFilter(idx);
4119
+ className: "ml-auto p-1.5 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors hidden md:block",
4120
+ onClick: () => setActiveSubMenu(null),
4121
+ title: "Fechar Sub-menu"
4122
+ },
4123
+ /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }))
4124
+ )),
4125
+ /* @__PURE__ */ React2.createElement("div", { className: "flex-1 overflow-y-auto p-4 space-y-6" }, activeSubMenu === "quest" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-500" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Respons\xE1vel"), /* @__PURE__ */ React2.createElement("div", { className: "relative group/select" }, /* @__PURE__ */ React2.createElement(
4126
+ "select",
4127
+ {
4128
+ value: questFilterAssignee,
4129
+ onChange: (e) => setQuestFilterAssignee(e.target.value),
4130
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-slate-200 appearance-none cursor-pointer hover:bg-slate-800/50 transition-all"
4131
+ },
4132
+ /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Respons\xE1veis"),
4133
+ viewMembers.map((m) => /* @__PURE__ */ React2.createElement("option", { key: m.id, value: m.id }, m.name || m.email))
4134
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 group-hover/select:text-indigo-400 transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))))), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Status"), /* @__PURE__ */ React2.createElement("div", { className: "relative group/select" }, /* @__PURE__ */ React2.createElement(
4135
+ "select",
4136
+ {
4137
+ value: questFilterStatus,
4138
+ onChange: (e) => setQuestFilterStatus(e.target.value),
4139
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-slate-200 appearance-none cursor-pointer hover:bg-slate-800/50 transition-all"
4140
+ },
4141
+ /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos (Exclui Done)"),
4142
+ /* @__PURE__ */ React2.createElement("option", { value: "Backlog" }, "Backlog"),
4143
+ /* @__PURE__ */ React2.createElement("option", { value: "In Progress" }, "In Progress"),
4144
+ /* @__PURE__ */ React2.createElement("option", { value: "Review" }, "Review"),
4145
+ /* @__PURE__ */ React2.createElement("option", { value: "Done" }, "Done")
4146
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 group-hover/select:text-indigo-400 transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))))), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Milestone"), /* @__PURE__ */ React2.createElement("div", { className: "relative group/select" }, /* @__PURE__ */ React2.createElement(
4147
+ "select",
4148
+ {
4149
+ value: questFilterMilestone,
4150
+ onChange: (e) => setQuestFilterMilestone(e.target.value),
4151
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-slate-200 appearance-none cursor-pointer hover:bg-slate-800/50 transition-all"
4152
+ },
4153
+ /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Milestones"),
4154
+ milestones.map((ms) => /* @__PURE__ */ React2.createElement("option", { key: ms.id, value: ms.id }, ms.name, " ", ms.status === "inactive" ? "(Inativo)" : ""))
4155
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 group-hover/select:text-indigo-400 transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))))), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-3 pt-4" }, /* @__PURE__ */ React2.createElement(
4156
+ "button",
4157
+ {
4158
+ onClick: () => {
4159
+ setQuestFilterAssignee("");
4160
+ setQuestFilterStatus("");
4161
+ setQuestFilterMilestone("");
4153
4162
  },
4154
- className: "hover:text-white transition-colors"
4163
+ className: "flex-1 py-3 bg-white/[0.03] hover:bg-white/[0.08] text-slate-400 hover:text-slate-200 text-[10px] font-black uppercase tracking-widest rounded-xl transition-all border border-white/5 active:scale-95"
4155
4164
  },
4156
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ React2.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))
4157
- ))),
4158
- /* @__PURE__ */ React2.createElement(
4165
+ "Limpar"
4166
+ ), /* @__PURE__ */ React2.createElement(
4167
+ "button",
4168
+ {
4169
+ onClick: () => {
4170
+ onActivateQuestLens({
4171
+ assigneeId: questFilterAssignee,
4172
+ status: questFilterStatus,
4173
+ milestoneId: questFilterMilestone
4174
+ });
4175
+ setActiveSubMenu(null);
4176
+ },
4177
+ className: "flex-[2] py-3 bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-black uppercase tracking-widest rounded-xl shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95"
4178
+ },
4179
+ "Aplicar Lente"
4180
+ ))), activeSubMenu === "reshape" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-500" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Layout Type"), /* @__PURE__ */ React2.createElement("div", { className: "relative group/select" }, /* @__PURE__ */ React2.createElement(
4181
+ "select",
4182
+ {
4183
+ value: reshapeLayoutType,
4184
+ onChange: (e) => setReshapeLayoutType(e.target.value),
4185
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-slate-200 appearance-none cursor-pointer hover:bg-slate-800/50 transition-all"
4186
+ },
4187
+ /* @__PURE__ */ React2.createElement("option", { value: "Star" }, "Star"),
4188
+ /* @__PURE__ */ React2.createElement("option", { value: "Circle" }, "Circle"),
4189
+ /* @__PURE__ */ React2.createElement("option", { value: "Column" }, "Column")
4190
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 group-hover/select:text-indigo-400 transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))))), reshapeLayoutType === "Column" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "Colunas"), /* @__PURE__ */ React2.createElement(
4159
4191
  "input",
4160
4192
  {
4161
- ref: inputRef,
4162
- type: "text",
4163
- value: query,
4164
- onChange: (e) => setQuery(e.target.value),
4165
- onFocus: () => setShowList(true),
4166
- onBlur: () => setTimeout(() => setShowList(false), 120),
4167
- onKeyDown: handleKeyDown,
4168
- placeholder: activeFilters.length === 0 ? "Digite parte do nome..." : "",
4169
- className: "bg-transparent border-none outline-none flex-1 min-w-[80px] text-sm text-slate-100 placeholder-slate-500",
4170
- autoComplete: "off"
4193
+ type: "number",
4194
+ min: "1",
4195
+ max: "12",
4196
+ value: reshapeColumnCount,
4197
+ onChange: (e) => setReshapeColumnCount(parseInt(e.target.value) || 4),
4198
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white hover:bg-slate-800/50 transition-all"
4171
4199
  }
4172
- )
4173
- ), showList && /* @__PURE__ */ React2.createElement("ul", { className: "custom-scrollbar absolute mt-1 z-10 w-full max-h-[min(448px,50dvh)] overflow-y-auto rounded-lg bg-slate-900/95 border border-white/10 shadow-xl" }, filteredAndSorted.length > 0 ? filteredAndSorted.map((n) => {
4174
- const inView = isNodeInView(n.id);
4175
- const active = selectedNodeId === n.id;
4176
- const typeLabel = Array.isArray(n.type) ? n.type.join(", ") : n.type;
4177
- return /* @__PURE__ */ React2.createElement(
4178
- "li",
4200
+ )), reshapeLayoutType === "Star" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2.5" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[11px] uppercase text-slate-400 font-semibold tracking-wider ml-1 mb-1 block" }, "N\xF3 Central"), /* @__PURE__ */ React2.createElement("div", { className: "relative group/select" }, /* @__PURE__ */ React2.createElement(
4201
+ "select",
4179
4202
  {
4180
- key: n.id,
4181
- onMouseDown: () => handlePick(n),
4182
- className: `px-3 py-2 text-sm flex items-center gap-2 cursor-pointer ${active ? "bg-indigo-600/60 text-white" : "text-slate-200 hover:bg-indigo-500/30"}`,
4183
- title: n.name
4203
+ value: reshapeCenterNodeId,
4204
+ onChange: (e) => setReshapeCenterNodeId(e.target.value),
4205
+ className: "w-full bg-slate-900/80 px-3 py-2.5 text-sm rounded-md border border-white/10 focus:outline-none focus:border-indigo-500/50 text-slate-200 appearance-none cursor-pointer hover:bg-slate-800/50 transition-all"
4184
4206
  },
4185
- /* @__PURE__ */ React2.createElement("span", { className: `inline-block h-2 w-2 rounded-full flex-shrink-0 ${inView ? "bg-emerald-400" : "bg-slate-500"}` }),
4186
- /* @__PURE__ */ React2.createElement("span", { className: "truncate flex-1" }, n.name),
4187
- typeLabel && /* @__PURE__ */ React2.createElement("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-white/10 border border-white/10 truncate max-w-[100px]" }, typeLabel)
4188
- );
4189
- }) : /* @__PURE__ */ React2.createElement("li", { className: "px-3 py-2 text-sm text-slate-400" }, "Nenhum resultado"))), /* @__PURE__ */ React2.createElement("div", { className: "mt-3 flex items-center gap-2" }, /* @__PURE__ */ React2.createElement(
4190
- "button",
4191
- {
4192
- onClick: handleConfirm,
4193
- disabled: !selectedNodeId,
4194
- className: `flex-1 ${selectedNodeId ? buttonBaseClass : buttonDisabledClass}`
4195
- },
4196
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "5 3 19 12 5 21 5 3" })),
4197
- "Renderizar"
4198
- ), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: filterMenuRef }, /* @__PURE__ */ React2.createElement(
4199
- "button",
4200
- {
4201
- onClick: () => setIsFilterMenuOpen(!isFilterMenuOpen),
4202
- className: `px-3 py-2 rounded-md text-sm font-medium border transition-colors flex items-center gap-2 ${isFilterMenuOpen || activeFilters.length > 0 ? "bg-indigo-500/30 text-indigo-200 border-indigo-500/40" : "bg-indigo-500/10 text-indigo-200 border-indigo-500/30 hover:bg-indigo-500/20"}`,
4203
- title: "Adicionar filtros"
4204
- },
4205
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })),
4206
- "Filters"
4207
- ), isFilterMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute right-0 top-full mt-2 w-56 p-3 rounded-lg bg-slate-900 border border-white/10 shadow-xl z-50 flex flex-col gap-3 animate-in fade-in zoom-in-95 duration-100" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Filtro"), /* @__PURE__ */ React2.createElement("div", { className: "flex bg-slate-800/50 p-1 rounded-md" }, ["Type", "Color", "Dataset"].map((opt) => /* @__PURE__ */ React2.createElement(
4208
- "button",
4209
- {
4210
- key: opt,
4211
- onClick: () => {
4212
- setFilterCategory(opt);
4213
- setFilterValue("");
4207
+ /* @__PURE__ */ React2.createElement("option", { value: "" }, "Selecione um n\xF3..."),
4208
+ (Array.isArray(dbNodes) ? dbNodes.filter((n) => isNodeInView(n.id)) : []).map((n) => /* @__PURE__ */ React2.createElement("option", { key: n.id, value: n.id }, n.name))
4209
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-500 group-hover/select:text-indigo-400 transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React2.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))))), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-3 pt-4" }, /* @__PURE__ */ React2.createElement(
4210
+ "button",
4211
+ {
4212
+ onClick: () => {
4213
+ setReshapeLayoutType("Star");
4214
+ setReshapeColumnCount(4);
4215
+ setReshapeCenterNodeId("");
4216
+ },
4217
+ className: "flex-1 py-3 bg-white/[0.03] hover:bg-white/[0.08] text-slate-400 hover:text-slate-200 text-[10px] font-black uppercase tracking-widest rounded-xl transition-all border border-white/5 active:scale-95"
4214
4218
  },
4215
- className: `flex-1 text-xs py-1 rounded transition-colors ${filterCategory === opt ? "bg-indigo-600 text-white shadow-sm" : "text-slate-400 hover:text-slate-200"}`
4216
- },
4217
- opt
4218
- )))), /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Valor"), filterCategory === "Type" || filterCategory === "Dataset" ? /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: typeDropdownRef }, /* @__PURE__ */ React2.createElement(
4219
- "input",
4220
- {
4221
- type: "text",
4222
- value: filterValue,
4223
- onChange: (e) => {
4224
- setFilterValue(e.target.value);
4225
- if (!isTypeDropdownOpen) setIsTypeDropdownOpen(true);
4226
- setHighlightedTypeIndex(-1);
4219
+ "Resetar"
4220
+ ), /* @__PURE__ */ React2.createElement(
4221
+ "button",
4222
+ {
4223
+ onClick: () => {
4224
+ onActivateReshapeLens({
4225
+ type: reshapeLayoutType,
4226
+ columns: reshapeColumnCount,
4227
+ centerNodeId: reshapeCenterNodeId
4228
+ });
4229
+ setActiveSubMenu(null);
4230
+ },
4231
+ disabled: reshapeLayoutType === "Star" && !reshapeCenterNodeId,
4232
+ className: "flex-[2] py-3 bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-black uppercase tracking-widest rounded-xl shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95 disabled:opacity-30 disabled:grayscale disabled:cursor-not-allowed"
4227
4233
  },
4228
- onFocus: () => setIsTypeDropdownOpen(true),
4229
- onKeyDown: handleTypeKeyDown,
4230
- placeholder: filterCategory === "Type" ? "Ex: Concept" : "Ex: Dataset 1",
4231
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white",
4232
- autoFocus: true
4233
- }
4234
- ), isTypeDropdownOpen && filteredAutocompleteOptions.length > 0 && /* @__PURE__ */ React2.createElement("div", { className: "absolute z-[60] left-0 right-0 mt-1 max-h-48 overflow-y-auto bg-slate-900/95 backdrop-blur-xl border border-white/10 rounded-md shadow-2xl custom-scrollbar" }, filteredAutocompleteOptions.map((t, idx) => /* @__PURE__ */ React2.createElement(
4235
- "div",
4236
- {
4237
- key: t,
4238
- className: `px-3 py-2 text-xs cursor-pointer transition-colors ${idx === highlightedTypeIndex ? "bg-indigo-600 text-white" : "text-slate-300 hover:bg-white/10"}`,
4239
- onMouseDown: (e) => {
4240
- e.preventDefault();
4241
- setFilterValue(t);
4242
- setIsTypeDropdownOpen(false);
4243
- setHighlightedTypeIndex(-1);
4244
- }
4245
- },
4246
- t
4247
- )))) : /* @__PURE__ */ React2.createElement("div", { className: "relative flex items-center" }, /* @__PURE__ */ React2.createElement(
4234
+ "Aplicar Lente"
4235
+ )))),
4236
+ /* @__PURE__ */ React2.createElement("div", { className: "p-5 border-t border-white/5 bg-white/[0.02] flex items-center justify-center gap-2" }, /* @__PURE__ */ React2.createElement("span", { className: "h-1 w-1 rounded-full bg-slate-700" }), /* @__PURE__ */ React2.createElement("p", { className: "text-[9px] text-slate-600 uppercase font-bold tracking-[0.2em]" }, "X-View Environment"), /* @__PURE__ */ React2.createElement("span", { className: "h-1 w-1 rounded-full bg-slate-700" }))
4237
+ );
4238
+ };
4239
+ return /* @__PURE__ */ React2.createElement(
4240
+ "div",
4241
+ {
4242
+ ref: containerRef,
4243
+ className: "ui-overlay fixed left-0 top-0 h-[100dvh] flex items-stretch z-40 pointer-events-none",
4244
+ onPointerDown: swallow,
4245
+ onPointerMove: swallow,
4246
+ onPointerUp: swallow,
4247
+ onClick: swallow,
4248
+ onWheel: swallow,
4249
+ onContextMenu: swallow,
4250
+ onDoubleClick: swallow
4251
+ },
4252
+ /* @__PURE__ */ React2.createElement(
4248
4253
  "div",
4249
4254
  {
4250
- className: "absolute left-2 w-3 h-3 rounded-full border border-white/20 shadow-sm",
4251
- style: { backgroundColor: /^#[0-9A-F]{6}$/i.test(filterValue) ? filterValue : "transparent" }
4252
- }
4253
- ), /* @__PURE__ */ React2.createElement(
4254
- "input",
4255
- {
4256
- type: "text",
4257
- value: filterValue,
4258
- onChange: (e) => setFilterValue(e.target.value),
4259
- placeholder: "#RRGGBB",
4260
- className: "w-full bg-slate-800 pl-7 pr-2 py-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white font-mono",
4261
- autoFocus: true
4262
- }
4263
- ))), /* @__PURE__ */ React2.createElement(
4264
- "button",
4265
- {
4266
- onClick: handleAddFilter,
4267
- disabled: !filterValue.trim(),
4268
- className: "w-full py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed text-white text-xs font-medium rounded transition-colors"
4269
- },
4270
- "Aplicar Filtro"
4271
- ))), selectedNodeId && isNodeInView(selectedNodeId) && /* @__PURE__ */ React2.createElement("span", { className: "text-xs text-emerald-400 absolute bottom-[-18px] left-0" }, "J\xE1 vis\xEDvel")), viewType === "view" && ability.can("import", "File") && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
4272
- "button",
4273
- {
4274
- onClick: onOpenImportModal,
4275
- className: `${buttonBaseClass} mt-2`
4276
- },
4277
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), /* @__PURE__ */ React2.createElement("polyline", { points: "17 8 12 3 7 8" }), /* @__PURE__ */ React2.createElement("line", { x1: "12", y1: "3", x2: "12", y2: "15" })),
4278
- "Importar arquivo"
4279
- ), /* @__PURE__ */ React2.createElement("p", { className: "mt-1.5 text-xs text-slate-400 text-center px-1 leading-tight" }, "Importar datasets ou ancestralidades das views."), /* @__PURE__ */ React2.createElement("div", { className: "h-9 mt-1 flex items-center justify-center" }, importSuccessMessage && /* @__PURE__ */ React2.createElement("p", { className: "w-full text-center text-xs font-medium text-indigo-300 bg-indigo-500/10 border border-indigo-500/20 rounded-md py-1.5 px-2" }, importSuccessMessage)))), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Lentes"), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: questLensRef }, /* @__PURE__ */ React2.createElement(
4280
- "button",
4281
- {
4282
- onClick: () => setIsQuestLensMenuOpen(!isQuestLensMenuOpen),
4283
- className: `${buttonBaseClass} ${isQuestLensMenuOpen || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`,
4284
- title: "Abrir filtros da Lente de Quests"
4255
+ className: `h-full w-[300px] flex-shrink-0 flex flex-col overflow-hidden bg-slate-950/80 backdrop-blur-2xl border-r border-white/10 shadow-[20px_0_40px_rgba(0,0,0,0.4)] pointer-events-auto transition-transform duration-500 ease-in-out absolute md:relative z-20 md:z-auto
4256
+ ${activeSubMenu ? "-translate-x-full md:translate-x-0" : "translate-x-0"}`
4285
4257
  },
4286
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), /* @__PURE__ */ React2.createElement("path", { d: "M9 12l2 2 4-4" })),
4287
- "Quest Lens",
4288
- (questFilterAssignee || questFilterStatus || questFilterMilestone) && /* @__PURE__ */ React2.createElement("span", { className: "ml-1 px-1.5 py-0.5 rounded-full bg-indigo-500 text-[9px] font-bold" }, "!")
4289
- ), isQuestLensMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute left-0 bottom-full mb-2 w-full p-4 rounded-xl bg-slate-900 border border-white/10 shadow-2xl z-50 flex flex-col gap-4 animate-in fade-in slide-in-from-bottom-2 duration-200" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Respons\xE1vel"), /* @__PURE__ */ React2.createElement(
4290
- "select",
4291
- {
4292
- value: questFilterAssignee,
4293
- onChange: (e) => setQuestFilterAssignee(e.target.value),
4294
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
4295
- },
4296
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Respons\xE1veis"),
4297
- viewMembers.map((m) => /* @__PURE__ */ React2.createElement("option", { key: m.id, value: m.id }, m.name || m.email))
4298
- )), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Status"), /* @__PURE__ */ React2.createElement(
4299
- "select",
4300
- {
4301
- value: questFilterStatus,
4302
- onChange: (e) => setQuestFilterStatus(e.target.value),
4303
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
4304
- },
4305
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos (Exclui Done)"),
4306
- /* @__PURE__ */ React2.createElement("option", { value: "Backlog" }, "Backlog"),
4307
- /* @__PURE__ */ React2.createElement("option", { value: "In Progress" }, "In Progress"),
4308
- /* @__PURE__ */ React2.createElement("option", { value: "Review" }, "Review"),
4309
- /* @__PURE__ */ React2.createElement("option", { value: "Done" }, "Done")
4310
- )), /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Milestone"), /* @__PURE__ */ React2.createElement(
4311
- "select",
4312
- {
4313
- value: questFilterMilestone,
4314
- onChange: (e) => setQuestFilterMilestone(e.target.value),
4315
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
4316
- },
4317
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Milestones"),
4318
- milestones.map((ms) => /* @__PURE__ */ React2.createElement("option", { key: ms.id, value: ms.id }, ms.name, " ", ms.status === "inactive" ? "(Inativo)" : ""))
4319
- )), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-2 pt-1" }, /* @__PURE__ */ React2.createElement(
4320
- "button",
4321
- {
4322
- onClick: () => {
4323
- setQuestFilterAssignee("");
4324
- setQuestFilterStatus("");
4325
- setQuestFilterMilestone("");
4326
- },
4327
- className: "flex-1 py-2 bg-white/5 hover:bg-white/10 text-slate-300 text-[11px] font-medium rounded-lg transition-colors border border-white/5"
4328
- },
4329
- "Limpar"
4330
- ), /* @__PURE__ */ React2.createElement(
4331
- "button",
4332
- {
4333
- onClick: () => {
4334
- onActivateQuestLens({
4335
- assigneeId: questFilterAssignee,
4336
- status: questFilterStatus,
4337
- milestoneId: questFilterMilestone
4338
- });
4339
- setIsQuestLensMenuOpen(false);
4340
- onToggle(false);
4258
+ /* @__PURE__ */ React2.createElement("div", { className: "relative px-5 py-5 border-b border-white/5 flex items-center gap-3 bg-white/[0.02]" }, /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-500 shadow-[0_0_12px_rgba(99,102,241,0.8)]" }), /* @__PURE__ */ React2.createElement("span", { className: "absolute inset-0 h-2.5 w-2.5 rounded-full bg-indigo-400 animate-ping opacity-40" })), /* @__PURE__ */ React2.createElement("h3", { className: "text-xs font-black text-slate-200 uppercase tracking-[0.2em]" }, "Ferramentas"), /* @__PURE__ */ React2.createElement(
4259
+ "button",
4260
+ {
4261
+ className: "ml-auto p-2 rounded-full text-slate-500 hover:text-white hover:bg-white/10 transition-all duration-200",
4262
+ onClick: () => onToggle(false),
4263
+ title: "Fechar Painel"
4341
4264
  },
4342
- className: "flex-[2] py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-[11px] font-bold rounded-lg shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95"
4343
- },
4344
- "Aplicar Lente"
4345
- )))), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: reshapeLensRef }, /* @__PURE__ */ React2.createElement(
4346
- "button",
4347
- {
4348
- onClick: () => setIsReshapeLensMenuOpen(!isReshapeLensMenuOpen),
4349
- className: `${buttonBaseClass} ${isReshapeLensMenuOpen ? "bg-indigo-500/30 border-indigo-400" : ""}`,
4350
- title: "Abrir op\xE7\xF5es de Reshape"
4351
- },
4352
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "12 2 2 7 12 12 22 7 12 2" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 17 12 22 22 17" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 12 12 17 22 12" })),
4353
- "Reshape Lens"
4354
- ), isReshapeLensMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute left-0 bottom-full mb-2 w-full p-4 rounded-xl bg-slate-900 border border-white/10 shadow-2xl z-50 flex flex-col gap-4 animate-in fade-in slide-in-from-bottom-2 duration-200" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Layout Type"), /* @__PURE__ */ React2.createElement(
4355
- "select",
4356
- {
4357
- value: reshapeLayoutType,
4358
- onChange: (e) => setReshapeLayoutType(e.target.value),
4359
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
4360
- },
4361
- /* @__PURE__ */ React2.createElement("option", { value: "Star" }, "Star"),
4362
- /* @__PURE__ */ React2.createElement("option", { value: "Circle" }, "Circle"),
4363
- /* @__PURE__ */ React2.createElement("option", { value: "Column" }, "Column")
4364
- )), reshapeLayoutType === "Column" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "Colunas"), /* @__PURE__ */ React2.createElement(
4365
- "input",
4366
- {
4367
- type: "number",
4368
- min: "1",
4369
- max: "12",
4370
- value: reshapeColumnCount,
4371
- onChange: (e) => setReshapeColumnCount(parseInt(e.target.value) || 4),
4372
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white"
4373
- }
4374
- )), reshapeLayoutType === "Star" && /* @__PURE__ */ React2.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-bold tracking-widest" }, "N\xF3 Central"), /* @__PURE__ */ React2.createElement(
4375
- "select",
4376
- {
4377
- value: reshapeCenterNodeId,
4378
- onChange: (e) => setReshapeCenterNodeId(e.target.value),
4379
- className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white appearance-none cursor-pointer"
4380
- },
4381
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Selecione..."),
4382
- (Array.isArray(dbNodes) ? dbNodes.filter((n) => isNodeInView(n.id)) : []).map((n) => /* @__PURE__ */ React2.createElement("option", { key: n.id, value: n.id }, n.name))
4383
- )), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-2 pt-1" }, /* @__PURE__ */ React2.createElement(
4384
- "button",
4385
- {
4386
- onClick: () => {
4387
- setReshapeLayoutType("Star");
4388
- setReshapeColumnCount(4);
4389
- setReshapeCenterNodeId("");
4265
+ /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React2.createElement(
4266
+ "path",
4267
+ {
4268
+ fillRule: "evenodd",
4269
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
4270
+ clipRule: "evenodd"
4271
+ }
4272
+ ))
4273
+ ), /* @__PURE__ */ React2.createElement("div", { className: "absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-transparent via-indigo-500/20 to-transparent" })),
4274
+ /* @__PURE__ */ React2.createElement("div", { className: "flex-1 overflow-y-auto px-5 py-6 space-y-8 custom-scrollbar relative" }, /* @__PURE__ */ React2.createElement("section", null, /* @__PURE__ */ React2.createElement("div", { className: "mb-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Pesquisar Node")), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement("div", { className: "w-full bg-slate-800/70 p-1.5 flex flex-wrap items-center gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all cursor-text min-h-[42px]", onClick: () => {
4275
+ var _a;
4276
+ return (_a = inputRef.current) == null ? void 0 : _a.focus();
4277
+ } }, activeFilters.map((filter, idx) => /* @__PURE__ */ React2.createElement("span", { key: idx, className: "flex items-center gap-1.5 bg-indigo-500/20 text-indigo-200 border border-indigo-500/30 px-2 py-0.5 rounded text-xs font-medium max-w-full" }, filter.type === "Color" && /* @__PURE__ */ React2.createElement("span", { className: "inline-block w-2.5 h-2.5 rounded-full border border-white/20", style: { backgroundColor: filter.value } }), /* @__PURE__ */ React2.createElement("span", { className: "truncate max-w-[120px]" }, filter.type, ": ", filter.value), /* @__PURE__ */ React2.createElement("button", { type: "button", onClick: (e) => {
4278
+ e.stopPropagation();
4279
+ handleRemoveFilter(idx);
4280
+ }, className: "hover:text-white transition-colors" }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ React2.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))), /* @__PURE__ */ React2.createElement("input", { ref: inputRef, type: "text", value: query, onChange: (e) => setQuery(e.target.value), onFocus: () => setShowList(true), onBlur: () => setTimeout(() => setShowList(false), 120), onKeyDown: handleKeyDown, placeholder: activeFilters.length === 0 ? "Digite parte do nome..." : "", className: "bg-transparent border-none outline-none flex-1 min-w-[80px] text-sm text-slate-100 placeholder-slate-500", autoComplete: "off" })), showList && /* @__PURE__ */ React2.createElement("ul", { className: "custom-scrollbar absolute mt-1 z-10 w-full max-h-[min(448px,50dvh)] overflow-y-auto rounded-lg bg-slate-900/95 border border-white/10 shadow-xl" }, filteredAndSorted.length > 0 ? filteredAndSorted.map((n) => /* @__PURE__ */ React2.createElement("li", { key: n.id, onMouseDown: () => handlePick(n), className: `px-3 py-2 text-sm flex items-center gap-2 cursor-pointer ${selectedNodeId === n.id ? "bg-indigo-600/60 text-white" : "text-slate-200 hover:bg-indigo-500/30"}`, title: n.name }, /* @__PURE__ */ React2.createElement("span", { className: `inline-block h-2 w-2 rounded-full flex-shrink-0 ${isNodeInView(n.id) ? "bg-emerald-400" : "bg-slate-500"}` }), /* @__PURE__ */ React2.createElement("span", { className: "truncate flex-1" }, n.name))) : /* @__PURE__ */ React2.createElement("li", { className: "px-3 py-2 text-sm text-slate-400" }, "Nenhum resultado"))), /* @__PURE__ */ React2.createElement("div", { className: "mt-3 flex items-center gap-2" }, /* @__PURE__ */ React2.createElement("button", { onClick: handleConfirm, disabled: !selectedNodeId, className: `flex-1 ${selectedNodeId ? buttonBaseClass : buttonDisabledClass}` }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "5 3 19 12 5 21 5 3" })), "Renderizar"), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: filterMenuRef }, /* @__PURE__ */ React2.createElement("button", { onClick: () => setIsFilterMenuOpen(!isFilterMenuOpen), className: `px-3 py-2 rounded-md text-sm font-medium border transition-colors flex items-center gap-2 ${isFilterMenuOpen || activeFilters.length > 0 ? "bg-indigo-500/30 text-indigo-200 border-indigo-500/40" : "bg-indigo-500/10 text-indigo-200 border-indigo-500/30 hover:bg-indigo-500/20"}` }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })), "Filters"), isFilterMenuOpen && /* @__PURE__ */ React2.createElement("div", { className: "absolute right-0 top-full mt-2 w-56 p-3 rounded-lg bg-slate-900 border border-white/10 shadow-xl z-50 flex flex-col gap-3 animate-in fade-in zoom-in-95 duration-100" }, /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Filtro"), /* @__PURE__ */ React2.createElement("div", { className: "flex bg-slate-800/50 p-1 rounded-md" }, ["Type", "Color", "Dataset"].map((opt) => /* @__PURE__ */ React2.createElement("button", { key: opt, onClick: () => {
4281
+ setFilterCategory(opt);
4282
+ setFilterValue("");
4283
+ }, className: `flex-1 text-xs py-1 rounded transition-colors ${filterCategory === opt ? "bg-indigo-600 text-white" : "text-slate-400 hover:text-slate-200"}` }, opt)))), /* @__PURE__ */ React2.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React2.createElement("label", { className: "text-[10px] uppercase text-slate-400 font-semibold tracking-wider" }, "Valor"), /* @__PURE__ */ React2.createElement("input", { type: "text", value: filterValue, onChange: (e) => setFilterValue(e.target.value), className: "w-full bg-slate-800 p-2 text-xs rounded border border-white/10 focus:outline-none focus:border-indigo-500/50 text-white" })), /* @__PURE__ */ React2.createElement("button", { onClick: handleAddFilter, disabled: !filterValue.trim(), className: "w-full py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs font-medium rounded transition-colors" }, "Aplicar Filtro"))))), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Lentes"), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement(
4284
+ "button",
4285
+ {
4286
+ onClick: () => setActiveSubMenu(activeSubMenu === "quest" ? null : "quest"),
4287
+ className: `${buttonBaseClass} lens-button ${activeSubMenu === "quest" || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`
4390
4288
  },
4391
- className: "flex-1 py-2 bg-white/5 hover:bg-white/10 text-slate-300 text-[11px] font-medium rounded-lg transition-colors border border-white/5"
4392
- },
4393
- "Resetar"
4394
- ), /* @__PURE__ */ React2.createElement(
4395
- "button",
4396
- {
4397
- onClick: () => {
4398
- onActivateReshapeLens({
4399
- type: reshapeLayoutType,
4400
- columns: reshapeColumnCount,
4401
- centerNodeId: reshapeCenterNodeId
4402
- });
4403
- setIsReshapeLensMenuOpen(false);
4404
- onToggle(false);
4289
+ /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), /* @__PURE__ */ React2.createElement("path", { d: "M9 12l2 2 4-4" })),
4290
+ "Quest Lens"
4291
+ )), /* @__PURE__ */ React2.createElement("div", { className: "relative" }, /* @__PURE__ */ React2.createElement(
4292
+ "button",
4293
+ {
4294
+ onClick: () => setActiveSubMenu(activeSubMenu === "reshape" ? null : "reshape"),
4295
+ className: `${buttonBaseClass} lens-button ${activeSubMenu === "reshape" ? "bg-indigo-500/30 border-indigo-400" : ""}`
4405
4296
  },
4406
- disabled: reshapeLayoutType === "Star" && !reshapeCenterNodeId,
4407
- className: "flex-[2] py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-[11px] font-bold rounded-lg shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed"
4408
- },
4409
- "Aplicar Lente"
4410
- )))), /* @__PURE__ */ React2.createElement(
4411
- "button",
4412
- {
4413
- onClick: onActivateTimeline,
4414
- className: buttonBaseClass,
4415
- title: "Ativar a visualiza\xE7\xE3o de Timeline"
4416
- },
4417
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 6 12 12 16 14" })),
4418
- "Timeline"
4419
- ), /* @__PURE__ */ React2.createElement(
4420
- "button",
4421
- {
4422
- onClick: onOpenBoards,
4423
- className: buttonBaseClass,
4424
- title: "Abrir painel de Boards"
4425
- },
4426
- /* @__PURE__ */ React2.createElement(FiLayers, { size: 16 }),
4427
- "Boards"
4428
- )), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Milestones"), /* @__PURE__ */ React2.createElement(
4429
- "button",
4430
- {
4431
- onClick: onOpenMilestoneManager,
4432
- className: buttonBaseClass,
4433
- title: "Gerenciar os milestones deste cen\xE1rio"
4434
- },
4435
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "6" }), /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "2" })),
4436
- "Gerenciar Milestones"
4437
- ))), /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/30" }, /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Navega\xE7\xE3o")), ability.can("update", "Scene") && /* @__PURE__ */ React2.createElement(
4438
- "button",
4439
- {
4440
- onClick: handleSaveClick,
4441
- disabled: isSaving,
4442
- className: isSaving ? buttonDisabledClass : buttonBaseClass,
4443
- title: "Salvar a visualiza\xE7\xE3o atual como o cen\xE1rio inicial"
4444
- },
4445
- isSaving ? /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("svg", { className: "animate-spin h-4 w-4 text-slate-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React2.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React2.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })), "Salvando...") : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }), /* @__PURE__ */ React2.createElement("polyline", { points: "17 21 17 13 7 13 7 21" }), /* @__PURE__ */ React2.createElement("polyline", { points: "7 3 7 8 15 8" })), "Atualizar cen\xE1rio inicial")
4446
- ), /* @__PURE__ */ React2.createElement(
4447
- "button",
4448
- {
4449
- onClick: onNavigateBack,
4450
- className: buttonBaseClass,
4451
- title: "Voltar \xE0 p\xE1gina de cen\xE1rios"
4452
- },
4453
- /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 19 5 12 12 5" })),
4454
- "Voltar \xE0 p\xE1gina de cen\xE1rios"
4455
- ))), contextLabel && /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/50" }, /* @__PURE__ */ React2.createElement("div", { className: "flex items-center gap-2", title: contextLabel }, /* @__PURE__ */ React2.createElement("span", { className: "text-sm font-medium text-slate-200 truncate" }, contextLabel))), /* @__PURE__ */ React2.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }))
4297
+ /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("polygon", { points: "12 2 2 7 12 12 22 7 12 2" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 17 12 22 22 17" }), /* @__PURE__ */ React2.createElement("polyline", { points: "2 12 12 17 22 12" })),
4298
+ "Reshape Lens"
4299
+ )), /* @__PURE__ */ React2.createElement("button", { onClick: onActivateTimeline, className: buttonBaseClass }, /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React2.createElement("polyline", { points: "12 6 12 12 16 14" })), "Timeline"), /* @__PURE__ */ React2.createElement("button", { onClick: onOpenBoards, className: buttonBaseClass }, /* @__PURE__ */ React2.createElement(FiLayers, { size: 16 }), "Boards")), /* @__PURE__ */ React2.createElement("div", { className: "h-px bg-white/10" }), /* @__PURE__ */ React2.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Milestones"), /* @__PURE__ */ React2.createElement("button", { onClick: onOpenMilestoneManager, className: buttonBaseClass }, "Gerenciar Milestones"))),
4300
+ /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/30" }, /* @__PURE__ */ React2.createElement("section", { className: "space-y-2" }, /* @__PURE__ */ React2.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Navega\xE7\xE3o"), ability.can("update", "Scene") && /* @__PURE__ */ React2.createElement("button", { onClick: handleSaveClick, disabled: isSaving, className: isSaving ? buttonDisabledClass : buttonBaseClass }, isSaving ? "Salvando..." : "Atualizar cen\xE1rio inicial"), /* @__PURE__ */ React2.createElement("button", { onClick: onNavigateBack, className: buttonBaseClass }, "Voltar \xE0 p\xE1gina de cen\xE1rios"))),
4301
+ contextLabel && /* @__PURE__ */ React2.createElement("div", { className: "px-4 py-3 border-t border-white/10 bg-slate-900/50 truncate text-sm font-medium text-slate-200" }, contextLabel),
4302
+ /* @__PURE__ */ React2.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" })
4303
+ ),
4304
+ /* @__PURE__ */ React2.createElement("div", { className: `h-full pointer-events-auto transition-all duration-500 ease-out absolute md:relative left-0 top-0 z-30 md:z-10 flex-shrink-0 overflow-hidden
4305
+ ${activeSubMenu ? "translate-x-0 md:translate-x-0 w-[100vw] md:w-[280px] opacity-100" : "-translate-x-full md:translate-x-0 w-[100vw] md:w-0 opacity-0 md:opacity-100"}
4306
+ ` }, renderAnnexedPanel())
4456
4307
  );
4457
4308
  }
4458
4309