@lv-x-software-house/x_view 1.2.6-dev.50 → 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 +324 -276
  2. package/dist/index.mjs +324 -276
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -3857,6 +3857,8 @@ function XViewSidebar({
3857
3857
  },
3858
3858
  milestones = [],
3859
3859
  onOpenMilestoneManager = () => {
3860
+ },
3861
+ onActivateReshapeLens = () => {
3860
3862
  }
3861
3863
  }) {
3862
3864
  const [query, setQuery] = useState3("");
@@ -3867,17 +3869,21 @@ function XViewSidebar({
3867
3869
  const [isFilterMenuOpen, setIsFilterMenuOpen] = useState3(false);
3868
3870
  const [filterCategory, setFilterCategory] = useState3("Type");
3869
3871
  const [filterValue, setFilterValue] = useState3("");
3872
+ const [activeSubMenu, setActiveSubMenu] = useState3(null);
3870
3873
  const [questFilterAssignee, setQuestFilterAssignee] = useState3("");
3871
3874
  const [questFilterStatus, setQuestFilterStatus] = useState3("");
3872
- const [isQuestLensMenuOpen, setIsQuestLensMenuOpen] = useState3(false);
3873
3875
  const [questFilterMilestone, setQuestFilterMilestone] = useState3("");
3876
+ const [isQuestLensLoading, setIsQuestLensLoading] = useState3(false);
3877
+ const [reshapeLayoutType, setReshapeLayoutType] = useState3("Star");
3878
+ const [reshapeColumnCount, setReshapeColumnCount] = useState3(4);
3879
+ const [reshapeCenterNodeId, setReshapeCenterNodeId] = useState3("");
3874
3880
  const [isTypeDropdownOpen, setIsTypeDropdownOpen] = useState3(false);
3875
3881
  const [highlightedTypeIndex, setHighlightedTypeIndex] = useState3(-1);
3876
3882
  const containerRef = useRef2(null);
3877
3883
  const inputRef = useRef2(null);
3878
3884
  const filterMenuRef = useRef2(null);
3879
3885
  const typeDropdownRef = useRef2(null);
3880
- const questLensRef = useRef2(null);
3886
+ const annexedPanelRef = useRef2(null);
3881
3887
  const ability = useMemo2(() => {
3882
3888
  return defineAbilityFor(userRole);
3883
3889
  }, [userRole]);
@@ -3983,16 +3989,17 @@ function XViewSidebar({
3983
3989
  return () => document.removeEventListener("mousedown", handleClickOutside);
3984
3990
  }, [isFilterMenuOpen, isTypeDropdownOpen]);
3985
3991
  useEffect2(() => {
3986
- const handleClickOutsideQuest = (event) => {
3987
- if (questLensRef.current && !questLensRef.current.contains(event.target)) {
3988
- setIsQuestLensMenuOpen(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);
3989
3996
  }
3990
3997
  };
3991
- if (isQuestLensMenuOpen) {
3992
- document.addEventListener("mousedown", handleClickOutsideQuest);
3998
+ if (activeSubMenu) {
3999
+ document.addEventListener("mousedown", handleClickOutsideAnnexed);
3993
4000
  }
3994
- return () => document.removeEventListener("mousedown", handleClickOutsideQuest);
3995
- }, [isQuestLensMenuOpen]);
4001
+ return () => document.removeEventListener("mousedown", handleClickOutsideAnnexed);
4002
+ }, [activeSubMenu]);
3996
4003
  useEffect2(() => {
3997
4004
  if (!query) setSelectedNodeId(null);
3998
4005
  }, [query]);
@@ -4090,11 +4097,150 @@ function XViewSidebar({
4090
4097
  if (!isOpen) return ToggleButton;
4091
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";
4092
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";
4100
+ const renderAnnexedPanel = () => {
4101
+ if (!activeSubMenu) return null;
4102
+ return /* @__PURE__ */ React2.createElement(
4103
+ "div",
4104
+ {
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"
4107
+ },
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",
4110
+ {
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(
4117
+ "button",
4118
+ {
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("");
4162
+ },
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"
4164
+ },
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(
4191
+ "input",
4192
+ {
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"
4199
+ }
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",
4202
+ {
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"
4206
+ },
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"
4218
+ },
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"
4233
+ },
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
+ };
4093
4239
  return /* @__PURE__ */ React2.createElement(
4094
4240
  "div",
4095
4241
  {
4096
4242
  ref: containerRef,
4097
- className: "ui-overlay fixed left-0 top-0 h-[100dvh] w-[min(92vw,320px)] z-40 overflow-hidden",
4243
+ className: "ui-overlay fixed left-0 top-0 h-[100dvh] flex items-stretch z-40 pointer-events-none",
4098
4244
  onPointerDown: swallow,
4099
4245
  onPointerMove: swallow,
4100
4246
  onPointerUp: swallow,
@@ -4103,281 +4249,61 @@ function XViewSidebar({
4103
4249
  onContextMenu: swallow,
4104
4250
  onDoubleClick: swallow
4105
4251
  },
4106
- /* @__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(
4107
- "button",
4108
- {
4109
- className: "ml-auto p-2 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
4110
- onClick: () => onToggle(false),
4111
- title: "Fechar"
4112
- },
4113
- /* @__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(
4114
- "path",
4115
- {
4116
- fillRule: "evenodd",
4117
- 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",
4118
- clipRule: "evenodd"
4119
- }
4120
- ))
4121
- )), /* @__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(
4252
+ /* @__PURE__ */ React2.createElement(
4122
4253
  "div",
4123
4254
  {
4124
- 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]",
4125
- onClick: () => {
4126
- var _a;
4127
- return (_a = inputRef.current) == null ? void 0 : _a.focus();
4128
- }
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"}`
4129
4257
  },
4130
- 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(
4131
- "span",
4132
- {
4133
- className: "inline-block w-2.5 h-2.5 rounded-full border border-white/20",
4134
- style: { backgroundColor: filter.value }
4135
- }
4136
- ), /* @__PURE__ */ React2.createElement("span", { className: "truncate max-w-[120px]" }, filter.type, ": ", filter.value), /* @__PURE__ */ React2.createElement(
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(
4137
4259
  "button",
4138
4260
  {
4139
- type: "button",
4140
- onClick: (e) => {
4141
- e.stopPropagation();
4142
- handleRemoveFilter(idx);
4143
- },
4144
- className: "hover:text-white transition-colors"
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"
4145
4264
  },
4146
- /* @__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" }))
4147
- ))),
4148
- /* @__PURE__ */ React2.createElement(
4149
- "input",
4150
- {
4151
- ref: inputRef,
4152
- type: "text",
4153
- value: query,
4154
- onChange: (e) => setQuery(e.target.value),
4155
- onFocus: () => setShowList(true),
4156
- onBlur: () => setTimeout(() => setShowList(false), 120),
4157
- onKeyDown: handleKeyDown,
4158
- placeholder: activeFilters.length === 0 ? "Digite parte do nome..." : "",
4159
- className: "bg-transparent border-none outline-none flex-1 min-w-[80px] text-sm text-slate-100 placeholder-slate-500",
4160
- autoComplete: "off"
4161
- }
4162
- )
4163
- ), 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) => {
4164
- const inView = isNodeInView(n.id);
4165
- const active = selectedNodeId === n.id;
4166
- const typeLabel = Array.isArray(n.type) ? n.type.join(", ") : n.type;
4167
- return /* @__PURE__ */ React2.createElement(
4168
- "li",
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",
4169
4285
  {
4170
- key: n.id,
4171
- onMouseDown: () => handlePick(n),
4172
- 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"}`,
4173
- title: n.name
4174
- },
4175
- /* @__PURE__ */ React2.createElement("span", { className: `inline-block h-2 w-2 rounded-full flex-shrink-0 ${inView ? "bg-emerald-400" : "bg-slate-500"}` }),
4176
- /* @__PURE__ */ React2.createElement("span", { className: "truncate flex-1" }, n.name),
4177
- 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)
4178
- );
4179
- }) : /* @__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(
4180
- "button",
4181
- {
4182
- onClick: handleConfirm,
4183
- disabled: !selectedNodeId,
4184
- className: `flex-1 ${selectedNodeId ? buttonBaseClass : buttonDisabledClass}`
4185
- },
4186
- /* @__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" })),
4187
- "Renderizar"
4188
- ), /* @__PURE__ */ React2.createElement("div", { className: "relative", ref: filterMenuRef }, /* @__PURE__ */ React2.createElement(
4189
- "button",
4190
- {
4191
- onClick: () => setIsFilterMenuOpen(!isFilterMenuOpen),
4192
- 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"}`,
4193
- title: "Adicionar filtros"
4194
- },
4195
- /* @__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" })),
4196
- "Filters"
4197
- ), 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(
4198
- "button",
4199
- {
4200
- key: opt,
4201
- onClick: () => {
4202
- setFilterCategory(opt);
4203
- setFilterValue("");
4204
- },
4205
- 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"}`
4206
- },
4207
- opt
4208
- )))), /* @__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(
4209
- "input",
4210
- {
4211
- type: "text",
4212
- value: filterValue,
4213
- onChange: (e) => {
4214
- setFilterValue(e.target.value);
4215
- if (!isTypeDropdownOpen) setIsTypeDropdownOpen(true);
4216
- setHighlightedTypeIndex(-1);
4217
- },
4218
- onFocus: () => setIsTypeDropdownOpen(true),
4219
- onKeyDown: handleTypeKeyDown,
4220
- placeholder: filterCategory === "Type" ? "Ex: Concept" : "Ex: Dataset 1",
4221
- 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",
4222
- autoFocus: true
4223
- }
4224
- ), 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(
4225
- "div",
4226
- {
4227
- key: t,
4228
- 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"}`,
4229
- onMouseDown: (e) => {
4230
- e.preventDefault();
4231
- setFilterValue(t);
4232
- setIsTypeDropdownOpen(false);
4233
- setHighlightedTypeIndex(-1);
4234
- }
4235
- },
4236
- t
4237
- )))) : /* @__PURE__ */ React2.createElement("div", { className: "relative flex items-center" }, /* @__PURE__ */ React2.createElement(
4238
- "div",
4239
- {
4240
- className: "absolute left-2 w-3 h-3 rounded-full border border-white/20 shadow-sm",
4241
- style: { backgroundColor: /^#[0-9A-F]{6}$/i.test(filterValue) ? filterValue : "transparent" }
4242
- }
4243
- ), /* @__PURE__ */ React2.createElement(
4244
- "input",
4245
- {
4246
- type: "text",
4247
- value: filterValue,
4248
- onChange: (e) => setFilterValue(e.target.value),
4249
- placeholder: "#RRGGBB",
4250
- 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",
4251
- autoFocus: true
4252
- }
4253
- ))), /* @__PURE__ */ React2.createElement(
4254
- "button",
4255
- {
4256
- onClick: handleAddFilter,
4257
- disabled: !filterValue.trim(),
4258
- 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"
4259
- },
4260
- "Aplicar Filtro"
4261
- ))), 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(
4262
- "button",
4263
- {
4264
- onClick: onOpenImportModal,
4265
- className: `${buttonBaseClass} mt-2`
4266
- },
4267
- /* @__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" })),
4268
- "Importar arquivo"
4269
- ), /* @__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(
4270
- "button",
4271
- {
4272
- onClick: () => setIsQuestLensMenuOpen(!isQuestLensMenuOpen),
4273
- className: `${buttonBaseClass} ${isQuestLensMenuOpen || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`,
4274
- title: "Abrir filtros da Lente de Quests"
4275
- },
4276
- /* @__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" })),
4277
- "Quest Lens",
4278
- (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" }, "!")
4279
- ), 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(
4280
- "select",
4281
- {
4282
- value: questFilterAssignee,
4283
- onChange: (e) => setQuestFilterAssignee(e.target.value),
4284
- 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"
4285
- },
4286
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Respons\xE1veis"),
4287
- viewMembers.map((m) => /* @__PURE__ */ React2.createElement("option", { key: m.id, value: m.id }, m.name || m.email))
4288
- )), /* @__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(
4289
- "select",
4290
- {
4291
- value: questFilterStatus,
4292
- onChange: (e) => setQuestFilterStatus(e.target.value),
4293
- 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"
4294
- },
4295
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos (Exclui Done)"),
4296
- /* @__PURE__ */ React2.createElement("option", { value: "Backlog" }, "Backlog"),
4297
- /* @__PURE__ */ React2.createElement("option", { value: "In Progress" }, "In Progress"),
4298
- /* @__PURE__ */ React2.createElement("option", { value: "Review" }, "Review"),
4299
- /* @__PURE__ */ React2.createElement("option", { value: "Done" }, "Done")
4300
- )), /* @__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(
4301
- "select",
4302
- {
4303
- value: questFilterMilestone,
4304
- onChange: (e) => setQuestFilterMilestone(e.target.value),
4305
- 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"
4306
- },
4307
- /* @__PURE__ */ React2.createElement("option", { value: "" }, "Todos os Milestones"),
4308
- milestones.map((ms) => /* @__PURE__ */ React2.createElement("option", { key: ms.id, value: ms.id }, ms.name, " ", ms.status === "inactive" ? "(Inativo)" : ""))
4309
- )), /* @__PURE__ */ React2.createElement("div", { className: "flex gap-2 pt-1" }, /* @__PURE__ */ React2.createElement(
4310
- "button",
4311
- {
4312
- onClick: () => {
4313
- setQuestFilterAssignee("");
4314
- setQuestFilterStatus("");
4315
- setQuestFilterMilestone("");
4286
+ onClick: () => setActiveSubMenu(activeSubMenu === "quest" ? null : "quest"),
4287
+ className: `${buttonBaseClass} lens-button ${activeSubMenu === "quest" || questFilterAssignee || questFilterStatus || questFilterMilestone ? "bg-indigo-500/30 border-indigo-400" : ""}`
4316
4288
  },
4317
- 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"
4318
- },
4319
- "Limpar"
4320
- ), /* @__PURE__ */ React2.createElement(
4321
- "button",
4322
- {
4323
- onClick: () => {
4324
- onActivateQuestLens({
4325
- assigneeId: questFilterAssignee,
4326
- status: questFilterStatus,
4327
- milestoneId: questFilterMilestone
4328
- });
4329
- setIsQuestLensMenuOpen(false);
4330
- 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" : ""}`
4331
4296
  },
4332
- 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"
4333
- },
4334
- "Aplicar Lente"
4335
- )))), /* @__PURE__ */ React2.createElement(
4336
- "button",
4337
- {
4338
- onClick: onActivateTimeline,
4339
- className: buttonBaseClass,
4340
- title: "Ativar a visualiza\xE7\xE3o de Timeline"
4341
- },
4342
- /* @__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" })),
4343
- "Timeline"
4344
- ), /* @__PURE__ */ React2.createElement(
4345
- "button",
4346
- {
4347
- onClick: onOpenBoards,
4348
- className: buttonBaseClass,
4349
- title: "Abrir painel de Boards"
4350
- },
4351
- /* @__PURE__ */ React2.createElement(FiLayers, { size: 16 }),
4352
- "Boards"
4353
- )), /* @__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(
4354
- "button",
4355
- {
4356
- onClick: onOpenMilestoneManager,
4357
- className: buttonBaseClass,
4358
- title: "Gerenciar os milestones deste cen\xE1rio"
4359
- },
4360
- /* @__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" })),
4361
- "Gerenciar Milestones"
4362
- ))), /* @__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(
4363
- "button",
4364
- {
4365
- onClick: handleSaveClick,
4366
- disabled: isSaving,
4367
- className: isSaving ? buttonDisabledClass : buttonBaseClass,
4368
- title: "Salvar a visualiza\xE7\xE3o atual como o cen\xE1rio inicial"
4369
- },
4370
- 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")
4371
- ), /* @__PURE__ */ React2.createElement(
4372
- "button",
4373
- {
4374
- onClick: onNavigateBack,
4375
- className: buttonBaseClass,
4376
- title: "Voltar \xE0 p\xE1gina de cen\xE1rios"
4377
- },
4378
- /* @__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" })),
4379
- "Voltar \xE0 p\xE1gina de cen\xE1rios"
4380
- ))), 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())
4381
4307
  );
4382
4308
  }
4383
4309
 
@@ -15188,6 +15114,127 @@ function XViewScene({
15188
15114
  },
15189
15115
  []
15190
15116
  );
15117
+ const handleActivateReshapeLens = useCallback6(({ type, columns, centerNodeId }) => {
15118
+ const { nodeObjects, tweenGroup, camera, controls } = stateRef.current;
15119
+ if (!nodeObjects || !tweenGroup || !camera || !controls) return;
15120
+ const activeNodeIds = Object.keys(nodeObjects);
15121
+ if (activeNodeIds.length === 0) return;
15122
+ let sumX = 0;
15123
+ let sumY = 0;
15124
+ let nodeCount = 0;
15125
+ activeNodeIds.forEach((id) => {
15126
+ const mesh = nodeObjects[id];
15127
+ if (mesh && mesh.material) {
15128
+ const opacityTween = new Tween2(mesh.material).to({ opacity: 1 }, 1200).easing(Easing2.Cubic.Out);
15129
+ tweenGroup.add(opacityTween);
15130
+ opacityTween.start();
15131
+ }
15132
+ if (mesh && mesh.userData && mesh.userData.labelObject) {
15133
+ mesh.userData.labelObject.visible = true;
15134
+ }
15135
+ });
15136
+ if (type === "Column") {
15137
+ const colSpacing = 80;
15138
+ const rowSpacing = 80;
15139
+ const numCols = columns || 4;
15140
+ activeNodeIds.forEach((id, index) => {
15141
+ const mesh = nodeObjects[id];
15142
+ const col = index % numCols;
15143
+ const row = Math.floor(index / numCols);
15144
+ const targetX = (col - (numCols - 1) / 2) * colSpacing;
15145
+ const targetY = -(row * rowSpacing) + 50;
15146
+ const posTween = new Tween2(mesh.position).to({ x: targetX, y: targetY, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
15147
+ tweenGroup.add(posTween);
15148
+ posTween.start();
15149
+ if (mesh.userData.labelObject) {
15150
+ const labelTarget = new THREE3.Vector3(targetX, targetY, 0).add(mesh.userData.labelOffset || new THREE3.Vector3(0, 3.8, 0));
15151
+ const lblTween = new Tween2(mesh.userData.labelObject.position).to(labelTarget, 1500).easing(Easing2.Cubic.InOut);
15152
+ tweenGroup.add(lblTween);
15153
+ lblTween.start();
15154
+ }
15155
+ sumX += targetX;
15156
+ sumY += targetY;
15157
+ nodeCount++;
15158
+ });
15159
+ } else if (type === "Circle") {
15160
+ const total = activeNodeIds.length;
15161
+ const radius = Math.max(80, total * 8);
15162
+ activeNodeIds.forEach((id, index) => {
15163
+ const mesh = nodeObjects[id];
15164
+ const angle = index / total * Math.PI * 2;
15165
+ const targetX = Math.cos(angle) * radius;
15166
+ const targetY = Math.sin(angle) * radius;
15167
+ const posTween = new Tween2(mesh.position).to({ x: targetX, y: targetY, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
15168
+ tweenGroup.add(posTween);
15169
+ posTween.start();
15170
+ if (mesh.userData.labelObject) {
15171
+ const labelTarget = new THREE3.Vector3(targetX, targetY, 0).add(mesh.userData.labelOffset || new THREE3.Vector3(0, 3.8, 0));
15172
+ const lblTween = new Tween2(mesh.userData.labelObject.position).to(labelTarget, 1500).easing(Easing2.Cubic.InOut);
15173
+ tweenGroup.add(lblTween);
15174
+ lblTween.start();
15175
+ }
15176
+ sumX += targetX;
15177
+ sumY += targetY;
15178
+ nodeCount++;
15179
+ });
15180
+ } else if (type === "Star") {
15181
+ const centerMesh = centerNodeId ? nodeObjects[String(centerNodeId)] : null;
15182
+ const orbitingNodeIds = activeNodeIds.filter((id) => id !== String(centerNodeId));
15183
+ const totalOrbiting = orbitingNodeIds.length;
15184
+ const radius = Math.max(80, totalOrbiting * 10);
15185
+ if (centerMesh) {
15186
+ const posTween = new Tween2(centerMesh.position).to({ x: 0, y: 0, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
15187
+ tweenGroup.add(posTween);
15188
+ posTween.start();
15189
+ if (centerMesh.userData.labelObject) {
15190
+ const labelTarget = new THREE3.Vector3(0, 0, 0).add(centerMesh.userData.labelOffset || new THREE3.Vector3(0, 3.8, 0));
15191
+ const lblTween = new Tween2(centerMesh.userData.labelObject.position).to(labelTarget, 1500).easing(Easing2.Cubic.InOut);
15192
+ tweenGroup.add(lblTween);
15193
+ lblTween.start();
15194
+ }
15195
+ sumX += 0;
15196
+ sumY += 0;
15197
+ nodeCount++;
15198
+ }
15199
+ orbitingNodeIds.forEach((id, index) => {
15200
+ const mesh = nodeObjects[id];
15201
+ const angle = totalOrbiting > 0 ? index / totalOrbiting * Math.PI * 2 : 0;
15202
+ const targetX = Math.cos(angle) * radius;
15203
+ const targetY = Math.sin(angle) * radius;
15204
+ const posTween = new Tween2(mesh.position).to({ x: targetX, y: targetY, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
15205
+ tweenGroup.add(posTween);
15206
+ posTween.start();
15207
+ if (mesh.userData.labelObject) {
15208
+ const labelTarget = new THREE3.Vector3(targetX, targetY, 0).add(mesh.userData.labelOffset || new THREE3.Vector3(0, 3.8, 0));
15209
+ const lblTween = new Tween2(mesh.userData.labelObject.position).to(labelTarget, 1500).easing(Easing2.Cubic.InOut);
15210
+ tweenGroup.add(lblTween);
15211
+ lblTween.start();
15212
+ }
15213
+ sumX += targetX;
15214
+ sumY += targetY;
15215
+ nodeCount++;
15216
+ });
15217
+ }
15218
+ if (nodeCount > 0) {
15219
+ const centerX = sumX / nodeCount;
15220
+ const centerY = sumY / nodeCount;
15221
+ const targetFocus = new THREE3.Vector3(centerX, centerY, 0);
15222
+ const targetTween = new Tween2(controls.target).to({ x: targetFocus.x, y: targetFocus.y, z: targetFocus.z }, 1500).easing(Easing2.Cubic.InOut);
15223
+ tweenGroup.add(targetTween);
15224
+ targetTween.start();
15225
+ let zoomZ = 140;
15226
+ if (type === "Column") {
15227
+ const numRows = Math.ceil(nodeCount / (columns || 4));
15228
+ zoomZ = Math.max(140, numRows * 50);
15229
+ } else if (type === "Circle" || type === "Star") {
15230
+ const radius = Math.max(80, nodeCount * 8);
15231
+ zoomZ = radius * 2.5;
15232
+ }
15233
+ const camTween = new Tween2(camera.position).to({ x: targetFocus.x, y: targetFocus.y, z: zoomZ }, 1500).easing(Easing2.Cubic.InOut);
15234
+ tweenGroup.add(camTween);
15235
+ camTween.start();
15236
+ }
15237
+ }, []);
15191
15238
  const handleActivateQuestLens = useCallback6(({ assigneeId, status: status2, milestoneId }) => {
15192
15239
  var _a2;
15193
15240
  const { nodeObjects, tweenGroup, graphGroup } = stateRef.current;
@@ -18759,6 +18806,7 @@ function XViewScene({
18759
18806
  importSuccessMessage,
18760
18807
  onActivateTimeline: handleActivateTimeline,
18761
18808
  onActivateQuestLens: handleActivateQuestLens,
18809
+ onActivateReshapeLens: handleActivateReshapeLens,
18762
18810
  onOpenBoards: handleOpenBoards,
18763
18811
  viewType: viewParams == null ? void 0 : viewParams.type,
18764
18812
  viewName: viewParams == null ? void 0 : viewParams.name,