@cccsaurora/clue-ui 1.2.3-dev.266 → 1.2.3
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/ActionForm-DlOXqMUx.js +4460 -0
- package/AnnotationDetails-Bk-p0F6h.js +160 -0
- package/AnnotationPreview-jzZvkCxJ.js +140 -0
- package/ClueEnrichContext-KqRuuWNS.js +418 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_MapCache-BiTi0iqu.js +180 -0
- package/_Uint8Array-BQNOM9Rr.js +101 -0
- package/_baseAssignValue-CNMLQZco.js +20 -0
- package/_baseClone-BnT-6pyM.js +207 -0
- package/_baseExtremum-Ca2EHgy2.js +16 -0
- package/_baseFlatten-Bfr_Molw.js +72 -0
- package/_baseGet-DSZygzyq.js +79 -0
- package/_baseIsEqual-VgvaAFZG.js +147 -0
- package/_baseIteratee-Dbfsw5z8.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-BJcj69PL.js +79 -0
- package/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/_createAggregator-k3TuAnxT.js +53 -0
- package/_getPrototype-Cr1Mk7BC.js +5 -0
- package/_getTag-CK2Sffaq.js +90 -0
- package/_isIterateeCall-DkJP7Rbx.js +13 -0
- package/_setToArray-C7yMOeww.js +29 -0
- package/cloneDeep-CF8TtLHr.js +8 -0
- package/components/AnnotationBody.js +35 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +97 -110
- package/components/EnrichedChip.js +105 -130
- package/components/EnrichedTypography.js +107 -133
- package/components/ErrorBoundary.js +24 -28
- package/components/RetryFailedEnrichments.js +9 -10
- package/components/SourcePicker.js +49 -57
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +59 -75
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +23 -39
- package/components/actions/formats/FileResult.js +59 -86
- package/components/actions/formats/index.js +10 -21
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +91 -111
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +202 -261
- package/components/display/graph/visualizations/Leaf.js +69 -88
- package/components/display/graph/visualizations/cloud/index.js +81 -98
- package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +13 -14
- package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
- package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +306 -408
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +5770 -8678
- package/components/enrichment/EnrichPopover.js +46 -54
- package/components/fetchers/Fetcher.js +119 -158
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +17 -21
- package/components/group/Entry.js +11 -13
- package/components/group/Group.js +10 -13
- package/components/group/GroupControl.js +65 -76
- package/components/stats/QueryStatus.js +33 -43
- package/countBy-CdYegFSu.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-CH7kz5Ix.js +8 -0
- package/groupBy-br8xmD2R.js +8 -0
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +23 -29
- package/hooks/ClueConfigProvider.js +12 -14
- package/hooks/ClueDatabaseContext.js +13 -19
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +56 -83
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +31 -47
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useFetcherResult.js +24 -33
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +37 -66
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +69 -85
- package/icons/Context.js +63 -77
- package/icons/Opinion.js +60 -76
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-BHAe_V9n.js +12768 -0
- package/index-BK-zfYhR.js +358 -0
- package/index-CA5CUNZO.js +975 -0
- package/index-Dj5C04IX.js +568 -0
- package/index-p5_wX7q1.js +11729 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-BatpeCIi.js +29 -0
- package/isSymbol-C3_SC0Qp.js +8 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +60 -60
- package/maxBy-Bc0dYHcO.js +8 -0
- package/package.json +1 -1
- package/sortBy-DY2JBf9n.js +75 -0
- package/sumBy-DuMASLPd.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-Ct9Ygter.js +2292 -0
- package/utils/chain.js +65 -92
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +10 -35
- package/utils/graph.js +45 -72
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +81 -131
- package/utils/loggerUtil.js +3 -5
- package/utils/sessionStorage.js +27 -41
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-DmwSUrum.js +129 -0
- package/ActionForm-uDp92tN2.js +0 -5941
- package/AnnotationDetails-DGYfOiWm.js +0 -175
- package/AnnotationPreview-bHObsb3P.js +0 -188
- package/ClueEnrichContext-CJEJxrgs.js +0 -541
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_MapCache-WmuDdwuH.js +0 -222
- package/_Uint8Array-B7JqpgFX.js +0 -128
- package/_baseAssignValue-CGTuELqU.js +0 -25
- package/_baseClone-CkNrTyhm.js +0 -283
- package/_baseExtremum-kob8QXyt.js +0 -18
- package/_baseFlatten-jIR_sN_-.js +0 -92
- package/_baseGet-Bx3A4Qfp.js +0 -108
- package/_baseIsEqual-C5OTWzTk.js +0 -208
- package/_baseIteratee-avi7MX2o.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-BI9GIHMF.js +0 -115
- package/_commonjsHelpers-DWwsNxpa.js +0 -8
- package/_createAggregator-QD8MzKwe.js +0 -63
- package/_getPrototype-CU0j_POw.js +0 -5
- package/_getTag-Ckxxfr88.js +0 -126
- package/_isIterateeCall-Ds3sw2SF.js +0 -17
- package/_setToArray-CaPKQhcz.js +0 -33
- package/cloneDeep-DJrLSw8W.js +0 -8
- package/countBy-c6S3dvSW.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-DSsNkRQs.js +0 -8
- package/groupBy-xqz-n0Vd.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-AMfoEg_6.js +0 -696
- package/index-B6C2a_Lg.js +0 -1172
- package/index-C12gPw2W.js +0 -17698
- package/index-DCKkHTvx.js +0 -15750
- package/index-JcKyZeoY.js +0 -465
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/last-CUCl67Im.js +0 -7
- package/maxBy-IKHzFrCS.js +0 -8
- package/sortBy-DfSj8IoJ.js +0 -96
- package/sumBy-D-hb_NY-.js +0 -8
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-Z1LFp01b.js +0 -3289
- package/utils-HmNPuoDB.js +0 -199
|
@@ -1,55 +1,41 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme, colors, Box } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
|
|
6
|
-
import { StorageKey, BUNDLE_SEPARATOR } from "../../../../../utils/constants.js";
|
|
7
|
-
import { c as
|
|
8
|
-
import { g as
|
|
9
|
-
import { i as
|
|
10
|
-
import { b as
|
|
11
|
-
import { i as
|
|
12
|
-
import { i as
|
|
13
|
-
import { t as
|
|
14
|
-
import { b as
|
|
15
|
-
import { memo, useMemo } from "react";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
function
|
|
21
|
-
return
|
|
1
|
+
import { jsxs as it, jsx as L, Fragment as At } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as Bt, colors as wt, Box as Ft } from "@mui/material";
|
|
3
|
+
import It from "../../../../../hooks/useComparator.js";
|
|
4
|
+
import Wt from "../../../../../hooks/useMyHighlights.js";
|
|
5
|
+
import { useMyLocalStorageItem as Ot } from "../../../../../hooks/useMyLocalStorage.js";
|
|
6
|
+
import { StorageKey as Pt, BUNDLE_SEPARATOR as Ht } from "../../../../../utils/constants.js";
|
|
7
|
+
import { c as Xt } from "../../../../../cloneDeep-CF8TtLHr.js";
|
|
8
|
+
import { g as Tt } from "../../../../../get-CH7kz5Ix.js";
|
|
9
|
+
import { i as Yt } from "../../../../../isNil-CjWwlQS3.js";
|
|
10
|
+
import { b as $t, a as jt } from "../../../../../_baseExtremum-Ca2EHgy2.js";
|
|
11
|
+
import { i as Nt } from "../../../../../identity-ByMq8VxU.js";
|
|
12
|
+
import { i as Ut } from "../../../../../_isIterateeCall-DkJP7Rbx.js";
|
|
13
|
+
import { t as et } from "../../../../../toFinite-BMy6GObD.js";
|
|
14
|
+
import { b as Gt } from "../../../../../_baseSum-wEbgNeUs.js";
|
|
15
|
+
import { memo as Vt, useMemo as S } from "react";
|
|
16
|
+
import qt from "../../elements/NodeCard.js";
|
|
17
|
+
import zt from "../icons/index.js";
|
|
18
|
+
import Jt from "../Leaf.js";
|
|
19
|
+
import Qt from "./BundleLine.js";
|
|
20
|
+
function kt(c) {
|
|
21
|
+
return c && c.length ? $t(c, Nt, jt) : void 0;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
start += step;
|
|
29
|
-
}
|
|
30
|
-
return result;
|
|
23
|
+
var Zt = Math.ceil, Kt = Math.max;
|
|
24
|
+
function ti(c, n, r, h) {
|
|
25
|
+
for (var d = -1, _ = Kt(Zt((n - c) / (r || 1)), 0), v = Array(_); _--; )
|
|
26
|
+
v[++d] = c, c += r;
|
|
27
|
+
return v;
|
|
31
28
|
}
|
|
32
|
-
function
|
|
33
|
-
return function(
|
|
34
|
-
|
|
35
|
-
end = step = void 0;
|
|
36
|
-
}
|
|
37
|
-
start = toFinite(start);
|
|
38
|
-
if (end === void 0) {
|
|
39
|
-
end = start;
|
|
40
|
-
start = 0;
|
|
41
|
-
} else {
|
|
42
|
-
end = toFinite(end);
|
|
43
|
-
}
|
|
44
|
-
step = step === void 0 ? start < end ? 1 : -1 : toFinite(step);
|
|
45
|
-
return baseRange(start, end, step);
|
|
29
|
+
function ii(c) {
|
|
30
|
+
return function(n, r, h) {
|
|
31
|
+
return h && typeof h != "number" && Ut(n, r, h) && (r = h = void 0), n = et(n), r === void 0 ? (r = n, n = 0) : r = et(r), h = h === void 0 ? n < r ? 1 : -1 : et(h), ti(n, r, h);
|
|
46
32
|
};
|
|
47
33
|
}
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
return
|
|
34
|
+
var ei = ii();
|
|
35
|
+
function ni(c) {
|
|
36
|
+
return c && c.length ? Gt(c, Nt) : 0;
|
|
51
37
|
}
|
|
52
|
-
const
|
|
38
|
+
const nt = {
|
|
53
39
|
textColor: "white",
|
|
54
40
|
nodeColor: {
|
|
55
41
|
border: "grey",
|
|
@@ -64,423 +50,335 @@ const DEFAULT_OPTIONS = {
|
|
|
64
50
|
linePaddingX: 10,
|
|
65
51
|
linePaddingY: 10,
|
|
66
52
|
lineWidth: 3,
|
|
67
|
-
enableEntryPadding:
|
|
68
|
-
truncateLabels:
|
|
69
|
-
enableTimestamps:
|
|
53
|
+
enableEntryPadding: !0,
|
|
54
|
+
truncateLabels: !0,
|
|
55
|
+
enableTimestamps: !0,
|
|
70
56
|
iconOrientation: "vertical",
|
|
71
57
|
lineDirection: "horizontal",
|
|
72
58
|
rowStep: null,
|
|
73
59
|
// We'll make this dynamic
|
|
74
|
-
belowPrevious:
|
|
60
|
+
belowPrevious: !1
|
|
75
61
|
};
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
var
|
|
79
|
-
const
|
|
62
|
+
nt.rowStep = nt.ySpacing * 2;
|
|
63
|
+
const ai = ({ svgRef: c, graph: n, labelKeys: r, onNodeSelectionChanged: h, zoom: d, options: _ = {} }) => {
|
|
64
|
+
var gt, xt, vt;
|
|
65
|
+
const v = S(
|
|
80
66
|
() => {
|
|
81
|
-
var
|
|
67
|
+
var i, o;
|
|
82
68
|
return {
|
|
83
|
-
...
|
|
84
|
-
...
|
|
85
|
-
...((
|
|
69
|
+
...nt,
|
|
70
|
+
..._,
|
|
71
|
+
...((o = (i = n == null ? void 0 : n.metadata.display) == null ? void 0 : i.visualization) == null ? void 0 : o.config) ?? {}
|
|
86
72
|
};
|
|
87
73
|
},
|
|
88
|
-
[(
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const [showCardsSettings] = useMyLocalStorageItem(StorageKey.SHOW_CARDS, false);
|
|
101
|
-
const [cardCutoff] = useMyLocalStorageItem(StorageKey.CARD_CUTOFF, 2.5);
|
|
102
|
-
const showCards = useMemo(() => zoom.k > cardCutoff && showCardsSettings, [cardCutoff, showCardsSettings, zoom.k]);
|
|
103
|
-
const levels = useMemo(
|
|
104
|
-
() => graph.data.map(
|
|
105
|
-
(level, levelIndex) => level.map((node) => ({
|
|
106
|
-
...node,
|
|
107
|
-
parents: node == null ? void 0 : node.edges,
|
|
108
|
-
level: levelIndex
|
|
74
|
+
[(xt = (gt = n == null ? void 0 : n.metadata.display) == null ? void 0 : gt.visualization) == null ? void 0 : xt.config, _]
|
|
75
|
+
), {
|
|
76
|
+
xSpacing: at,
|
|
77
|
+
ySpacing: ot,
|
|
78
|
+
linePaddingX: rt,
|
|
79
|
+
linePaddingY: st
|
|
80
|
+
} = v, { runComparators: lt, runComparator: W } = It(), { onNodeHoveredChanged: A, onNodeClicked: ct, nodeOpacities: H, highlightedPath: dt, highlightedNodes: ft, hoveredNode: pt } = Wt(n, (i) => h(i)), u = Bt(), ut = S(() => u.palette.mode === "dark", [u]), [X] = Ot(Pt.SHOW_CARDS, !1), [mt] = Ot(Pt.CARD_CUTOFF, 2.5), Y = S(() => d.k > mt && X, [mt, X, d.k]), w = S(
|
|
81
|
+
() => n.data.map(
|
|
82
|
+
(i, o) => i.map((l) => ({
|
|
83
|
+
...l,
|
|
84
|
+
parents: l == null ? void 0 : l.edges,
|
|
85
|
+
level: o
|
|
109
86
|
}))
|
|
110
87
|
),
|
|
111
|
-
[
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
[baseXSpacing, baseLinePaddingX],
|
|
117
|
-
[baseYSpacing, baseLinePaddingY]
|
|
88
|
+
[n.data]
|
|
89
|
+
), C = S(() => w.flat(), [w]), [$, j, ht, M] = S(() => {
|
|
90
|
+
const i = [
|
|
91
|
+
[at, rt],
|
|
92
|
+
[ot, st]
|
|
118
93
|
];
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, [baseLinePaddingX, baseLinePaddingY, baseXSpacing, baseYSpacing, showCardsSettings, zoom.k]);
|
|
127
|
-
let portBounds;
|
|
128
|
-
if (!graph || !svgRef.current) {
|
|
129
|
-
portBounds = [
|
|
94
|
+
return d.k > 1 && X ? i.flatMap(
|
|
95
|
+
(o, l) => o.map((s) => s * Math.pow(2.5 - l * 1.25, Math.min(d.k, 2.5) - 1))
|
|
96
|
+
) : i.flat();
|
|
97
|
+
}, [rt, st, at, ot, X, d.k]);
|
|
98
|
+
let B;
|
|
99
|
+
if (!n || !c.current)
|
|
100
|
+
B = [
|
|
130
101
|
[0, 0],
|
|
131
102
|
[0, 0]
|
|
132
103
|
];
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
104
|
+
else {
|
|
105
|
+
const i = c.current.getBoundingClientRect();
|
|
106
|
+
B = [d.invert([0, 0]), d.invert([i.width, i.height])];
|
|
136
107
|
}
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
if (!
|
|
108
|
+
const U = S(() => {
|
|
109
|
+
const i = {};
|
|
110
|
+
return C.forEach((o) => {
|
|
111
|
+
if (!o.parents)
|
|
141
112
|
return;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
destinations: [node]
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
return Object.values(bundlesDict);
|
|
155
|
-
}, [flatNodes]);
|
|
156
|
-
const layoutData = useMemo(() => {
|
|
113
|
+
const l = o.parents.join(Ht);
|
|
114
|
+
i[l] ? i[l].destinations.push(o) : i[l] = {
|
|
115
|
+
id: l,
|
|
116
|
+
sources: o.parents.map((s) => C.find((E) => E.id === s)),
|
|
117
|
+
destinations: [o]
|
|
118
|
+
};
|
|
119
|
+
}), Object.values(i);
|
|
120
|
+
}, [C]), G = S(() => {
|
|
157
121
|
const {
|
|
158
|
-
letterSize,
|
|
159
|
-
letterWidth,
|
|
160
|
-
enableEntryPadding,
|
|
161
|
-
truncateLabels,
|
|
162
|
-
rowStep,
|
|
163
|
-
belowPrevious
|
|
164
|
-
} =
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
const labelHeight = labelRows.length * letterSize;
|
|
183
|
-
currentY += labelHeight;
|
|
184
|
-
nodeLocations[node.id] = [+currentX, +currentY, -linePaddingY];
|
|
185
|
-
currentY += ySpacing;
|
|
186
|
-
if (enableEntryPadding) {
|
|
187
|
-
longestLabel = Math.max(longestLabel, max((labelRows == null ? void 0 : labelRows.map((row) => row.toString().length)) ?? [node.id.length]));
|
|
188
|
-
}
|
|
122
|
+
letterSize: i,
|
|
123
|
+
letterWidth: o,
|
|
124
|
+
enableEntryPadding: l,
|
|
125
|
+
truncateLabels: s,
|
|
126
|
+
rowStep: E,
|
|
127
|
+
belowPrevious: F
|
|
128
|
+
} = v;
|
|
129
|
+
let V = 0, O = 0;
|
|
130
|
+
const P = {}, T = {}, R = {}, k = {}, D = {};
|
|
131
|
+
return w.forEach((e, a) => {
|
|
132
|
+
let b = 0;
|
|
133
|
+
e.forEach((f) => {
|
|
134
|
+
var q;
|
|
135
|
+
const g = r == null ? void 0 : r.filter((t) => W(t, f)), m = (q = g == null ? void 0 : g.pop()) == null ? void 0 : q.label, p = (m == null ? void 0 : m.split(",").map((t) => Tt(f, t)).filter((t) => !!t)) ?? [];
|
|
136
|
+
p.length < 1 && f.id.split(`
|
|
137
|
+
`).forEach((t) => p.push(t));
|
|
138
|
+
const I = p.length * i;
|
|
139
|
+
O += I, P[f.id] = [+V, +O, -M], O += ht, l && (b = Math.max(b, kt((p == null ? void 0 : p.map((t) => t.toString().length)) ?? [f.id.length])));
|
|
140
|
+
}), V += $ + (s ? Math.min(b, 44) : b) * o, F ? O += E : O = (a + 1) * E;
|
|
141
|
+
}), U.forEach((e) => {
|
|
142
|
+
e.sources.forEach((a) => {
|
|
143
|
+
D[a.id] || (D[a.id] = /* @__PURE__ */ new Set()), D[a.id].add(e.id);
|
|
144
|
+
}), e.destinations.forEach((a) => {
|
|
145
|
+
Yt(T[a.level]) && (T[a.level] = /* @__PURE__ */ new Set()), k[a.id] || (k[a.id] = /* @__PURE__ */ new Set()), T[a.level].add(e.id), k[a.id].add(e.id);
|
|
189
146
|
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
currentY += rowStep;
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
bundles.forEach((bundle) => {
|
|
198
|
-
bundle.sources.forEach((source) => {
|
|
199
|
-
if (!outputs[source.id]) {
|
|
200
|
-
outputs[source.id] = /* @__PURE__ */ new Set();
|
|
201
|
-
}
|
|
202
|
-
outputs[source.id].add(bundle.id);
|
|
147
|
+
}), Object.entries(T).forEach(([e, a]) => R[e] = a.size), w.forEach((e, a) => {
|
|
148
|
+
const f = ei(a + 1).map((m) => R[m] ?? 0), g = ni(f) * j;
|
|
149
|
+
e.forEach((m) => {
|
|
150
|
+
P[m.id][0] += g;
|
|
203
151
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
linesByLevel[dest.level].add(bundle.id);
|
|
212
|
-
inputs[dest.id].add(bundle.id);
|
|
152
|
+
}), C.forEach((e) => {
|
|
153
|
+
var f, g, m;
|
|
154
|
+
let a = kt([((f = k[e.id]) == null ? void 0 : f.size) - 1, ((g = D[e.id]) == null ? void 0 : g.size) - 1, 0]) * M;
|
|
155
|
+
(m = k[e.id]) != null && m.has(e.id) && (a += M), P[e.id][2] = a;
|
|
156
|
+
const b = w[e.level].findIndex((p) => p.id === e.id);
|
|
157
|
+
w[e.level].filter((p, I) => b < I).forEach((p) => {
|
|
158
|
+
P[p.id][1] += a;
|
|
213
159
|
});
|
|
214
|
-
})
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const paddingArray = indexesSoFar.map((_levelIndex) => paddingByLevel[_levelIndex] ?? 0);
|
|
219
|
-
const totalPadding = sum(paddingArray) * linePaddingX;
|
|
220
|
-
level.forEach((node) => {
|
|
221
|
-
nodeLocations[node.id][0] += totalPadding;
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
flatNodes.forEach((node) => {
|
|
225
|
-
var _a2, _b2, _c2;
|
|
226
|
-
let maxHeight = max([((_a2 = inputs[node.id]) == null ? void 0 : _a2.size) - 1, ((_b2 = outputs[node.id]) == null ? void 0 : _b2.size) - 1, 0]) * linePaddingY;
|
|
227
|
-
if ((_c2 = inputs[node.id]) == null ? void 0 : _c2.has(node.id)) {
|
|
228
|
-
maxHeight += linePaddingY;
|
|
229
|
-
}
|
|
230
|
-
nodeLocations[node.id][2] = maxHeight;
|
|
231
|
-
const levelIndex = levels[node.level].findIndex((_node) => _node.id === node.id);
|
|
232
|
-
levels[node.level].filter((__, index) => levelIndex < index).forEach((_node) => {
|
|
233
|
-
nodeLocations[_node.id][1] += maxHeight;
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
return {
|
|
237
|
-
nodeLocations,
|
|
238
|
-
linesByLevel,
|
|
239
|
-
paddingByLevel
|
|
160
|
+
}), {
|
|
161
|
+
nodeLocations: P,
|
|
162
|
+
linesByLevel: T,
|
|
163
|
+
paddingByLevel: R
|
|
240
164
|
};
|
|
241
165
|
}, [
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
])
|
|
253
|
-
const [timestamps, bundleElements, nodes] = useMemo(() => {
|
|
166
|
+
U,
|
|
167
|
+
v,
|
|
168
|
+
C,
|
|
169
|
+
r,
|
|
170
|
+
w,
|
|
171
|
+
j,
|
|
172
|
+
M,
|
|
173
|
+
W,
|
|
174
|
+
$,
|
|
175
|
+
ht
|
|
176
|
+
]), [Mt, Rt, Dt] = S(() => {
|
|
254
177
|
const {
|
|
255
|
-
textColor,
|
|
256
|
-
letterSize,
|
|
257
|
-
letterWidth,
|
|
258
|
-
nodeRadius,
|
|
259
|
-
nodeColor,
|
|
260
|
-
maxArcRadius,
|
|
261
|
-
lineWidth,
|
|
262
|
-
truncateLabels,
|
|
263
|
-
enableTimestamps,
|
|
264
|
-
belowPrevious,
|
|
265
|
-
iconOrientation,
|
|
266
|
-
lineDirection,
|
|
267
|
-
colorTheme
|
|
268
|
-
} =
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
178
|
+
textColor: i,
|
|
179
|
+
letterSize: o,
|
|
180
|
+
letterWidth: l,
|
|
181
|
+
nodeRadius: s,
|
|
182
|
+
nodeColor: E,
|
|
183
|
+
maxArcRadius: F,
|
|
184
|
+
lineWidth: V,
|
|
185
|
+
truncateLabels: O,
|
|
186
|
+
enableTimestamps: P,
|
|
187
|
+
belowPrevious: T,
|
|
188
|
+
iconOrientation: R,
|
|
189
|
+
lineDirection: k,
|
|
190
|
+
colorTheme: D
|
|
191
|
+
} = v, { nodeLocations: e, linesByLevel: a, paddingByLevel: b } = G, f = [], g = [];
|
|
192
|
+
C.forEach((t) => {
|
|
193
|
+
var St, Ct, bt, Et;
|
|
194
|
+
const [yt, z, Z] = e[t.id], K = ((St = r == null ? void 0 : r.filter((y) => W(y, t)).pop()) == null ? void 0 : St.label) ?? "id";
|
|
195
|
+
let J = K == null ? void 0 : K.split(",").map((y) => {
|
|
196
|
+
let x = Tt(t, y);
|
|
197
|
+
return x && O && x.length > 44 && (x = x.replace(/^(.{32}).+$/, "$1 (TRUNCATED)")), x;
|
|
198
|
+
}).filter((y) => !!y).join(`
|
|
199
|
+
`);
|
|
200
|
+
if (J || (t.id.length > 44 ? J = t.id.replace(/^(.{32}).+$/, "$1 (TRUNCATED)") : J = t.id), T && P && (t.timestamp || t.annotation) && g.push(
|
|
201
|
+
/* @__PURE__ */ it(
|
|
202
|
+
"g",
|
|
203
|
+
{
|
|
204
|
+
style: {
|
|
205
|
+
cursor: "default",
|
|
206
|
+
fontFamily: '"Lucida Console", monospace',
|
|
207
|
+
fontSize: o * 0.75 + "px"
|
|
208
|
+
},
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ L(
|
|
211
|
+
"text",
|
|
212
|
+
{
|
|
213
|
+
x: B[0][0] + $,
|
|
214
|
+
y: z + (Z + s) / 2,
|
|
215
|
+
fill: u.palette.getContrastText(u.palette.background.paper),
|
|
216
|
+
style: {
|
|
217
|
+
fillOpacity: H(t.id) / 2,
|
|
218
|
+
transition: u.transitions.create(["fill-opacity"], {
|
|
219
|
+
duration: u.transitions.duration.short
|
|
220
|
+
})
|
|
221
|
+
},
|
|
222
|
+
children: t.timestamp
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
t.annotation && t.annotation.split(`
|
|
226
|
+
`).map((y, x) => {
|
|
227
|
+
var Q;
|
|
228
|
+
return /* @__PURE__ */ L(
|
|
302
229
|
"text",
|
|
303
230
|
{
|
|
304
|
-
x:
|
|
305
|
-
y:
|
|
306
|
-
fill:
|
|
231
|
+
x: B[0][0] + (((Q = t.timestamp) == null ? void 0 : Q.length) ?? 0) * l,
|
|
232
|
+
y: z + (Z + s) / 2 + x * o,
|
|
233
|
+
fill: ut ? wt.orange[300] : wt.blue[900],
|
|
307
234
|
style: {
|
|
308
|
-
fillOpacity:
|
|
309
|
-
transition:
|
|
310
|
-
duration:
|
|
235
|
+
fillOpacity: H(t.id),
|
|
236
|
+
transition: u.transitions.create(["fill-opacity"], {
|
|
237
|
+
duration: u.transitions.duration.short
|
|
311
238
|
})
|
|
312
239
|
},
|
|
313
|
-
children:
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
})
|
|
329
|
-
},
|
|
330
|
-
children: line
|
|
331
|
-
},
|
|
332
|
-
line
|
|
333
|
-
);
|
|
334
|
-
})
|
|
335
|
-
]
|
|
336
|
-
},
|
|
337
|
-
node.id + "-timestamp"
|
|
338
|
-
)
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
if (!showCards) {
|
|
342
|
-
const style = runComparators(
|
|
343
|
-
(_c2 = (_b2 = graph.metadata.display) == null ? void 0 : _b2.styles) == null ? void 0 : _c2.filter((comparator) => comparator.type === "node"),
|
|
344
|
-
node
|
|
345
|
-
);
|
|
346
|
-
const nodeOpacity = nodeOpacities(node.id);
|
|
347
|
-
const icons = (_d = node.icons) == null ? void 0 : _d.map((icon) => [icon, getIcon(icon)]).filter(([__, icon]) => !!icon).map(([icon, Icon], index) => /* @__PURE__ */ jsx(
|
|
348
|
-
Icon,
|
|
240
|
+
children: y
|
|
241
|
+
},
|
|
242
|
+
y
|
|
243
|
+
);
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
t.id + "-timestamp"
|
|
248
|
+
)
|
|
249
|
+
), !Y) {
|
|
250
|
+
const y = lt(
|
|
251
|
+
(bt = (Ct = n.metadata.display) == null ? void 0 : Ct.styles) == null ? void 0 : bt.filter((N) => N.type === "node"),
|
|
252
|
+
t
|
|
253
|
+
), x = H(t.id), Q = (Et = t.icons) == null ? void 0 : Et.map((N) => [N, zt(N)]).filter(([N, tt]) => !!tt).map(([N, tt], Lt) => /* @__PURE__ */ L(
|
|
254
|
+
tt,
|
|
349
255
|
{
|
|
350
|
-
x:
|
|
351
|
-
y:
|
|
352
|
-
size:
|
|
256
|
+
x: yt - s * 3 * (R === "horizontal" ? Lt + 1 : 0),
|
|
257
|
+
y: z - s * 3 * (R === "vertical" ? Lt + 1 : 0),
|
|
258
|
+
size: o * 1.5,
|
|
353
259
|
style: {
|
|
354
|
-
fillOpacity:
|
|
260
|
+
fillOpacity: x
|
|
355
261
|
},
|
|
356
262
|
circleStyle: {
|
|
357
|
-
fillOpacity:
|
|
263
|
+
fillOpacity: x
|
|
358
264
|
}
|
|
359
265
|
},
|
|
360
|
-
|
|
266
|
+
N
|
|
361
267
|
));
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
|
|
268
|
+
f.push(
|
|
269
|
+
/* @__PURE__ */ L(
|
|
270
|
+
Jt,
|
|
365
271
|
{
|
|
366
|
-
alwaysShowText:
|
|
367
|
-
nodeId:
|
|
368
|
-
label,
|
|
369
|
-
height:
|
|
370
|
-
x,
|
|
371
|
-
y,
|
|
372
|
-
style,
|
|
373
|
-
nodeRadius,
|
|
374
|
-
nodeColor,
|
|
375
|
-
nodeOpacity,
|
|
376
|
-
letterSize,
|
|
377
|
-
letterWidth,
|
|
378
|
-
textColor,
|
|
379
|
-
selected:
|
|
380
|
-
onHoverChanged:
|
|
381
|
-
onClick:
|
|
382
|
-
children:
|
|
272
|
+
alwaysShowText: !0,
|
|
273
|
+
nodeId: t.id,
|
|
274
|
+
label: J,
|
|
275
|
+
height: Z,
|
|
276
|
+
x: yt,
|
|
277
|
+
y: z,
|
|
278
|
+
style: y,
|
|
279
|
+
nodeRadius: s,
|
|
280
|
+
nodeColor: E,
|
|
281
|
+
nodeOpacity: x,
|
|
282
|
+
letterSize: o,
|
|
283
|
+
letterWidth: l,
|
|
284
|
+
textColor: i,
|
|
285
|
+
selected: ft.has(t.id),
|
|
286
|
+
onHoverChanged: A,
|
|
287
|
+
onClick: ct,
|
|
288
|
+
children: Q
|
|
383
289
|
},
|
|
384
|
-
|
|
290
|
+
t.id
|
|
385
291
|
)
|
|
386
292
|
);
|
|
387
293
|
}
|
|
388
294
|
});
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
},
|
|
410
|
-
bundle.id
|
|
411
|
-
);
|
|
412
|
-
});
|
|
413
|
-
return [_timestamps, _bundleElements, _nodes];
|
|
295
|
+
const m = Xt(e), p = {}, I = {}, q = U.map((t) => /* @__PURE__ */ L(
|
|
296
|
+
Qt,
|
|
297
|
+
{
|
|
298
|
+
lineDirection: k,
|
|
299
|
+
linesByLevel: a,
|
|
300
|
+
paddingByLevel: b,
|
|
301
|
+
nodeLocations: m,
|
|
302
|
+
outputsByNode: p,
|
|
303
|
+
inputsByNode: I,
|
|
304
|
+
bundle: t,
|
|
305
|
+
maxArcRadius: F,
|
|
306
|
+
lineWidth: V,
|
|
307
|
+
linePaddingX: j,
|
|
308
|
+
linePaddingY: M,
|
|
309
|
+
highlightedPath: dt,
|
|
310
|
+
colorTheme: D
|
|
311
|
+
},
|
|
312
|
+
t.id
|
|
313
|
+
));
|
|
314
|
+
return [g, q, f];
|
|
414
315
|
}, [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
(
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
])
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return /* @__PURE__ */ jsx(
|
|
443
|
-
Box,
|
|
316
|
+
U,
|
|
317
|
+
v,
|
|
318
|
+
(vt = n.metadata.display) == null ? void 0 : vt.styles,
|
|
319
|
+
C,
|
|
320
|
+
ft,
|
|
321
|
+
dt,
|
|
322
|
+
ut,
|
|
323
|
+
r,
|
|
324
|
+
G,
|
|
325
|
+
j,
|
|
326
|
+
M,
|
|
327
|
+
H,
|
|
328
|
+
ct,
|
|
329
|
+
A,
|
|
330
|
+
B,
|
|
331
|
+
W,
|
|
332
|
+
lt,
|
|
333
|
+
Y,
|
|
334
|
+
u.palette,
|
|
335
|
+
u.transitions,
|
|
336
|
+
$
|
|
337
|
+
]), _t = S(() => {
|
|
338
|
+
const { nodeRadius: i, lineWidth: o } = v, { nodeLocations: l } = G;
|
|
339
|
+
return C.filter((s) => Y || pt === s.id).map((s) => {
|
|
340
|
+
const [E, F] = l[s.id];
|
|
341
|
+
return /* @__PURE__ */ L(
|
|
342
|
+
Ft,
|
|
444
343
|
{
|
|
445
|
-
onMouseOver: () =>
|
|
446
|
-
onMouseLeave: () => setTimeout(() =>
|
|
344
|
+
onMouseOver: () => A(s.id, !0),
|
|
345
|
+
onMouseLeave: () => setTimeout(() => A(s.id, !1), 100),
|
|
447
346
|
sx: {
|
|
448
347
|
position: "absolute",
|
|
449
|
-
left:
|
|
450
|
-
top:
|
|
451
|
-
transform: `translateX(-${
|
|
452
|
-
backgroundColor:
|
|
348
|
+
left: d.k * E + d.x,
|
|
349
|
+
top: d.k * F + d.y,
|
|
350
|
+
transform: `translateX(-${i * 2}px) translateY(${o}px)`,
|
|
351
|
+
backgroundColor: u.palette.background.paper,
|
|
453
352
|
maxWidth: "450px",
|
|
454
353
|
maxHeight: "500px",
|
|
455
354
|
overflow: "auto"
|
|
456
355
|
},
|
|
457
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ L(qt, { node: s })
|
|
458
357
|
},
|
|
459
|
-
|
|
358
|
+
s.id
|
|
460
359
|
);
|
|
461
360
|
});
|
|
462
361
|
}, [
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
362
|
+
v,
|
|
363
|
+
C,
|
|
364
|
+
pt,
|
|
365
|
+
G,
|
|
366
|
+
A,
|
|
367
|
+
Y,
|
|
368
|
+
u.palette.background.paper,
|
|
369
|
+
d.k,
|
|
370
|
+
d.x,
|
|
371
|
+
d.y
|
|
473
372
|
]);
|
|
474
|
-
return /* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
373
|
+
return /* @__PURE__ */ it(At, { children: [
|
|
374
|
+
/* @__PURE__ */ L("svg", { id: "viz", ref: c, children: /* @__PURE__ */ it("g", { id: "view", children: [
|
|
375
|
+
Mt,
|
|
376
|
+
Rt,
|
|
377
|
+
Dt
|
|
479
378
|
] }) }),
|
|
480
|
-
|
|
379
|
+
_t
|
|
481
380
|
] });
|
|
482
|
-
};
|
|
483
|
-
const Tree$1 = memo(Tree);
|
|
381
|
+
}, Li = Vt(ai);
|
|
484
382
|
export {
|
|
485
|
-
|
|
383
|
+
Li as default
|
|
486
384
|
};
|