@cccsaurora/clue-ui 1.3.0-dev.404 → 1.3.0

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 (224) hide show
  1. package/ActionForm-CHOSKfvu.js +4403 -0
  2. package/AnnotationDetails-Bqq6Ymmg.js +160 -0
  3. package/AnnotationPreview-CqXmC-j8.js +140 -0
  4. package/ClueEnrichContext-DL6aGe1k.js +432 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-DRK-s2eK.js +179 -0
  7. package/_Set-DrS_bbSV.js +6 -0
  8. package/_Uint8Array-D9R2N9Lp.js +98 -0
  9. package/_arrayIncludes-Dcl_29E6.js +25 -0
  10. package/_arrayPush-DBJIuK2V.js +8 -0
  11. package/_baseAssignValue-Bx1cxHj5.js +12 -0
  12. package/_baseClone-DRhywkxm.js +211 -0
  13. package/_baseExtremum-DodEaEyF.js +16 -0
  14. package/_baseFlatten-CD9NgrYE.js +72 -0
  15. package/_baseGet-bVwDaGrA.js +80 -0
  16. package/_baseGetTag-CxDaTem-.js +25 -0
  17. package/_baseIsEqual-C-FKsm1J.js +150 -0
  18. package/_baseIteratee-D0FhC5bC.js +95 -0
  19. package/_baseRest-D_eW2E0d.js +8 -0
  20. package/_baseSlice-M5RKzt1A.js +10 -0
  21. package/_baseSum-wEbgNeUs.js +10 -0
  22. package/_baseUniq-D3N8igOm.js +41 -0
  23. package/_cacheHas-Wgl-hw34.js +22 -0
  24. package/_commonjsHelpers-C6fGbg64.js +6 -0
  25. package/_createAggregator-BVj8IAuF.js +53 -0
  26. package/_defineProperty-BZU4WKA3.js +11 -0
  27. package/_getPrototype-BGBCg-aX.js +5 -0
  28. package/_getTag-B7R9qBo7.js +73 -0
  29. package/_isIterateeCall-Dm0VTAYy.js +13 -0
  30. package/_setToArray-Ck4YZu0Z.js +9 -0
  31. package/cloneDeep-fV59zwUf.js +8 -0
  32. package/components/AnnotationBody.js +35 -49
  33. package/components/AnnotationDetailPopover.js +30 -36
  34. package/components/AnnotationDetails.js +7 -7
  35. package/components/AnnotationEntry.js +35 -35
  36. package/components/AnnotationPreview.js +5 -5
  37. package/components/ClassificationChip.js +23 -44
  38. package/components/CountBadge.js +26 -31
  39. package/components/EnrichedCard.js +97 -110
  40. package/components/EnrichedChip.js +105 -130
  41. package/components/EnrichedTypography.js +107 -133
  42. package/components/ErrorBoundary.js +24 -28
  43. package/components/RetryFailedEnrichments.js +9 -10
  44. package/components/SourcePicker.js +49 -57
  45. package/components/actions/ActionForm.js +4 -4
  46. package/components/actions/ExecutePopover.js +59 -75
  47. package/components/actions/ResultModal.js +4 -4
  48. package/components/actions/form/schemaAdapter.js +23 -39
  49. package/components/actions/formats/FileResult.js +59 -86
  50. package/components/actions/formats/index.js +25 -29
  51. package/components/display/graph/ExpandMoreButton.js +10 -10
  52. package/components/display/graph/elements/NodeCard.js +91 -111
  53. package/components/display/graph/elements/NodeTag.js +13 -15
  54. package/components/display/graph/index.js +202 -261
  55. package/components/display/graph/visualizations/Leaf.js +70 -89
  56. package/components/display/graph/visualizations/cloud/index.js +81 -98
  57. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  58. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  59. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  60. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  61. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  62. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  63. package/components/display/graph/visualizations/icons/index.js +13 -14
  64. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  65. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  66. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  67. package/components/display/graph/visualizations/tree/index.js +306 -408
  68. package/components/display/icons/Iconified.js +12 -27
  69. package/components/display/json/index.js +4 -4
  70. package/components/display/markdown/index.js +5770 -8678
  71. package/components/enrichment/EnrichPopover.js +46 -54
  72. package/components/fetchers/Fetcher.js +123 -166
  73. package/components/fetchers/FetcherResultView.js +27 -31
  74. package/components/fetchers/PreviewModal.js +16 -17
  75. package/components/fetchers/StatusChip.js +17 -21
  76. package/components/group/Entry.js +11 -13
  77. package/components/group/Group.js +10 -13
  78. package/components/group/GroupControl.js +65 -76
  79. package/components/stats/QueryStatus.js +32 -45
  80. package/countBy-B3rNuG4T.js +8 -0
  81. package/data/event.js +4 -6
  82. package/database/globals.js +2 -2
  83. package/database/index.js +3 -3
  84. package/database/replication.js +4 -4
  85. package/get-Bil3mzRD.js +8 -0
  86. package/groupBy-CrJC7sGa.js +8 -0
  87. package/hooks/ClueActionContext.js +6 -6
  88. package/hooks/ClueComponentContext.js +23 -29
  89. package/hooks/ClueConfigProvider.js +12 -14
  90. package/hooks/ClueDatabaseContext.js +23 -35
  91. package/hooks/ClueEnrichContext.js +11 -11
  92. package/hooks/ClueFetcherContext.js +56 -83
  93. package/hooks/ClueGroupContext.js +14 -17
  94. package/hooks/CluePopupContext.js +5 -5
  95. package/hooks/ClueProvider.js +11 -13
  96. package/hooks/ClueUIPluginContext.js +35 -49
  97. package/hooks/selectors.js +7 -7
  98. package/hooks/useActionResult.js +3 -3
  99. package/hooks/useAnnotations.js +32 -48
  100. package/hooks/useClue.js +4 -6
  101. package/hooks/useClueActions.js +3 -3
  102. package/hooks/useClueConfig.js +4 -6
  103. package/hooks/useClueTypeConfig.js +24 -49
  104. package/hooks/useClueUIPlugins.js +7 -8
  105. package/hooks/useComparator.js +435 -722
  106. package/hooks/useErrors.js +18 -22
  107. package/hooks/useFetcherResult.js +24 -33
  108. package/hooks/useMyHighlights.js +36 -66
  109. package/hooks/useMyLocalStorage.js +37 -66
  110. package/iconify-Ptb5dTKy.js +1270 -0
  111. package/icons/Action.js +49 -66
  112. package/icons/Assessment.js +69 -85
  113. package/icons/Context.js +63 -77
  114. package/icons/Opinion.js +60 -76
  115. package/icons/iconMap.js +2 -2
  116. package/identity-ByMq8VxU.js +6 -0
  117. package/index-BH-gBhtO.js +2282 -0
  118. package/index-BM9Sve5T.js +571 -0
  119. package/index-Cj4d5cGz.js +357 -0
  120. package/index-Dh2PP9h8.js +11747 -0
  121. package/index-DoFpWPHo.js +975 -0
  122. package/index-DzVIklWY.js +6464 -0
  123. package/isArguments-BWcXOE6a.js +24 -0
  124. package/isArray-WzO_os3q.js +4 -0
  125. package/isEmpty-DKxrY-_M.js +22 -0
  126. package/isNil-CjWwlQS3.js +6 -0
  127. package/isObject-B53jY8Qg.js +7 -0
  128. package/isObjectLike-CYbdrIBr.js +6 -0
  129. package/isSymbol-DE1Kcy2M.js +9 -0
  130. package/last-7CdUxN0r.js +7 -0
  131. package/main.js +62 -62
  132. package/maxBy-BOWDkL_D.js +8 -0
  133. package/package.json +1 -1
  134. package/plugins/ClueUIPlugin.js +96 -163
  135. package/plugins/file/index.js +15 -15
  136. package/plugins/graph/index.js +26 -29
  137. package/plugins/image/index.js +24 -28
  138. package/plugins/json/index.js +21 -21
  139. package/plugins/markdown/index.js +18 -18
  140. package/plugins/registry.js +6 -6
  141. package/plugins/store.js +4 -4
  142. package/plugins/test/index.js +17 -17
  143. package/plugins/utils.js +12 -13
  144. package/replication-WkKbPdwG.js +8453 -0
  145. package/sessionStorage-DFMae61b.js +90 -0
  146. package/sortBy-BHe812lF.js +74 -0
  147. package/store-DClHBq7r.js +1169 -0
  148. package/sumBy-B7f_bP_k.js +8 -0
  149. package/text/Frequency.js +23 -42
  150. package/toFinite-CBrE65MP.js +14 -0
  151. package/toNumber-CxmWey0f.js +31 -0
  152. package/uniq-B4UZ671_.js +7 -0
  153. package/utils/chain.js +65 -92
  154. package/utils/classificationParser.js +256 -519
  155. package/utils/constants.js +11 -37
  156. package/utils/graph.js +45 -72
  157. package/utils/hashUtil.js +7 -7
  158. package/utils/line.js +81 -131
  159. package/utils/loggerUtil.js +3 -5
  160. package/utils/sessionStorage.js +7 -7
  161. package/utils/time.js +427 -447
  162. package/utils/utils.js +10 -10
  163. package/utils/window.js +10 -21
  164. package/utils-SpTOhPYl.js +147 -0
  165. package/ActionForm-CqKcnDWC.js +0 -6099
  166. package/AnnotationDetails-BlPd3T8k.js +0 -176
  167. package/AnnotationPreview-Bl447SKT.js +0 -188
  168. package/ClueEnrichContext-B3YrTCaJ.js +0 -567
  169. package/FlexOne-BSYAhhtG.js +0 -9
  170. package/_MapCache-kuEY_iOH.js +0 -220
  171. package/_Set-BrSMTlHn.js +0 -6
  172. package/_Uint8Array-OPpgYQj7.js +0 -123
  173. package/_arrayIncludes-BNqL-9ZP.js +0 -31
  174. package/_arrayPush-CBkQqaE_.js +0 -10
  175. package/_baseAssignValue-CNUVPOBW.js +0 -16
  176. package/_baseClone-9FaRd1R2.js +0 -287
  177. package/_baseExtremum-wOGT4Dgw.js +0 -18
  178. package/_baseFlatten-Co6QHDlG.js +0 -92
  179. package/_baseGet-Cmp6FztG.js +0 -109
  180. package/_baseGetTag-Hj-0NTYF.js +0 -44
  181. package/_baseIsEqual-1CpU47TZ.js +0 -211
  182. package/_baseIteratee-BN7Vbe5g.js +0 -126
  183. package/_baseRest-BZ_hQ9PC.js +0 -8
  184. package/_baseSlice-GAv_YFTT.js +0 -20
  185. package/_baseSum-D0WC1dN0.js +0 -13
  186. package/_baseUniq-BnvS3JHL.js +0 -63
  187. package/_cacheHas-_aF2y2Xv.js +0 -25
  188. package/_commonjsHelpers-CUmg6egw.js +0 -6
  189. package/_createAggregator-BUZrP_is.js +0 -63
  190. package/_defineProperty-DolZLKmv.js +0 -12
  191. package/_getPrototype-Bb4gm-5m.js +0 -5
  192. package/_getTag-CML_cXiN.js +0 -105
  193. package/_isIterateeCall-B1IFEqVv.js +0 -17
  194. package/_setToArray-CqyqC8ib.js +0 -10
  195. package/cloneDeep-l3UkXG5M.js +0 -8
  196. package/countBy-Bqcp3VCs.js +0 -14
  197. package/get-CdMThM8x.js +0 -8
  198. package/groupBy-BVV07EGQ.js +0 -14
  199. package/iconify-DJxl6dC-.js +0 -1789
  200. package/identity-CPGTqrE4.js +0 -6
  201. package/index-CAvu7vwt.js +0 -1172
  202. package/index-CVUD9o3t.js +0 -15768
  203. package/index-DUEubgWN.js +0 -464
  204. package/index-Dj1N4IQP.js +0 -9314
  205. package/index-DpJxD74E.js +0 -3272
  206. package/index-_gpzM2Px.js +0 -702
  207. package/isArguments-CuYlEuhP.js +0 -27
  208. package/isArray-RJPfgWqI.js +0 -4
  209. package/isEmpty-BE656RUK.js +0 -30
  210. package/isNil-CIubwp4T.js +0 -6
  211. package/isObject-FTY-5JQX.js +0 -7
  212. package/isObjectLike-CeENW9FN.js +0 -6
  213. package/isSymbol-D_H4HPZQ.js +0 -9
  214. package/last-CUCl67Im.js +0 -7
  215. package/maxBy-BjjQmX5t.js +0 -8
  216. package/replication--gLEZw8a.js +0 -11777
  217. package/sessionStorage-B68y-wnE.js +0 -140
  218. package/sortBy-B8JVsLQY.js +0 -95
  219. package/store-B9sjQbcS.js +0 -2163
  220. package/sumBy-D-HCzM2i.js +0 -8
  221. package/toFinite-meZTg4Su.js +0 -16
  222. package/toNumber-B5JaA1vX.js +0 -39
  223. package/uniq-CahZPAwp.js +0 -7
  224. package/utils-CEySTPtg.js +0 -224
@@ -1,126 +1,107 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { b as baseGetTag } from "../../../../_baseGetTag-Hj-0NTYF.js";
3
- import { i as isObjectLike } from "../../../../isObjectLike-CeENW9FN.js";
4
- import { useState, useMemo, useCallback, useEffect } from "react";
5
- var numberTag = "[object Number]";
6
- function isNumber(value) {
7
- return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
1
+ import { jsxs as U, jsx as b } from "react/jsx-runtime";
2
+ import { b as _ } from "../../../../_baseGetTag-CxDaTem-.js";
3
+ import { i as G } from "../../../../isObjectLike-CYbdrIBr.js";
4
+ import { useState as N, useMemo as Z, useCallback as M, useEffect as d } from "react";
5
+ var g = "[object Number]";
6
+ function q(s) {
7
+ return typeof s == "number" || G(s) && _(s) == g;
8
8
  }
9
- const DEFAULT_NODE_RADIUS = 10;
10
- const Leaf = ({
11
- nodeId,
12
- label = nodeId,
13
- x,
14
- y,
15
- height,
16
- nodeRadius = DEFAULT_NODE_RADIUS,
17
- nodeColor,
18
- nodeOpacity = 1,
19
- letterSize,
20
- letterWidth,
21
- textColor,
22
- style = {},
23
- selected = false,
24
- alwaysShowText = false,
25
- onHoverChanged,
26
- onClick,
27
- children
9
+ const v = 10, K = ({
10
+ nodeId: s,
11
+ label: x = s,
12
+ x: r,
13
+ y: a,
14
+ height: h,
15
+ nodeRadius: k = v,
16
+ nodeColor: $,
17
+ nodeOpacity: m = 1,
18
+ letterSize: l,
19
+ letterWidth: O,
20
+ textColor: W,
21
+ style: t = {},
22
+ selected: p = !1,
23
+ alwaysShowText: j = !1,
24
+ onHoverChanged: i,
25
+ onClick: o,
26
+ children: A
28
27
  }) => {
29
- const [isSelected, setIsSelected] = useState(selected);
30
- const [isHovered, setIsHovered] = useState(false);
31
- const classNames = useMemo(() => {
32
- const _classNames = ["node"];
33
- if (isHovered) {
34
- _classNames.push("hover");
35
- }
36
- if (isSelected) {
37
- _classNames.push("selected");
38
- }
39
- return _classNames;
40
- }, [isHovered, isSelected]);
41
- const handleOnClick = useCallback(
42
- (event) => {
43
- onClick == null ? void 0 : onClick(nodeId, !isSelected, event);
44
- setIsSelected(!isSelected);
28
+ const [c, n] = N(p), [u, D] = N(!1), E = Z(() => {
29
+ const e = ["node"];
30
+ return u && e.push("hover"), c && e.push("selected"), e;
31
+ }, [u, c]), S = M(
32
+ (e) => {
33
+ o == null || o(s, !c, e), n(!c);
45
34
  },
46
- [nodeId, onClick, isSelected]
47
- );
48
- const handleOnHoverChanged = useCallback(
49
- (value) => {
50
- setIsHovered(value);
51
- onHoverChanged == null ? void 0 : onHoverChanged(nodeId, value);
35
+ [s, o, c]
36
+ ), L = M(
37
+ (e) => {
38
+ D(e), i == null || i(s, e);
52
39
  },
53
- [nodeId, onHoverChanged]
40
+ [s, i]
54
41
  );
55
- useEffect(() => setIsSelected(selected), [selected]);
56
- let strokeWidth = `${nodeRadius}px`;
57
- if (style.strokeWidth) {
58
- if (isNumber(style.strokeWidth)) {
59
- strokeWidth = `${nodeRadius * style.strokeWidth}px`;
60
- } else {
61
- strokeWidth = style.strokeWidth;
62
- }
63
- }
64
- return /* @__PURE__ */ jsxs(
42
+ d(() => n(p), [p]);
43
+ let f = `${k}px`;
44
+ return t.strokeWidth && (q(t.strokeWidth) ? f = `${k * t.strokeWidth}px` : f = t.strokeWidth), /* @__PURE__ */ U(
65
45
  "g",
66
46
  {
67
- id: "node-" + nodeId.replace(/[^A-Za-z0-9]*/g, ""),
47
+ id: "node-" + s.replace(/[^A-Za-z0-9]*/g, ""),
68
48
  style: { strokeLinecap: "round" },
69
- className: classNames.join(" "),
70
- onClick: handleOnClick,
71
- onMouseOver: () => handleOnHoverChanged(true),
72
- onMouseLeave: () => handleOnHoverChanged(false),
49
+ className: E.join(" "),
50
+ onClick: S,
51
+ onMouseOver: () => L(!0),
52
+ onMouseLeave: () => L(!1),
73
53
  children: [
74
- children,
75
- /* @__PURE__ */ jsx(
54
+ A,
55
+ /* @__PURE__ */ b(
76
56
  "path",
77
57
  {
78
58
  className: "border",
79
- d: `M ${x} ${y} L ${x} ${y + Math.max(height, 0)}`,
59
+ d: `M ${r} ${a} L ${r} ${a + Math.max(h, 0)}`,
80
60
  style: {
81
- strokeOpacity: nodeOpacity,
82
- ...style,
83
- strokeWidth: `calc(${strokeWidth} * 2)`,
84
- stroke: style.stroke ?? nodeColor.border
61
+ strokeOpacity: m,
62
+ ...t,
63
+ strokeWidth: `calc(${f} * 2)`,
64
+ stroke: t.stroke ?? $.border
85
65
  }
86
66
  },
87
- nodeId + "-border"
67
+ s + "-border"
88
68
  ),
89
- /* @__PURE__ */ jsx(
69
+ /* @__PURE__ */ b(
90
70
  "path",
91
71
  {
92
72
  className: "center",
93
- d: `M ${x} ${y} L ${x} ${y + Math.max(height, 0)}`,
73
+ d: `M ${r} ${a} L ${r} ${a + Math.max(h, 0)}`,
94
74
  style: {
95
- strokeOpacity: nodeOpacity,
96
- ...style,
97
- strokeWidth,
98
- stroke: style.fill ?? nodeColor.center
75
+ strokeOpacity: m,
76
+ ...t,
77
+ strokeWidth: f,
78
+ stroke: t.fill ?? $.center
99
79
  }
100
80
  },
101
- nodeId + "-middle"
81
+ s + "-middle"
102
82
  ),
103
- (isHovered || alwaysShowText) && label.split("\n").reverse().map((_label, index, arr) => /* @__PURE__ */ jsx(
83
+ (u || j) && x.split(`
84
+ `).reverse().map((e, T, F) => /* @__PURE__ */ b(
104
85
  "text",
105
86
  {
106
- x: x + letterWidth,
107
- y: y - letterSize / 2 + arr.length - index * letterSize,
108
- fill: textColor,
87
+ x: r + O,
88
+ y: a - l / 2 + F.length - T * l,
89
+ fill: W,
109
90
  style: {
110
91
  cursor: "default",
111
92
  fontFamily: '"Lucida Console", monospace',
112
- fontSize: letterSize + "px",
113
- fillOpacity: nodeOpacity
93
+ fontSize: l + "px",
94
+ fillOpacity: m
114
95
  },
115
- children: _label
96
+ children: e
116
97
  },
117
- nodeId + "-label-" + _label
98
+ s + "-label-" + e
118
99
  ))
119
100
  ]
120
101
  },
121
- nodeId
102
+ s
122
103
  );
123
104
  };
124
105
  export {
125
- Leaf as default
106
+ K as default
126
107
  };
@@ -1,14 +1,14 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { o as ordinal, d as d3, S as Spectral, a as index, h as hierarchy } from "../../../../../index-CVUD9o3t.js";
3
- import useMyHighlights from "../../../../../hooks/useMyHighlights.js";
4
- import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
5
- import { StorageKey } from "../../../../../utils/constants.js";
6
- import { cyrb53 } from "../../../../../utils/graph.js";
7
- import { c as countBy } from "../../../../../countBy-Bqcp3VCs.js";
8
- import { s as sumBy } from "../../../../../sumBy-D-HCzM2i.js";
9
- import { memo, useRef, useMemo, useCallback } from "react";
10
- import Leaf from "../Leaf.js";
11
- const DEFAULT_OPTIONS = {
1
+ import { jsx as a, jsxs as x } from "react/jsx-runtime";
2
+ import { o as I, d as N, S as B, a as T, h as _ } from "../../../../../index-Dh2PP9h8.js";
3
+ import A from "../../../../../hooks/useMyHighlights.js";
4
+ import { useMyLocalStorageItem as D } from "../../../../../hooks/useMyLocalStorage.js";
5
+ import { StorageKey as F } from "../../../../../utils/constants.js";
6
+ import { cyrb53 as K } from "../../../../../utils/graph.js";
7
+ import { c as U } from "../../../../../countBy-B3rNuG4T.js";
8
+ import { s as X } from "../../../../../sumBy-B7f_bP_k.js";
9
+ import { memo as Y, useRef as p, useMemo as c, useCallback as q } from "react";
10
+ import G from "../Leaf.js";
11
+ const u = {
12
12
  width: "100%",
13
13
  backgroundColor: "grey",
14
14
  textColor: "black",
@@ -23,119 +23,102 @@ const DEFAULT_OPTIONS = {
23
23
  circlePadding: null
24
24
  // We'll make this dynamic
25
25
  };
26
- DEFAULT_OPTIONS.circlePadding = 3 * DEFAULT_OPTIONS.nodeRadius;
27
- const Cloud = ({ svgRef, graph, options = {} }) => {
26
+ u.circlePadding = 3 * u.nodeRadius;
27
+ const J = ({ svgRef: S, graph: h, options: b = {} }) => {
28
28
  const {
29
- width,
30
- backgroundColor,
31
- textColor,
32
- letterSize,
33
- letterWidth,
34
- circlePadding,
35
- nodeRadius,
36
- nodeColor,
37
- lineWidth
29
+ width: M,
30
+ backgroundColor: O,
31
+ textColor: $,
32
+ letterSize: m,
33
+ letterWidth: v,
34
+ circlePadding: g,
35
+ nodeRadius: d,
36
+ nodeColor: L,
37
+ lineWidth: f
38
38
  } = {
39
- ...DEFAULT_OPTIONS,
40
- ...options
41
- };
42
- const { onNodeHoveredChanged, onNodeClicked, nodeOpacities, highlightedPath } = useMyHighlights(graph);
43
- const [colorScheme] = useMyLocalStorageItem(StorageKey.COLOR_SCHEME, "Spectral");
44
- const currentX = useRef(2 * nodeRadius);
45
- const currentY = useRef(letterSize + nodeRadius);
46
- const nodeLocations = useRef({});
47
- const nodes = useMemo(
48
- () => graph.data.flatMap(
49
- (cloud, cloudIndex) => cloud.map((node) => ({
50
- ...node,
51
- cloud: cloudIndex.toString()
39
+ ...u,
40
+ ...b
41
+ }, { onNodeHoveredChanged: W, onNodeClicked: w, nodeOpacities: z, highlightedPath: s } = A(h), [y] = D(F.COLOR_SCHEME, "Spectral"), P = p(2 * d), R = p(m + d), j = p({}), i = c(
42
+ () => h.data.flatMap(
43
+ (t, e) => t.map((r) => ({
44
+ ...r,
45
+ cloud: e.toString()
52
46
  }))
53
47
  ),
54
- [graph.data]
55
- );
56
- const clouds = useMemo(() => countBy(nodes, (node) => node.cloud), [nodes]);
57
- const colors = useMemo(
58
- () => ordinal(
59
- Object.keys(clouds).map((cloud) => (d3[`interpolate${colorScheme}`] ?? Spectral)(cyrb53(cloud)))
48
+ [h.data]
49
+ ), n = c(() => U(i, (t) => t.cloud), [i]), H = c(
50
+ () => I(
51
+ Object.keys(n).map((t) => (N[`interpolate${y}`] ?? B)(K(t)))
60
52
  ),
61
- [clouds, colorScheme]
62
- );
63
- const links = useMemo(
64
- () => nodes.flatMap(
65
- (node) => ((node == null ? void 0 : node.edges) ?? []).map((parent) => ({
66
- source: node.id,
67
- target: parent
53
+ [n, y]
54
+ ), E = c(
55
+ () => i.flatMap(
56
+ (t) => ((t == null ? void 0 : t.edges) ?? []).map((e) => ({
57
+ source: t.id,
58
+ target: e
68
59
  }))
69
60
  ),
70
- [nodes]
71
- );
72
- const pack = useMemo(() => index().size([600, 600]).padding(circlePadding), [circlePadding]);
73
- const cloudLocations = useMemo(() => {
74
- const data = Object.entries(clouds).map(([id]) => ({
75
- id,
76
- children: nodes.filter((node) => node.cloud === id).map((node) => ({
77
- ...node,
61
+ [i]
62
+ ), k = c(() => T().size([600, 600]).padding(g), [g]), l = c(() => {
63
+ const t = Object.entries(n).map(([e]) => ({
64
+ id: e,
65
+ children: i.filter((r) => r.cloud === e).map((r) => ({
66
+ ...r,
78
67
  value: 1
79
68
  }))
80
69
  }));
81
- return pack(
82
- hierarchy({ children: data }).sum((d) => d.children ? sumBy(d.children, (c) => c.value) : d.value)
70
+ return k(
71
+ _({ children: t }).sum((e) => e.children ? X(e.children, (r) => r.value) : e.value)
83
72
  ).children;
84
- }, [clouds, nodes, pack]);
85
- const opacities = useCallback(
86
- (link) => highlightedPath.size === 0 || highlightedPath.has(link.source) && highlightedPath.has(link.target) ? 1 : 0.2,
87
- [highlightedPath]
73
+ }, [n, i, k]), C = q(
74
+ (t) => s.size === 0 || s.has(t.source) && s.has(t.target) ? 1 : 0.2,
75
+ [s]
88
76
  );
89
- currentX.current = 2 * nodeRadius;
90
- currentY.current = letterSize + nodeRadius;
91
- nodeLocations.current = {};
92
- return /* @__PURE__ */ jsx("svg", { id: "viz", ref: svgRef, width, height: 600, style: { backgroundColor }, children: /* @__PURE__ */ jsxs("g", { id: "view", children: [
93
- cloudLocations.map((cloud) => /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("circle", { cx: cloud.x, cy: cloud.y, r: cloud.r, strokeWidth: 4, stroke: colors(cloud.data.id), fill: "none" }) }, cloud.data.id)),
94
- links.map((link) => {
95
- const source = cloudLocations.flatMap((c) => c.children).find((node) => node.data.id === link.source);
96
- const target = cloudLocations.flatMap((c) => c.children).find((node) => node.data.id === link.target);
97
- return /* @__PURE__ */ jsxs("g", { children: [
98
- /* @__PURE__ */ jsx(
77
+ return P.current = 2 * d, R.current = m + d, j.current = {}, /* @__PURE__ */ a("svg", { id: "viz", ref: S, width: M, height: 600, style: { backgroundColor: O }, children: /* @__PURE__ */ x("g", { id: "view", children: [
78
+ l.map((t) => /* @__PURE__ */ a("g", { children: /* @__PURE__ */ a("circle", { cx: t.x, cy: t.y, r: t.r, strokeWidth: 4, stroke: H(t.data.id), fill: "none" }) }, t.data.id)),
79
+ E.map((t) => {
80
+ const e = l.flatMap((o) => o.children).find((o) => o.data.id === t.source), r = l.flatMap((o) => o.children).find((o) => o.data.id === t.target);
81
+ return /* @__PURE__ */ x("g", { children: [
82
+ /* @__PURE__ */ a(
99
83
  "path",
100
84
  {
101
- d: `M ${source.x} ${source.y} L ${target.x} ${target.y}`,
85
+ d: `M ${e.x} ${e.y} L ${r.x} ${r.y}`,
102
86
  stroke: "black",
103
- strokeWidth: lineWidth + 3,
104
- strokeOpacity: opacities(link)
87
+ strokeWidth: f + 3,
88
+ strokeOpacity: C(t)
105
89
  }
106
90
  ),
107
- /* @__PURE__ */ jsx(
91
+ /* @__PURE__ */ a(
108
92
  "path",
109
93
  {
110
- d: `M ${source.x} ${source.y} L ${target.x} ${target.y}`,
94
+ d: `M ${e.x} ${e.y} L ${r.x} ${r.y}`,
111
95
  stroke: "white",
112
- strokeWidth: lineWidth,
113
- strokeOpacity: opacities(link)
96
+ strokeWidth: f,
97
+ strokeOpacity: C(t)
114
98
  }
115
99
  )
116
- ] }, source.data.id + target.data.id);
100
+ ] }, e.data.id + r.data.id);
117
101
  }),
118
- cloudLocations.map((cloud) => /* @__PURE__ */ jsx("g", { children: cloud.children.map((node) => /* @__PURE__ */ jsx(
119
- Leaf,
102
+ l.map((t) => /* @__PURE__ */ a("g", { children: t.children.map((e) => /* @__PURE__ */ a(
103
+ G,
120
104
  {
121
- nodeId: node.data.id,
105
+ nodeId: e.data.id,
122
106
  height: 0,
123
- x: node.x,
124
- y: node.y,
125
- nodeRadius,
126
- nodeColor,
127
- nodeOpacity: nodeOpacities(node.data.id),
128
- letterSize,
129
- letterWidth,
130
- textColor,
131
- onHoverChanged: onNodeHoveredChanged,
132
- onClick: onNodeClicked
107
+ x: e.x,
108
+ y: e.y,
109
+ nodeRadius: d,
110
+ nodeColor: L,
111
+ nodeOpacity: z(e.data.id),
112
+ letterSize: m,
113
+ letterWidth: v,
114
+ textColor: $,
115
+ onHoverChanged: W,
116
+ onClick: w
133
117
  },
134
- node.data.id
135
- )) }, cloud.id))
118
+ e.data.id
119
+ )) }, t.id))
136
120
  ] }) });
137
- };
138
- const Cloud$1 = memo(Cloud);
121
+ }, dt = Y(J);
139
122
  export {
140
- Cloud$1 as default
123
+ dt as default
141
124
  };
@@ -1,37 +1,32 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
3
- const DEFAULTS = {
1
+ import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as x } from "react";
3
+ const d = {
4
4
  size: 20
5
- };
6
- const BaseIcon = (props) => {
7
- const { width, height, size } = {
8
- ...DEFAULTS,
9
- ...props
10
- };
11
- const x = (props.x ?? 0) - (width ?? size) / 2;
12
- const y = (props.y ?? 0) - (height ?? size) / 2;
13
- const trimmedProps = useMemo(() => {
14
- const _props = { ...props };
15
- delete _props.circleStyle;
16
- return _props;
17
- }, [props]);
18
- return /* @__PURE__ */ jsxs("g", { children: [
19
- /* @__PURE__ */ jsx("circle", { cx: props.x, cy: props.y, r: size / 2, style: props.circleStyle ?? {} }),
20
- /* @__PURE__ */ jsx(
5
+ }, y = (e) => {
6
+ const { width: c, height: i, size: t } = {
7
+ ...d,
8
+ ...e
9
+ }, l = (e.x ?? 0) - (c ?? t) / 2, r = (e.y ?? 0) - (i ?? t) / 2, h = x(() => {
10
+ const n = { ...e };
11
+ return delete n.circleStyle, n;
12
+ }, [e]);
13
+ return /* @__PURE__ */ o("g", { children: [
14
+ /* @__PURE__ */ s("circle", { cx: e.x, cy: e.y, r: t / 2, style: e.circleStyle ?? {} }),
15
+ /* @__PURE__ */ s(
21
16
  "svg",
22
17
  {
23
18
  xmlns: "http://www.w3.org/2000/svg",
24
19
  viewBox: "0 -960 960 960",
25
- width: width ?? size,
26
- height: height ?? size,
27
- ...trimmedProps,
28
- x,
29
- y,
30
- children: props.children
20
+ width: c ?? t,
21
+ height: i ?? t,
22
+ ...h,
23
+ x: l,
24
+ y: r,
25
+ children: e.children
31
26
  }
32
27
  )
33
28
  ] });
34
29
  };
35
30
  export {
36
- BaseIcon as default
31
+ y as default
37
32
  };
@@ -1,18 +1,18 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@mui/material";
3
- import BaseIcon from "./BaseIcon.js";
4
- const BugIcon = (props) => {
5
- const theme = useTheme();
6
- return /* @__PURE__ */ jsx(
7
- BaseIcon,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTheme as h } from "@mui/material";
3
+ import l from "./BaseIcon.js";
4
+ const v = (t) => {
5
+ const e = h();
6
+ return /* @__PURE__ */ r(
7
+ l,
8
8
  {
9
- ...props,
10
- style: { fill: theme.palette.getContrastText(theme.palette.error.dark), ...props.style },
11
- circleStyle: { fill: theme.palette.error.dark, ...props.style },
12
- children: /* @__PURE__ */ jsx("path", { d: "M480-200q66 0 113-47t47-113v-160q0-66-47-113t-113-47q-66 0-113 47t-47 113v160q0 66 47 113t113 47Zm-80-120h160v-80H400v80Zm0-160h160v-80H400v80Zm80 40Zm0 320q-65 0-120.5-32T272-240H160v-80h84q-3-20-3.5-40t-.5-40h-80v-80h80q0-20 .5-40t3.5-40h-84v-80h112q14-23 31.5-43t40.5-35l-64-66 56-56 86 86q28-9 57-9t57 9l88-86 56 56-66 66q23 15 41.5 34.5T688-640h112v80h-84q3 20 3.5 40t.5 40h80v80h-80q0 20-.5 40t-3.5 40h84v80H688q-32 56-87.5 88T480-120Z" })
9
+ ...t,
10
+ style: { fill: e.palette.getContrastText(e.palette.error.dark), ...t.style },
11
+ circleStyle: { fill: e.palette.error.dark, ...t.style },
12
+ children: /* @__PURE__ */ r("path", { d: "M480-200q66 0 113-47t47-113v-160q0-66-47-113t-113-47q-66 0-113 47t-47 113v160q0 66 47 113t113 47Zm-80-120h160v-80H400v80Zm0-160h160v-80H400v80Zm80 40Zm0 320q-65 0-120.5-32T272-240H160v-80h84q-3-20-3.5-40t-.5-40h-80v-80h80q0-20 .5-40t3.5-40h-84v-80h112q14-23 31.5-43t40.5-35l-64-66 56-56 86 86q28-9 57-9t57 9l88-86 56 56-66 66q23 15 41.5 34.5T688-640h112v80h-84q3 20 3.5 40t.5 40h80v80h-80q0 20-.5 40t-3.5 40h84v80H688q-32 56-87.5 88T480-120Z" })
13
13
  }
14
14
  );
15
15
  };
16
16
  export {
17
- BugIcon as default
17
+ v as default
18
18
  };
@@ -1,15 +1,15 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@mui/material";
3
- import BaseIcon from "./BaseIcon.js";
4
- const HostIcon = (props) => {
5
- const theme = useTheme();
6
- return /* @__PURE__ */ jsx(
7
- BaseIcon,
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { useTheme as a } from "@mui/material";
3
+ import r from "./BaseIcon.js";
4
+ const n = (t) => {
5
+ const e = a();
6
+ return /* @__PURE__ */ l(
7
+ r,
8
8
  {
9
- ...props,
10
- style: { fill: theme.palette.getContrastText(theme.palette.info.dark), ...props.style },
11
- circleStyle: { fill: theme.palette.info.dark, ...props.style },
12
- children: /* @__PURE__ */ jsx(
9
+ ...t,
10
+ style: { fill: e.palette.getContrastText(e.palette.info.dark), ...t.style },
11
+ circleStyle: { fill: e.palette.info.dark, ...t.style },
12
+ children: /* @__PURE__ */ l(
13
13
  "path",
14
14
  {
15
15
  style: { transform: "scale(0.75) translateX(16%) translateY(-18%)" },
@@ -20,5 +20,5 @@ const HostIcon = (props) => {
20
20
  );
21
21
  };
22
22
  export {
23
- HostIcon as default
23
+ n as default
24
24
  };
@@ -1,15 +1,15 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@mui/material";
3
- import BaseIcon from "./BaseIcon.js";
4
- const NetworkIcon = (props) => {
5
- const theme = useTheme();
6
- return /* @__PURE__ */ jsx(
7
- BaseIcon,
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { useTheme as v } from "@mui/material";
3
+ import r from "./BaseIcon.js";
4
+ const s = (t) => {
5
+ const e = v();
6
+ return /* @__PURE__ */ l(
7
+ r,
8
8
  {
9
- ...props,
10
- style: { fill: theme.palette.getContrastText(theme.palette.info.dark), ...props.style },
11
- circleStyle: { fill: theme.palette.info.dark, ...props.style },
12
- children: /* @__PURE__ */ jsx(
9
+ ...t,
10
+ style: { fill: e.palette.getContrastText(e.palette.info.dark), ...t.style },
11
+ circleStyle: { fill: e.palette.info.dark, ...t.style },
12
+ children: /* @__PURE__ */ l(
13
13
  "path",
14
14
  {
15
15
  style: { transform: "scale(0.75) translateX(16%) translateY(-18%)" },
@@ -20,5 +20,5 @@ const NetworkIcon = (props) => {
20
20
  );
21
21
  };
22
22
  export {
23
- NetworkIcon as default
23
+ s as default
24
24
  };
@@ -1,18 +1,18 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTheme, colors } from "@mui/material";
3
- import BaseIcon from "./BaseIcon.js";
4
- const ProcessIcon = (props) => {
5
- const theme = useTheme();
6
- return /* @__PURE__ */ jsx(
7
- BaseIcon,
1
+ import { jsx as v } from "react/jsx-runtime";
2
+ import { useTheme as r, colors as e } from "@mui/material";
3
+ import l from "./BaseIcon.js";
4
+ const c = (h) => {
5
+ const t = r();
6
+ return /* @__PURE__ */ v(
7
+ l,
8
8
  {
9
- ...props,
10
- style: { fill: theme.palette.getContrastText(colors.grey[500]), ...props.style },
11
- circleStyle: { fill: colors.grey[500], ...props.style },
12
- children: /* @__PURE__ */ jsx("path", { d: "M360-360v-240h240v240H360Zm80-80h80v-80h-80v80Zm-80 320v-80h-80q-33 0-56.5-23.5T200-280v-80h-80v-80h80v-80h-80v-80h80v-80q0-33 23.5-56.5T280-760h80v-80h80v80h80v-80h80v80h80q33 0 56.5 23.5T760-680v80h80v80h-80v80h80v80h-80v80q0 33-23.5 56.5T680-200h-80v80h-80v-80h-80v80h-80Zm320-160v-400H280v400h400ZM480-480Z" })
9
+ ...h,
10
+ style: { fill: t.palette.getContrastText(e.grey[500]), ...h.style },
11
+ circleStyle: { fill: e.grey[500], ...h.style },
12
+ children: /* @__PURE__ */ v("path", { d: "M360-360v-240h240v240H360Zm80-80h80v-80h-80v80Zm-80 320v-80h-80q-33 0-56.5-23.5T200-280v-80h-80v-80h80v-80h-80v-80h80v-80q0-33 23.5-56.5T280-760h80v-80h80v80h80v-80h80v80h80q33 0 56.5 23.5T760-680v80h80v80h-80v80h80v80h-80v80q0 33-23.5 56.5T680-200h-80v80h-80v-80h-80v80h-80Zm320-160v-400H280v400h400ZM480-480Z" })
13
13
  }
14
14
  );
15
15
  };
16
16
  export {
17
- ProcessIcon as default
17
+ c as default
18
18
  };
@@ -1,19 +1,19 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@mui/material";
3
- import BaseIcon from "./BaseIcon.js";
4
- const TargetIcon = (props) => {
5
- const theme = useTheme();
6
- return /* @__PURE__ */ jsx(
7
- BaseIcon,
1
+ import { jsx as q } from "react/jsx-runtime";
2
+ import { useTheme as T } from "@mui/material";
3
+ import l from "./BaseIcon.js";
4
+ const o = (t) => {
5
+ const e = T();
6
+ return /* @__PURE__ */ q(
7
+ l,
8
8
  {
9
- ...props,
10
- ...props,
11
- style: { fill: theme.palette.getContrastText(theme.palette.info.dark), ...props.style },
12
- circleStyle: { fill: theme.palette.info.dark, ...props.style },
13
- children: /* @__PURE__ */ jsx("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-80q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Zm0-80q66 0 113-47t47-113q0-66-47-113t-113-47q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Z" })
9
+ ...t,
10
+ ...t,
11
+ style: { fill: e.palette.getContrastText(e.palette.info.dark), ...t.style },
12
+ circleStyle: { fill: e.palette.info.dark, ...t.style },
13
+ children: /* @__PURE__ */ q("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-80q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Zm0-80q66 0 113-47t47-113q0-66-47-113t-113-47q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Z" })
14
14
  }
15
15
  );
16
16
  };
17
17
  export {
18
- TargetIcon as default
18
+ o as default
19
19
  };