@lv-x-software-house/x_view 1.2.6-dev.59 → 1.2.6-dev.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +40 -9
- package/dist/index.mjs +40 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12533,7 +12533,8 @@ function RelationshipDetailsPanel({
|
|
|
12533
12533
|
onOpenReference,
|
|
12534
12534
|
onMentionClick,
|
|
12535
12535
|
onUploadFile,
|
|
12536
|
-
userRole
|
|
12536
|
+
userRole,
|
|
12537
|
+
onHighlight
|
|
12537
12538
|
}) {
|
|
12538
12539
|
const [name, setName] = (0, import_react22.useState)((link == null ? void 0 : link.name) ?? "");
|
|
12539
12540
|
const [description, setDescription] = (0, import_react22.useState)((link == null ? void 0 : link.description) ?? "");
|
|
@@ -12563,6 +12564,11 @@ function RelationshipDetailsPanel({
|
|
|
12563
12564
|
setTargetLabel((link == null ? void 0 : link.target_label) ?? "");
|
|
12564
12565
|
setHasUnsavedChanges(false);
|
|
12565
12566
|
}, [link]);
|
|
12567
|
+
(0, import_react22.useEffect)(() => {
|
|
12568
|
+
return () => {
|
|
12569
|
+
if (onHighlight) onHighlight(null);
|
|
12570
|
+
};
|
|
12571
|
+
}, [onHighlight]);
|
|
12566
12572
|
const swallow = (e) => e.stopPropagation();
|
|
12567
12573
|
const handleAddProp = () => {
|
|
12568
12574
|
if (!canEdit) return;
|
|
@@ -12609,10 +12615,8 @@ function RelationshipDetailsPanel({
|
|
|
12609
12615
|
isCurved: link.isCurved,
|
|
12610
12616
|
curveOffset: link.curveOffset
|
|
12611
12617
|
};
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
if (currentTargetLabel.trim())
|
|
12615
|
-
dataToSave.target_label = currentTargetLabel.trim();
|
|
12618
|
+
dataToSave.source_label = currentSourceLabel.trim();
|
|
12619
|
+
dataToSave.target_label = currentTargetLabel.trim();
|
|
12616
12620
|
await onSave(dataToSave, keepOpen);
|
|
12617
12621
|
onDataUpdate(dataToSave);
|
|
12618
12622
|
setHasUnsavedChanges(false);
|
|
@@ -12742,6 +12746,8 @@ function RelationshipDetailsPanel({
|
|
|
12742
12746
|
},
|
|
12743
12747
|
placeholder: "Ex: Conceitos",
|
|
12744
12748
|
disabled: !canEdit,
|
|
12749
|
+
onFocus: () => onHighlight == null ? void 0 : onHighlight(link.source),
|
|
12750
|
+
onBlur: () => onHighlight == null ? void 0 : onHighlight(null),
|
|
12745
12751
|
className: `w-full bg-slate-900/60 p-2 text-xs rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-violet-400/60 placeholder:text-slate-600
|
|
12746
12752
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
12747
12753
|
`
|
|
@@ -12757,6 +12763,8 @@ function RelationshipDetailsPanel({
|
|
|
12757
12763
|
},
|
|
12758
12764
|
placeholder: "Ex: Refer\xEAncias",
|
|
12759
12765
|
disabled: !canEdit,
|
|
12766
|
+
onFocus: () => onHighlight == null ? void 0 : onHighlight(link.target),
|
|
12767
|
+
onBlur: () => onHighlight == null ? void 0 : onHighlight(null),
|
|
12760
12768
|
className: `w-full bg-slate-900/60 p-2 text-xs rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-violet-400/60 placeholder:text-slate-600
|
|
12761
12769
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
12762
12770
|
`
|
|
@@ -13256,7 +13264,7 @@ function ImportParentFileModal({
|
|
|
13256
13264
|
// src/components/AncestryLinkDetailsPanel.jsx
|
|
13257
13265
|
var import_react26 = __toESM(require("react"));
|
|
13258
13266
|
var import_fi21 = require("react-icons/fi");
|
|
13259
|
-
function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile }) {
|
|
13267
|
+
function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile, onHighlight }) {
|
|
13260
13268
|
var _a, _b, _c, _d;
|
|
13261
13269
|
const relationshipData = data.relationship || {};
|
|
13262
13270
|
const description = relationshipData.description || "";
|
|
@@ -13265,6 +13273,11 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
13265
13273
|
const sourceName = ((_b = (_a = data.sourceNode) == null ? void 0 : _a.userData) == null ? void 0 : _b.name) || "Origem";
|
|
13266
13274
|
const targetName = ((_d = (_c = data.targetNode) == null ? void 0 : _c.userData) == null ? void 0 : _d.name) || "Destino";
|
|
13267
13275
|
const [isReadMode, setIsReadMode] = (0, import_react26.useState)(false);
|
|
13276
|
+
import_react26.default.useEffect(() => {
|
|
13277
|
+
return () => {
|
|
13278
|
+
if (onHighlight) onHighlight(null);
|
|
13279
|
+
};
|
|
13280
|
+
}, [onHighlight]);
|
|
13268
13281
|
const swallow = (e) => e.stopPropagation();
|
|
13269
13282
|
const handleImageClickFromText = (url, name) => {
|
|
13270
13283
|
if (onOpenImageViewer) {
|
|
@@ -13298,7 +13311,23 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
13298
13311
|
onMentionClick,
|
|
13299
13312
|
onImageClick: handleImageClickFromText
|
|
13300
13313
|
}
|
|
13301
|
-
) : /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ import_react26.default.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ import_react26.default.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ import_react26.default.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ import_react26.default.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ import_react26.default.createElement(
|
|
13314
|
+
) : /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ import_react26.default.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ import_react26.default.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ import_react26.default.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ import_react26.default.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ import_react26.default.createElement(
|
|
13315
|
+
"span",
|
|
13316
|
+
{
|
|
13317
|
+
className: "truncate max-w-[150px] cursor-help hover:text-blue-400 transition-colors",
|
|
13318
|
+
onMouseEnter: () => onHighlight == null ? void 0 : onHighlight(data.source),
|
|
13319
|
+
onMouseLeave: () => onHighlight == null ? void 0 : onHighlight(null)
|
|
13320
|
+
},
|
|
13321
|
+
sourceName
|
|
13322
|
+
), /* @__PURE__ */ import_react26.default.createElement("span", { className: "text-slate-500 text-sm" }, "\u2794"), /* @__PURE__ */ import_react26.default.createElement(
|
|
13323
|
+
"span",
|
|
13324
|
+
{
|
|
13325
|
+
className: "truncate max-w-[150px] cursor-help hover:text-blue-400 transition-colors",
|
|
13326
|
+
onMouseEnter: () => onHighlight == null ? void 0 : onHighlight(data.target),
|
|
13327
|
+
onMouseLeave: () => onHighlight == null ? void 0 : onHighlight(null)
|
|
13328
|
+
},
|
|
13329
|
+
targetName
|
|
13330
|
+
))), /* @__PURE__ */ import_react26.default.createElement("button", { onClick: onClose, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl", title: "Fechar" }, "\xD7")), /* @__PURE__ */ import_react26.default.createElement("div", { className: "px-6 pb-6 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, description && /* @__PURE__ */ import_react26.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ import_react26.default.createElement("label", { className: "text-xs text-slate-300 font-medium" }, "Descri\xE7\xE3o"), /* @__PURE__ */ import_react26.default.createElement(
|
|
13302
13331
|
"button",
|
|
13303
13332
|
{
|
|
13304
13333
|
onClick: () => setIsReadMode(true),
|
|
@@ -19482,7 +19511,8 @@ function XViewScene({
|
|
|
19482
19511
|
onOpenReference: handleOpenReference,
|
|
19483
19512
|
onMentionClick: handleAddExistingNode,
|
|
19484
19513
|
onUploadFile: upload_file_action,
|
|
19485
|
-
userRole: userPermissionRole
|
|
19514
|
+
userRole: userPermissionRole,
|
|
19515
|
+
onHighlight: handleReadModeHighlight
|
|
19486
19516
|
}
|
|
19487
19517
|
),
|
|
19488
19518
|
ancestryLinkDetails && /* @__PURE__ */ import_react31.default.createElement(
|
|
@@ -19493,7 +19523,8 @@ function XViewScene({
|
|
|
19493
19523
|
onOpenImageViewer: handleOpenImageViewer,
|
|
19494
19524
|
onOpenReference: handleOpenReference,
|
|
19495
19525
|
onMentionClick: handleAddExistingNode,
|
|
19496
|
-
onUploadFile: upload_file_action
|
|
19526
|
+
onUploadFile: upload_file_action,
|
|
19527
|
+
onHighlight: handleReadModeHighlight
|
|
19497
19528
|
}
|
|
19498
19529
|
),
|
|
19499
19530
|
/* @__PURE__ */ import_react31.default.createElement(
|
package/dist/index.mjs
CHANGED
|
@@ -12565,7 +12565,8 @@ function RelationshipDetailsPanel({
|
|
|
12565
12565
|
onOpenReference,
|
|
12566
12566
|
onMentionClick,
|
|
12567
12567
|
onUploadFile,
|
|
12568
|
-
userRole
|
|
12568
|
+
userRole,
|
|
12569
|
+
onHighlight
|
|
12569
12570
|
}) {
|
|
12570
12571
|
const [name, setName] = useState21((link == null ? void 0 : link.name) ?? "");
|
|
12571
12572
|
const [description, setDescription] = useState21((link == null ? void 0 : link.description) ?? "");
|
|
@@ -12595,6 +12596,11 @@ function RelationshipDetailsPanel({
|
|
|
12595
12596
|
setTargetLabel((link == null ? void 0 : link.target_label) ?? "");
|
|
12596
12597
|
setHasUnsavedChanges(false);
|
|
12597
12598
|
}, [link]);
|
|
12599
|
+
useEffect18(() => {
|
|
12600
|
+
return () => {
|
|
12601
|
+
if (onHighlight) onHighlight(null);
|
|
12602
|
+
};
|
|
12603
|
+
}, [onHighlight]);
|
|
12598
12604
|
const swallow = (e) => e.stopPropagation();
|
|
12599
12605
|
const handleAddProp = () => {
|
|
12600
12606
|
if (!canEdit) return;
|
|
@@ -12641,10 +12647,8 @@ function RelationshipDetailsPanel({
|
|
|
12641
12647
|
isCurved: link.isCurved,
|
|
12642
12648
|
curveOffset: link.curveOffset
|
|
12643
12649
|
};
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
if (currentTargetLabel.trim())
|
|
12647
|
-
dataToSave.target_label = currentTargetLabel.trim();
|
|
12650
|
+
dataToSave.source_label = currentSourceLabel.trim();
|
|
12651
|
+
dataToSave.target_label = currentTargetLabel.trim();
|
|
12648
12652
|
await onSave(dataToSave, keepOpen);
|
|
12649
12653
|
onDataUpdate(dataToSave);
|
|
12650
12654
|
setHasUnsavedChanges(false);
|
|
@@ -12774,6 +12778,8 @@ function RelationshipDetailsPanel({
|
|
|
12774
12778
|
},
|
|
12775
12779
|
placeholder: "Ex: Conceitos",
|
|
12776
12780
|
disabled: !canEdit,
|
|
12781
|
+
onFocus: () => onHighlight == null ? void 0 : onHighlight(link.source),
|
|
12782
|
+
onBlur: () => onHighlight == null ? void 0 : onHighlight(null),
|
|
12777
12783
|
className: `w-full bg-slate-900/60 p-2 text-xs rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-violet-400/60 placeholder:text-slate-600
|
|
12778
12784
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
12779
12785
|
`
|
|
@@ -12789,6 +12795,8 @@ function RelationshipDetailsPanel({
|
|
|
12789
12795
|
},
|
|
12790
12796
|
placeholder: "Ex: Refer\xEAncias",
|
|
12791
12797
|
disabled: !canEdit,
|
|
12798
|
+
onFocus: () => onHighlight == null ? void 0 : onHighlight(link.target),
|
|
12799
|
+
onBlur: () => onHighlight == null ? void 0 : onHighlight(null),
|
|
12792
12800
|
className: `w-full bg-slate-900/60 p-2 text-xs rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-violet-400/60 placeholder:text-slate-600
|
|
12793
12801
|
${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
|
|
12794
12802
|
`
|
|
@@ -13288,7 +13296,7 @@ function ImportParentFileModal({
|
|
|
13288
13296
|
// src/components/AncestryLinkDetailsPanel.jsx
|
|
13289
13297
|
import React25, { useState as useState24 } from "react";
|
|
13290
13298
|
import { FiBookOpen as FiBookOpen6 } from "react-icons/fi";
|
|
13291
|
-
function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile }) {
|
|
13299
|
+
function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile, onHighlight }) {
|
|
13292
13300
|
var _a, _b, _c, _d;
|
|
13293
13301
|
const relationshipData = data.relationship || {};
|
|
13294
13302
|
const description = relationshipData.description || "";
|
|
@@ -13297,6 +13305,11 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
13297
13305
|
const sourceName = ((_b = (_a = data.sourceNode) == null ? void 0 : _a.userData) == null ? void 0 : _b.name) || "Origem";
|
|
13298
13306
|
const targetName = ((_d = (_c = data.targetNode) == null ? void 0 : _c.userData) == null ? void 0 : _d.name) || "Destino";
|
|
13299
13307
|
const [isReadMode, setIsReadMode] = useState24(false);
|
|
13308
|
+
React25.useEffect(() => {
|
|
13309
|
+
return () => {
|
|
13310
|
+
if (onHighlight) onHighlight(null);
|
|
13311
|
+
};
|
|
13312
|
+
}, [onHighlight]);
|
|
13300
13313
|
const swallow = (e) => e.stopPropagation();
|
|
13301
13314
|
const handleImageClickFromText = (url, name) => {
|
|
13302
13315
|
if (onOpenImageViewer) {
|
|
@@ -13330,7 +13343,23 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
|
|
|
13330
13343
|
onMentionClick,
|
|
13331
13344
|
onImageClick: handleImageClickFromText
|
|
13332
13345
|
}
|
|
13333
|
-
) : /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ React25.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React25.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React25.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ React25.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ React25.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ React25.createElement(
|
|
13346
|
+
) : /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ React25.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React25.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React25.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ React25.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ React25.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ React25.createElement(
|
|
13347
|
+
"span",
|
|
13348
|
+
{
|
|
13349
|
+
className: "truncate max-w-[150px] cursor-help hover:text-blue-400 transition-colors",
|
|
13350
|
+
onMouseEnter: () => onHighlight == null ? void 0 : onHighlight(data.source),
|
|
13351
|
+
onMouseLeave: () => onHighlight == null ? void 0 : onHighlight(null)
|
|
13352
|
+
},
|
|
13353
|
+
sourceName
|
|
13354
|
+
), /* @__PURE__ */ React25.createElement("span", { className: "text-slate-500 text-sm" }, "\u2794"), /* @__PURE__ */ React25.createElement(
|
|
13355
|
+
"span",
|
|
13356
|
+
{
|
|
13357
|
+
className: "truncate max-w-[150px] cursor-help hover:text-blue-400 transition-colors",
|
|
13358
|
+
onMouseEnter: () => onHighlight == null ? void 0 : onHighlight(data.target),
|
|
13359
|
+
onMouseLeave: () => onHighlight == null ? void 0 : onHighlight(null)
|
|
13360
|
+
},
|
|
13361
|
+
targetName
|
|
13362
|
+
))), /* @__PURE__ */ React25.createElement("button", { onClick: onClose, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React25.createElement("div", { className: "px-6 pb-6 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, description && /* @__PURE__ */ React25.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React25.createElement("label", { className: "text-xs text-slate-300 font-medium" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React25.createElement(
|
|
13334
13363
|
"button",
|
|
13335
13364
|
{
|
|
13336
13365
|
onClick: () => setIsReadMode(true),
|
|
@@ -19539,7 +19568,8 @@ function XViewScene({
|
|
|
19539
19568
|
onOpenReference: handleOpenReference,
|
|
19540
19569
|
onMentionClick: handleAddExistingNode,
|
|
19541
19570
|
onUploadFile: upload_file_action,
|
|
19542
|
-
userRole: userPermissionRole
|
|
19571
|
+
userRole: userPermissionRole,
|
|
19572
|
+
onHighlight: handleReadModeHighlight
|
|
19543
19573
|
}
|
|
19544
19574
|
),
|
|
19545
19575
|
ancestryLinkDetails && /* @__PURE__ */ React30.createElement(
|
|
@@ -19550,7 +19580,8 @@ function XViewScene({
|
|
|
19550
19580
|
onOpenImageViewer: handleOpenImageViewer,
|
|
19551
19581
|
onOpenReference: handleOpenReference,
|
|
19552
19582
|
onMentionClick: handleAddExistingNode,
|
|
19553
|
-
onUploadFile: upload_file_action
|
|
19583
|
+
onUploadFile: upload_file_action,
|
|
19584
|
+
onHighlight: handleReadModeHighlight
|
|
19554
19585
|
}
|
|
19555
19586
|
),
|
|
19556
19587
|
/* @__PURE__ */ React30.createElement(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.6-dev.
|
|
3
|
+
"version": "1.2.6-dev.60",
|
|
4
4
|
"description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
|
|
5
5
|
"author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|