@backbay/glia 0.2.0-alpha.6 → 0.2.0-alpha.8
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/audio/index.js +1145 -5
- package/dist/audio/index.js.map +1 -1
- package/dist/components/index.js +3187 -10
- package/dist/components/index.js.map +1 -1
- package/dist/core.js +19714 -12
- package/dist/core.js.map +1 -1
- package/dist/emotion/index.js +1 -1
- package/dist/emotion/index.js.map +1 -1
- package/dist/hooks/index.js +941 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.js +31841 -183
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.js +21111 -57
- package/dist/primitives/index.js.map +1 -1
- package/dist/protocol/index.js +360 -2
- package/dist/protocol/index.js.map +1 -1
- package/dist/speakeasy/index.js +2786 -38
- package/dist/speakeasy/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +1150 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/vision/index.js +370 -2
- package/dist/vision/index.js.map +1 -1
- package/dist/workspace/index.js +16824 -2
- package/dist/workspace/index.js.map +1 -1
- package/package.json +16 -10
- package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
- package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
- package/dist/BentoGrid-CDARICNM.js +0 -6
- package/dist/BentoGrid-CDARICNM.js.map +0 -1
- package/dist/CommandPalette-JCWJKRBY.js +0 -6
- package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
- package/dist/Glass-H4X4ZI4P.js +0 -7
- package/dist/Glass-H4X4ZI4P.js.map +0 -1
- package/dist/GlitchText-KLQ57PPY.js +0 -6
- package/dist/GlitchText-KLQ57PPY.js.map +0 -1
- package/dist/GlowButton-VGBPMZO7.js +0 -6
- package/dist/GlowButton-VGBPMZO7.js.map +0 -1
- package/dist/Graph3D-GO7N2EZQ.js +0 -540
- package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
- package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
- package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
- package/dist/KPIStat-PBQK27ZB.js +0 -6
- package/dist/KPIStat-PBQK27ZB.js.map +0 -1
- package/dist/NeonToast-W5F7MU3U.js +0 -6
- package/dist/NeonToast-W5F7MU3U.js.map +0 -1
- package/dist/ParticleField-WK6CNHWU.js +0 -51
- package/dist/ParticleField-WK6CNHWU.js.map +0 -1
- package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
- package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
- package/dist/ThreeDCard-VH5I3SSY.js +0 -6
- package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
- package/dist/TypingAnimation-GIWOHPIX.js +0 -6
- package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
- package/dist/alert-dialog-QOSYBIIE.js +0 -19
- package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
- package/dist/avatar-N5R37PCU.js +0 -10
- package/dist/avatar-N5R37PCU.js.map +0 -1
- package/dist/badge-GTVIIGPY.js +0 -8
- package/dist/badge-GTVIIGPY.js.map +0 -1
- package/dist/button-D7IMSV2D.js +0 -8
- package/dist/button-D7IMSV2D.js.map +0 -1
- package/dist/chunk-3CMPQOMY.js +0 -69
- package/dist/chunk-3CMPQOMY.js.map +0 -1
- package/dist/chunk-3OQT6IYR.js +0 -41
- package/dist/chunk-3OQT6IYR.js.map +0 -1
- package/dist/chunk-43B2WVLS.js +0 -85
- package/dist/chunk-43B2WVLS.js.map +0 -1
- package/dist/chunk-4SRFO5W3.js +0 -121
- package/dist/chunk-4SRFO5W3.js.map +0 -1
- package/dist/chunk-5IZELOOU.js +0 -362
- package/dist/chunk-5IZELOOU.js.map +0 -1
- package/dist/chunk-6DM4ACSS.js +0 -154
- package/dist/chunk-6DM4ACSS.js.map +0 -1
- package/dist/chunk-6IGT34PC.js +0 -50
- package/dist/chunk-6IGT34PC.js.map +0 -1
- package/dist/chunk-6RKBCJHN.js +0 -194
- package/dist/chunk-6RKBCJHN.js.map +0 -1
- package/dist/chunk-6RX2WGCO.js +0 -108
- package/dist/chunk-6RX2WGCO.js.map +0 -1
- package/dist/chunk-7K4WZM3U.js +0 -189
- package/dist/chunk-7K4WZM3U.js.map +0 -1
- package/dist/chunk-7MDBHJPT.js +0 -407
- package/dist/chunk-7MDBHJPT.js.map +0 -1
- package/dist/chunk-7UQD6ROV.js +0 -9
- package/dist/chunk-7UQD6ROV.js.map +0 -1
- package/dist/chunk-AFNIVLZP.js +0 -1069
- package/dist/chunk-AFNIVLZP.js.map +0 -1
- package/dist/chunk-ANWYRO6A.js +0 -407
- package/dist/chunk-ANWYRO6A.js.map +0 -1
- package/dist/chunk-DIXPOHDO.js +0 -71
- package/dist/chunk-DIXPOHDO.js.map +0 -1
- package/dist/chunk-DWYMKYPI.js +0 -3
- package/dist/chunk-DWYMKYPI.js.map +0 -1
- package/dist/chunk-E3NVDCZG.js +0 -280
- package/dist/chunk-E3NVDCZG.js.map +0 -1
- package/dist/chunk-EBM7YBKL.js +0 -399
- package/dist/chunk-EBM7YBKL.js.map +0 -1
- package/dist/chunk-EPAM7IWW.js +0 -294
- package/dist/chunk-EPAM7IWW.js.map +0 -1
- package/dist/chunk-EXQ7GYRS.js +0 -134
- package/dist/chunk-EXQ7GYRS.js.map +0 -1
- package/dist/chunk-F4QTUZ3C.js +0 -136
- package/dist/chunk-F4QTUZ3C.js.map +0 -1
- package/dist/chunk-FEW533R2.js +0 -105
- package/dist/chunk-FEW533R2.js.map +0 -1
- package/dist/chunk-FFZLJKC7.js +0 -270
- package/dist/chunk-FFZLJKC7.js.map +0 -1
- package/dist/chunk-GEAMOBF7.js +0 -8486
- package/dist/chunk-GEAMOBF7.js.map +0 -1
- package/dist/chunk-GRTRSCTD.js +0 -74
- package/dist/chunk-GRTRSCTD.js.map +0 -1
- package/dist/chunk-IKGYOGLK.js +0 -16
- package/dist/chunk-IKGYOGLK.js.map +0 -1
- package/dist/chunk-IQ7WYWVJ.js +0 -73
- package/dist/chunk-IQ7WYWVJ.js.map +0 -1
- package/dist/chunk-IXIVWQLF.js +0 -543
- package/dist/chunk-IXIVWQLF.js.map +0 -1
- package/dist/chunk-JCJU57RC.js +0 -115
- package/dist/chunk-JCJU57RC.js.map +0 -1
- package/dist/chunk-KORSTBU4.js +0 -117
- package/dist/chunk-KORSTBU4.js.map +0 -1
- package/dist/chunk-KSEZ6UM2.js +0 -235
- package/dist/chunk-KSEZ6UM2.js.map +0 -1
- package/dist/chunk-MHPF7R3O.js +0 -1376
- package/dist/chunk-MHPF7R3O.js.map +0 -1
- package/dist/chunk-MPC5IH7E.js +0 -81
- package/dist/chunk-MPC5IH7E.js.map +0 -1
- package/dist/chunk-MQIU2NYA.js +0 -114
- package/dist/chunk-MQIU2NYA.js.map +0 -1
- package/dist/chunk-NYMBJOGR.js +0 -2192
- package/dist/chunk-NYMBJOGR.js.map +0 -1
- package/dist/chunk-OBZD2M3C.js +0 -169
- package/dist/chunk-OBZD2M3C.js.map +0 -1
- package/dist/chunk-ODM2AG6G.js +0 -176
- package/dist/chunk-ODM2AG6G.js.map +0 -1
- package/dist/chunk-ONDKF5LP.js +0 -53
- package/dist/chunk-ONDKF5LP.js.map +0 -1
- package/dist/chunk-P25YCWQB.js +0 -41
- package/dist/chunk-P25YCWQB.js.map +0 -1
- package/dist/chunk-PFYVNM6H.js +0 -14
- package/dist/chunk-PFYVNM6H.js.map +0 -1
- package/dist/chunk-PWNNSGFL.js +0 -20
- package/dist/chunk-PWNNSGFL.js.map +0 -1
- package/dist/chunk-Q2PGZVOT.js +0 -36
- package/dist/chunk-Q2PGZVOT.js.map +0 -1
- package/dist/chunk-Q2XDMV7U.js +0 -76
- package/dist/chunk-Q2XDMV7U.js.map +0 -1
- package/dist/chunk-QG7FH2FI.js +0 -45
- package/dist/chunk-QG7FH2FI.js.map +0 -1
- package/dist/chunk-R7HUOK2D.js +0 -1914
- package/dist/chunk-R7HUOK2D.js.map +0 -1
- package/dist/chunk-REUYY7G5.js +0 -773
- package/dist/chunk-REUYY7G5.js.map +0 -1
- package/dist/chunk-RHC2Z2HT.js +0 -199
- package/dist/chunk-RHC2Z2HT.js.map +0 -1
- package/dist/chunk-RMCVLIFE.js +0 -23
- package/dist/chunk-RMCVLIFE.js.map +0 -1
- package/dist/chunk-ROZLTXGR.js +0 -234
- package/dist/chunk-ROZLTXGR.js.map +0 -1
- package/dist/chunk-RSS2C2O3.js +0 -17
- package/dist/chunk-RSS2C2O3.js.map +0 -1
- package/dist/chunk-SAGCG5SH.js +0 -355
- package/dist/chunk-SAGCG5SH.js.map +0 -1
- package/dist/chunk-TM6AOUSD.js +0 -40
- package/dist/chunk-TM6AOUSD.js.map +0 -1
- package/dist/chunk-TPK4BYCO.js +0 -970
- package/dist/chunk-TPK4BYCO.js.map +0 -1
- package/dist/chunk-UNQIL4K2.js +0 -34
- package/dist/chunk-UNQIL4K2.js.map +0 -1
- package/dist/chunk-UUG6L75Y.js +0 -47
- package/dist/chunk-UUG6L75Y.js.map +0 -1
- package/dist/chunk-V2SYMV4W.js +0 -114
- package/dist/chunk-V2SYMV4W.js.map +0 -1
- package/dist/chunk-V7EN5CTH.js +0 -130
- package/dist/chunk-V7EN5CTH.js.map +0 -1
- package/dist/chunk-VITKG2HL.js +0 -1125
- package/dist/chunk-VITKG2HL.js.map +0 -1
- package/dist/chunk-VYEWU5LO.js +0 -2631
- package/dist/chunk-VYEWU5LO.js.map +0 -1
- package/dist/chunk-W67QAGSH.js +0 -178
- package/dist/chunk-W67QAGSH.js.map +0 -1
- package/dist/chunk-WWBIN6KV.js +0 -1353
- package/dist/chunk-WWBIN6KV.js.map +0 -1
- package/dist/chunk-X77Z4PFB.js +0 -224
- package/dist/chunk-X77Z4PFB.js.map +0 -1
- package/dist/chunk-X7VG7OTT.js +0 -8
- package/dist/chunk-X7VG7OTT.js.map +0 -1
- package/dist/chunk-XE4K2SGI.js +0 -74
- package/dist/chunk-XE4K2SGI.js.map +0 -1
- package/dist/chunk-YIUG7IJK.js +0 -628
- package/dist/chunk-YIUG7IJK.js.map +0 -1
- package/dist/chunk-YNVN3V4Y.js +0 -13
- package/dist/chunk-YNVN3V4Y.js.map +0 -1
- package/dist/chunk-Z2S54IZX.js +0 -198
- package/dist/chunk-Z2S54IZX.js.map +0 -1
- package/dist/chunk-ZR6AH25Z.js +0 -17
- package/dist/chunk-ZR6AH25Z.js.map +0 -1
- package/dist/dialog-SPM3DTTI.js +0 -17
- package/dist/dialog-SPM3DTTI.js.map +0 -1
- package/dist/dropdown-menu-HMTWKWGK.js +0 -21
- package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
- package/dist/input-BH4P4S26.js +0 -6
- package/dist/input-BH4P4S26.js.map +0 -1
- package/dist/label-5Z4Q6VER.js +0 -8
- package/dist/label-5Z4Q6VER.js.map +0 -1
- package/dist/popover-IFOUXYLI.js +0 -18
- package/dist/popover-IFOUXYLI.js.map +0 -1
- package/dist/scroll-area-DJXNW6QX.js +0 -14
- package/dist/scroll-area-DJXNW6QX.js.map +0 -1
- package/dist/select-FZ277C3G.js +0 -22
- package/dist/select-FZ277C3G.js.map +0 -1
- package/dist/separator-BTMLN4NB.js +0 -8
- package/dist/separator-BTMLN4NB.js.map +0 -1
- package/dist/skeleton-DXIWBH4W.js +0 -6
- package/dist/skeleton-DXIWBH4W.js.map +0 -1
- package/dist/switch-4MCXIZBY.js +0 -13
- package/dist/switch-4MCXIZBY.js.map +0 -1
- package/dist/tabs-O7AW3APK.js +0 -17
- package/dist/tabs-O7AW3APK.js.map +0 -1
- package/dist/textarea-IB5WAFDO.js +0 -6
- package/dist/textarea-IB5WAFDO.js.map +0 -1
- package/dist/toggle-XVPPG6P4.js +0 -10
- package/dist/toggle-XVPPG6P4.js.map +0 -1
- package/dist/tooltip-JICZTD4F.js +0 -18
- package/dist/tooltip-JICZTD4F.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backbay/glia",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.8",
|
|
4
4
|
"description": "Reactive primitives for agent affect and thought",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"
|
|
9
|
+
"author": "Backbay <dev@backbay.industries>",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/backbay/
|
|
12
|
+
"url": "https://github.com/backbay/backbay-sdk.git",
|
|
13
|
+
"directory": "packages/glia"
|
|
13
14
|
},
|
|
14
15
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/backbay/
|
|
16
|
+
"url": "https://github.com/backbay/backbay-sdk/issues"
|
|
16
17
|
},
|
|
18
|
+
"homepage": "https://github.com/backbay/backbay-sdk/tree/main/packages/glia#readme",
|
|
17
19
|
"main": "./dist/index.js",
|
|
18
20
|
"types": "./dist/index.d.ts",
|
|
19
21
|
"exports": {
|
|
@@ -109,20 +111,23 @@
|
|
|
109
111
|
"design-drift": "node scripts/design-drift.mjs"
|
|
110
112
|
},
|
|
111
113
|
"dependencies": {
|
|
112
|
-
"@backbay/contract": "0.1.0-alpha.1",
|
|
114
|
+
"@backbay/contract": "^0.1.0-alpha.1",
|
|
113
115
|
"@backbay/glia-agent": "^0.1.0",
|
|
114
116
|
"@backbay/glia-desktop": "^0.2.0-alpha.2",
|
|
115
|
-
"@backbay/glia-three": "^0.2.0-alpha.
|
|
117
|
+
"@backbay/glia-three": "^0.2.0-alpha.5",
|
|
116
118
|
"@backbay/raymond": "^0.1.0",
|
|
117
119
|
"class-variance-authority": "^0.7.1",
|
|
118
120
|
"clsx": "^2.1.1",
|
|
119
121
|
"tailwind-merge": "^3.4.0",
|
|
120
|
-
"zod": "^3.23.0"
|
|
121
|
-
"zustand": "^5.0.0"
|
|
122
|
+
"zod": "^3.23.0"
|
|
122
123
|
},
|
|
123
124
|
"peerDependencies": {
|
|
124
125
|
"react": "^18.0.0 || ^19.0.0",
|
|
125
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
126
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
127
|
+
"zustand": "^5"
|
|
128
|
+
},
|
|
129
|
+
"peerDependenciesMeta": {
|
|
130
|
+
"zustand": { "optional": false }
|
|
126
131
|
},
|
|
127
132
|
"optionalDependencies": {
|
|
128
133
|
"@radix-ui/react-accordion": "^1.2.3",
|
|
@@ -182,8 +187,9 @@
|
|
|
182
187
|
"styled-components": "^6.3.8",
|
|
183
188
|
"tailwindcss": "^3.4.17",
|
|
184
189
|
"tsup": "^8.5.1",
|
|
185
|
-
"typescript": "^5.9.
|
|
190
|
+
"typescript": "^5.9.3",
|
|
186
191
|
"vite": "^7.3.1",
|
|
192
|
+
"playwright": "^1.52.0",
|
|
187
193
|
"vitest": "^2.0.0"
|
|
188
194
|
},
|
|
189
195
|
"keywords": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"AuroraBackground-AP6ZHVFA.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"BentoGrid-CDARICNM.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"CommandPalette-JCWJKRBY.js"}
|
package/dist/Glass-H4X4ZI4P.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { GlassCard, GlassHeader, GlassPanel, GlassSection, NoiseOverlay } from './chunk-E3NVDCZG.js';
|
|
2
|
-
import './chunk-VITKG2HL.js';
|
|
3
|
-
import './chunk-6RX2WGCO.js';
|
|
4
|
-
import './chunk-3CMPQOMY.js';
|
|
5
|
-
import './chunk-TM6AOUSD.js';
|
|
6
|
-
//# sourceMappingURL=Glass-H4X4ZI4P.js.map
|
|
7
|
-
//# sourceMappingURL=Glass-H4X4ZI4P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Glass-H4X4ZI4P.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"GlitchText-KLQ57PPY.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"GlowButton-VGBPMZO7.js"}
|
package/dist/Graph3D-GO7N2EZQ.js
DELETED
|
@@ -1,540 +0,0 @@
|
|
|
1
|
-
import './chunk-TM6AOUSD.js';
|
|
2
|
-
import { Stars, OrbitControls, Line, Html } from '@react-three/drei';
|
|
3
|
-
import { useThree, useFrame } from '@react-three/fiber';
|
|
4
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
5
|
-
import { forwardRef, useRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
6
|
-
import * as THREE2 from 'three';
|
|
7
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var GraphEdge = ({ edge, start, end, isPathActive, isDimmed }) => {
|
|
10
|
-
const lineRef = useRef(null);
|
|
11
|
-
const isAgentPath = edge.type === "agentPath";
|
|
12
|
-
const isSuggested = edge.type === "suggested";
|
|
13
|
-
const isDistraction = edge.type === "distraction";
|
|
14
|
-
const color = isPathActive || isAgentPath ? "#00f0ff" : isDistraction ? "#ff6b4a" : isSuggested ? "#e0e7ff" : "#a0b0d0";
|
|
15
|
-
const opacity = isDimmed ? 0.03 : isPathActive || isAgentPath ? 0.85 : isDistraction ? 0.6 : isSuggested ? 0.25 : 0.08;
|
|
16
|
-
const width = isPathActive || isAgentPath ? 2.5 : isDistraction ? 1.5 : 1;
|
|
17
|
-
const dashed = isSuggested || isAgentPath || isPathActive || isDistraction;
|
|
18
|
-
useFrame((_state, delta) => {
|
|
19
|
-
if (lineRef.current && (isAgentPath || isPathActive || isSuggested || isDistraction)) {
|
|
20
|
-
if (lineRef.current.material) {
|
|
21
|
-
const speed = isPathActive ? 1.5 : isAgentPath ? 1 : isDistraction ? 0.3 : 0.5;
|
|
22
|
-
lineRef.current.material.dashOffset -= delta * speed;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
-
Line,
|
|
28
|
-
{
|
|
29
|
-
ref: lineRef,
|
|
30
|
-
points: [start, end],
|
|
31
|
-
color,
|
|
32
|
-
transparent: true,
|
|
33
|
-
opacity,
|
|
34
|
-
lineWidth: width,
|
|
35
|
-
dashed,
|
|
36
|
-
dashScale: isSuggested ? 2 : isDistraction ? 3 : 1.4,
|
|
37
|
-
dashSize: isPathActive ? 0.22 : 0.16,
|
|
38
|
-
gapSize: isPathActive ? 0.14 : 0.2,
|
|
39
|
-
depthWrite: false,
|
|
40
|
-
toneMapped: false
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
var CATEGORY_COLORS = {
|
|
45
|
-
ADHD: "#00d4e6",
|
|
46
|
-
// Neon Cyan (slightly desaturated from #00f0ff)
|
|
47
|
-
AI: "#d000ff",
|
|
48
|
-
// Magenta (slightly desaturated from #f000ff)
|
|
49
|
-
Infrastructure: "#cfd8ff",
|
|
50
|
-
// Cool white/blue (softer than #e0e7ff)
|
|
51
|
-
Systems: "#00e08a",
|
|
52
|
-
// Emerald (shifted from #00ff99)
|
|
53
|
-
Personal: "#f4c948",
|
|
54
|
-
// Soft Gold (shifted from #ffd700)
|
|
55
|
-
// Mission Clusters
|
|
56
|
-
Mission: "#00d4e6",
|
|
57
|
-
// Default Mission = Cyan
|
|
58
|
-
MissionA: "#00d4e6",
|
|
59
|
-
// Cyan
|
|
60
|
-
MissionB: "#00e08a",
|
|
61
|
-
// Emerald
|
|
62
|
-
MissionC: "#f4c948",
|
|
63
|
-
// Gold
|
|
64
|
-
// Distraction
|
|
65
|
-
Distraction: "#ff4d4d",
|
|
66
|
-
// Red/Warning
|
|
67
|
-
// Generic
|
|
68
|
-
Plan: "#00f0ff",
|
|
69
|
-
Step: "#a0b0d0",
|
|
70
|
-
Task: "#a0b0d0",
|
|
71
|
-
Rest: "#a0b0d0",
|
|
72
|
-
Admin: "#a0b0d0"
|
|
73
|
-
};
|
|
74
|
-
var getCategoryColor = (category) => {
|
|
75
|
-
if (CATEGORY_COLORS[category || ""]) return CATEGORY_COLORS[category || ""];
|
|
76
|
-
if (category?.startsWith("Mission")) return CATEGORY_COLORS["Mission"];
|
|
77
|
-
return "#888888";
|
|
78
|
-
};
|
|
79
|
-
var getNodeSize = (weight = 0.5) => {
|
|
80
|
-
const baseRadius = 0.14;
|
|
81
|
-
const maxBump = 0.05;
|
|
82
|
-
return baseRadius + weight * maxBump;
|
|
83
|
-
};
|
|
84
|
-
function layoutFibonacci(nodes, options = {}) {
|
|
85
|
-
const positions = /* @__PURE__ */ new Map();
|
|
86
|
-
const radius = options.radius ?? 4;
|
|
87
|
-
nodes.forEach((node, i) => {
|
|
88
|
-
const phi = Math.acos(-1 + 2 * i / nodes.length);
|
|
89
|
-
const theta = Math.sqrt(nodes.length * Math.PI) * phi;
|
|
90
|
-
positions.set(
|
|
91
|
-
node.id,
|
|
92
|
-
new THREE2.Vector3(
|
|
93
|
-
radius * Math.cos(theta) * Math.sin(phi),
|
|
94
|
-
radius * Math.sin(theta) * Math.sin(phi),
|
|
95
|
-
radius * Math.cos(phi)
|
|
96
|
-
)
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
return positions;
|
|
100
|
-
}
|
|
101
|
-
function layoutRing(nodes, options = {}) {
|
|
102
|
-
const positions = /* @__PURE__ */ new Map();
|
|
103
|
-
const radius = options.radius ?? 4;
|
|
104
|
-
nodes.forEach((node, i) => {
|
|
105
|
-
const angle = i / nodes.length * Math.PI * 2;
|
|
106
|
-
positions.set(
|
|
107
|
-
node.id,
|
|
108
|
-
new THREE2.Vector3(Math.sin(angle) * radius, 0, -Math.cos(angle) * radius)
|
|
109
|
-
);
|
|
110
|
-
});
|
|
111
|
-
return positions;
|
|
112
|
-
}
|
|
113
|
-
function layoutCustom(nodes) {
|
|
114
|
-
const positions = /* @__PURE__ */ new Map();
|
|
115
|
-
nodes.forEach((node) => {
|
|
116
|
-
if (node.positionHint) {
|
|
117
|
-
positions.set(node.id, new THREE2.Vector3(...node.positionHint));
|
|
118
|
-
} else {
|
|
119
|
-
positions.set(node.id, new THREE2.Vector3(0, 0, 0));
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
return positions;
|
|
123
|
-
}
|
|
124
|
-
function layoutForce(nodes, edges, options = {}) {
|
|
125
|
-
const positions = /* @__PURE__ */ new Map();
|
|
126
|
-
const velocities = /* @__PURE__ */ new Map();
|
|
127
|
-
nodes.forEach((node, i) => {
|
|
128
|
-
const phi = Math.acos(-1 + 2 * i / nodes.length);
|
|
129
|
-
const theta = Math.sqrt(nodes.length * Math.PI) * phi;
|
|
130
|
-
const r = options.radius ?? 4;
|
|
131
|
-
positions.set(
|
|
132
|
-
node.id,
|
|
133
|
-
new THREE2.Vector3(
|
|
134
|
-
r * Math.cos(theta) * Math.sin(phi),
|
|
135
|
-
r * Math.sin(theta) * Math.sin(phi),
|
|
136
|
-
r * Math.cos(phi)
|
|
137
|
-
)
|
|
138
|
-
);
|
|
139
|
-
velocities.set(node.id, new THREE2.Vector3(0, 0, 0));
|
|
140
|
-
});
|
|
141
|
-
const iterations = options.iterations ?? 120;
|
|
142
|
-
const repelStrength = options.repelStrength ?? 8;
|
|
143
|
-
const linkStrength = options.linkStrength ?? 0.8;
|
|
144
|
-
const gravity = options.gravity ?? 0.05;
|
|
145
|
-
const damping = 0.8;
|
|
146
|
-
for (let i = 0; i < iterations; i++) {
|
|
147
|
-
for (let j = 0; j < nodes.length; j++) {
|
|
148
|
-
for (let k = j + 1; k < nodes.length; k++) {
|
|
149
|
-
const nodeA = nodes[j];
|
|
150
|
-
const nodeB = nodes[k];
|
|
151
|
-
const posA = positions.get(nodeA.id);
|
|
152
|
-
const posB = positions.get(nodeB.id);
|
|
153
|
-
const delta = new THREE2.Vector3().subVectors(posA, posB);
|
|
154
|
-
let dist = delta.length();
|
|
155
|
-
if (dist === 0) {
|
|
156
|
-
dist = 0.01;
|
|
157
|
-
delta.set(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);
|
|
158
|
-
}
|
|
159
|
-
const force = delta.normalize().multiplyScalar(repelStrength / (dist * dist));
|
|
160
|
-
velocities.get(nodeA.id).add(force);
|
|
161
|
-
velocities.get(nodeB.id).sub(force);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
edges.forEach((edge) => {
|
|
165
|
-
if (!positions.has(edge.source) || !positions.has(edge.target)) return;
|
|
166
|
-
const posA = positions.get(edge.source);
|
|
167
|
-
const posB = positions.get(edge.target);
|
|
168
|
-
const delta = new THREE2.Vector3().subVectors(posB, posA);
|
|
169
|
-
const dist = delta.length();
|
|
170
|
-
const idealDist = options.spacing ?? 1.5;
|
|
171
|
-
const force = delta.normalize().multiplyScalar((dist - idealDist) * linkStrength);
|
|
172
|
-
velocities.get(edge.source).add(force);
|
|
173
|
-
velocities.get(edge.target).sub(force);
|
|
174
|
-
});
|
|
175
|
-
nodes.forEach((node) => {
|
|
176
|
-
const pos = positions.get(node.id);
|
|
177
|
-
const force = pos.clone().negate().multiplyScalar(gravity);
|
|
178
|
-
velocities.get(node.id).add(force);
|
|
179
|
-
});
|
|
180
|
-
nodes.forEach((node) => {
|
|
181
|
-
const vel = velocities.get(node.id);
|
|
182
|
-
vel.multiplyScalar(damping);
|
|
183
|
-
positions.get(node.id).add(vel);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
return positions;
|
|
187
|
-
}
|
|
188
|
-
var GraphNode = ({
|
|
189
|
-
node,
|
|
190
|
-
position,
|
|
191
|
-
isSelected,
|
|
192
|
-
isHovered,
|
|
193
|
-
isPathActive,
|
|
194
|
-
isDimmed,
|
|
195
|
-
showLabel,
|
|
196
|
-
onClick,
|
|
197
|
-
onDoubleClick,
|
|
198
|
-
onHover
|
|
199
|
-
}) => {
|
|
200
|
-
const baseSize = useMemo(() => getNodeSize(node.weight), [node.weight]);
|
|
201
|
-
const color = useMemo(() => getCategoryColor(node.category), [node.category]);
|
|
202
|
-
const isHighlighted = isSelected || isHovered || isPathActive;
|
|
203
|
-
const isActiveStatus = node.status === "active";
|
|
204
|
-
const isDeployingStatus = node.status === "candidate";
|
|
205
|
-
const isBlockedStatus = node.status === "blocked";
|
|
206
|
-
const emissiveColor = useMemo(() => {
|
|
207
|
-
const baseColor = new THREE2.Color(color);
|
|
208
|
-
if (isPathActive) {
|
|
209
|
-
return baseColor.lerp(new THREE2.Color("#00f0ff"), 0.3);
|
|
210
|
-
}
|
|
211
|
-
if (isBlockedStatus) {
|
|
212
|
-
return baseColor.lerp(new THREE2.Color("#ff4444"), 0.5);
|
|
213
|
-
}
|
|
214
|
-
return baseColor;
|
|
215
|
-
}, [color, isPathActive, isBlockedStatus]);
|
|
216
|
-
const groupRef = useRef(null);
|
|
217
|
-
const meshRef = useRef(null);
|
|
218
|
-
const didInitRef = useRef(false);
|
|
219
|
-
const targetScaleRef = useRef(new THREE2.Vector3(1, 1, 1));
|
|
220
|
-
useFrame(({ clock }, delta) => {
|
|
221
|
-
const group = groupRef.current;
|
|
222
|
-
const mesh = meshRef.current;
|
|
223
|
-
if (!group || !mesh) return;
|
|
224
|
-
const t = clock.elapsedTime;
|
|
225
|
-
const positionAlpha = 1 - Math.exp(-delta * 8);
|
|
226
|
-
const scaleAlpha = 1 - Math.exp(-delta * 12);
|
|
227
|
-
const getScaleScalar = () => {
|
|
228
|
-
if (isSelected) return 1.2;
|
|
229
|
-
if (isHovered) return 1.1;
|
|
230
|
-
if (isPathActive) {
|
|
231
|
-
return 1 + 0.05 * Math.sin(t * Math.PI * 2 / 2.5);
|
|
232
|
-
}
|
|
233
|
-
if (isActiveStatus) {
|
|
234
|
-
return 1 + 0.06 * Math.sin(t * Math.PI * 2 / 2);
|
|
235
|
-
}
|
|
236
|
-
if (isDeployingStatus) {
|
|
237
|
-
return 1 + 0.08 * Math.sin(t * Math.PI * 2 / 0.8);
|
|
238
|
-
}
|
|
239
|
-
if (isBlockedStatus) {
|
|
240
|
-
return 1 + 0.04 * Math.sin(t * Math.PI * 2 / 0.5);
|
|
241
|
-
}
|
|
242
|
-
return 1 + 0.02 * Math.sin(t * Math.PI * 2 / 10);
|
|
243
|
-
};
|
|
244
|
-
if (!didInitRef.current) {
|
|
245
|
-
group.position.copy(position);
|
|
246
|
-
mesh.scale.setScalar(getScaleScalar());
|
|
247
|
-
didInitRef.current = true;
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
group.position.lerp(position, positionAlpha);
|
|
251
|
-
targetScaleRef.current.setScalar(getScaleScalar());
|
|
252
|
-
mesh.scale.lerp(targetScaleRef.current, scaleAlpha);
|
|
253
|
-
});
|
|
254
|
-
return /* @__PURE__ */ jsxs("group", { ref: groupRef, children: [
|
|
255
|
-
/* @__PURE__ */ jsxs(
|
|
256
|
-
"mesh",
|
|
257
|
-
{
|
|
258
|
-
ref: meshRef,
|
|
259
|
-
onClick: (e) => {
|
|
260
|
-
e.stopPropagation();
|
|
261
|
-
onClick?.(node.id);
|
|
262
|
-
},
|
|
263
|
-
onDoubleClick: (e) => {
|
|
264
|
-
e.stopPropagation();
|
|
265
|
-
onDoubleClick?.(node.id);
|
|
266
|
-
},
|
|
267
|
-
onPointerOver: (e) => {
|
|
268
|
-
e.stopPropagation();
|
|
269
|
-
onHover?.(node.id);
|
|
270
|
-
document.body.style.cursor = "pointer";
|
|
271
|
-
},
|
|
272
|
-
onPointerOut: () => {
|
|
273
|
-
onHover?.(null);
|
|
274
|
-
document.body.style.cursor = "auto";
|
|
275
|
-
},
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ jsx("sphereGeometry", { args: [baseSize, 32, 32] }),
|
|
278
|
-
/* @__PURE__ */ jsx(
|
|
279
|
-
"meshPhysicalMaterial",
|
|
280
|
-
{
|
|
281
|
-
color,
|
|
282
|
-
emissive: emissiveColor,
|
|
283
|
-
emissiveIntensity: isSelected ? 0.8 : isHovered ? 0.6 : isPathActive ? 0.5 : isActiveStatus ? 0.45 : isDeployingStatus ? 0.5 : isBlockedStatus ? 0.6 : 0.2,
|
|
284
|
-
roughness: 0.2,
|
|
285
|
-
metalness: 0.6,
|
|
286
|
-
transparent: true,
|
|
287
|
-
opacity: isDimmed ? 0.15 : 0.9,
|
|
288
|
-
transmission: 0.2,
|
|
289
|
-
thickness: 0.5
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
]
|
|
293
|
-
}
|
|
294
|
-
),
|
|
295
|
-
(isHighlighted || isActiveStatus || isDeployingStatus) && /* @__PURE__ */ jsxs("mesh", { children: [
|
|
296
|
-
/* @__PURE__ */ jsx("sphereGeometry", { args: [baseSize * (isSelected ? 2 : isActiveStatus ? 1.8 : 1.6), 32, 32] }),
|
|
297
|
-
/* @__PURE__ */ jsx(
|
|
298
|
-
"meshBasicMaterial",
|
|
299
|
-
{
|
|
300
|
-
color: isBlockedStatus ? "#ff4444" : emissiveColor,
|
|
301
|
-
transparent: true,
|
|
302
|
-
opacity: isSelected ? 0.15 : isActiveStatus ? 0.12 : isDeployingStatus ? 0.18 : 0.1,
|
|
303
|
-
side: THREE2.BackSide,
|
|
304
|
-
blending: THREE2.AdditiveBlending,
|
|
305
|
-
depthWrite: false
|
|
306
|
-
}
|
|
307
|
-
)
|
|
308
|
-
] }),
|
|
309
|
-
isActiveStatus && !isSelected && /* @__PURE__ */ jsxs("mesh", { rotation: [Math.PI / 2, 0, 0], children: [
|
|
310
|
-
/* @__PURE__ */ jsx("ringGeometry", { args: [baseSize * 1.5, baseSize * 1.55, 64] }),
|
|
311
|
-
/* @__PURE__ */ jsx(
|
|
312
|
-
"meshBasicMaterial",
|
|
313
|
-
{
|
|
314
|
-
color: "#00ff88",
|
|
315
|
-
side: THREE2.DoubleSide,
|
|
316
|
-
transparent: true,
|
|
317
|
-
opacity: 0.4,
|
|
318
|
-
blending: THREE2.AdditiveBlending
|
|
319
|
-
}
|
|
320
|
-
)
|
|
321
|
-
] }),
|
|
322
|
-
isSelected && /* @__PURE__ */ jsxs("mesh", { rotation: [Math.PI / 2, 0, 0], children: [
|
|
323
|
-
/* @__PURE__ */ jsx("ringGeometry", { args: [baseSize * 1.8, baseSize * 1.85, 64] }),
|
|
324
|
-
/* @__PURE__ */ jsx(
|
|
325
|
-
"meshBasicMaterial",
|
|
326
|
-
{
|
|
327
|
-
color,
|
|
328
|
-
side: THREE2.DoubleSide,
|
|
329
|
-
transparent: true,
|
|
330
|
-
opacity: 0.6,
|
|
331
|
-
blending: THREE2.AdditiveBlending
|
|
332
|
-
}
|
|
333
|
-
)
|
|
334
|
-
] }),
|
|
335
|
-
(showLabel || isHighlighted) && /* @__PURE__ */ jsx(Html, { distanceFactor: 12, zIndexRange: [100, 0], style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsxs(
|
|
336
|
-
motion.div,
|
|
337
|
-
{
|
|
338
|
-
initial: { opacity: 0, y: 4 },
|
|
339
|
-
animate: { opacity: 1, y: -12 },
|
|
340
|
-
transition: { duration: 0.18 },
|
|
341
|
-
className: `
|
|
342
|
-
flex flex-col items-center
|
|
343
|
-
${isHighlighted ? "scale-100" : "scale-95 opacity-40"}
|
|
344
|
-
`,
|
|
345
|
-
children: [
|
|
346
|
-
/* @__PURE__ */ jsx(
|
|
347
|
-
"div",
|
|
348
|
-
{
|
|
349
|
-
className: `
|
|
350
|
-
px-2 py-1 rounded-full border backdrop-blur-xl transition-colors duration-300
|
|
351
|
-
${isHighlighted ? "bg-[rgba(2,4,10,0.85)] border-white/[0.06] shadow-[inset_0_1px_0_rgba(255,255,255,0.02)]" : "bg-transparent border-transparent"}
|
|
352
|
-
`,
|
|
353
|
-
children: /* @__PURE__ */ jsx(
|
|
354
|
-
"div",
|
|
355
|
-
{
|
|
356
|
-
className: `text-[9px] font-mono font-semibold whitespace-nowrap ${isHighlighted ? "text-white" : "text-white/55"}`,
|
|
357
|
-
children: node.label
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
}
|
|
361
|
-
),
|
|
362
|
-
isHighlighted && node.category && /* @__PURE__ */ jsx(
|
|
363
|
-
"div",
|
|
364
|
-
{
|
|
365
|
-
className: "text-[7px] uppercase tracking-[0.18em] font-bold mt-1 px-1.5 py-px rounded border border-white/[0.06] bg-[rgba(2,4,10,0.85)] backdrop-blur-xl",
|
|
366
|
-
style: {
|
|
367
|
-
color,
|
|
368
|
-
borderColor: `${color}33`,
|
|
369
|
-
boxShadow: `0 0 6px ${color}22`
|
|
370
|
-
},
|
|
371
|
-
children: node.category
|
|
372
|
-
}
|
|
373
|
-
)
|
|
374
|
-
]
|
|
375
|
-
}
|
|
376
|
-
) })
|
|
377
|
-
] });
|
|
378
|
-
};
|
|
379
|
-
var Graph3D = forwardRef(
|
|
380
|
-
({
|
|
381
|
-
graph,
|
|
382
|
-
selectedNodeId,
|
|
383
|
-
focusedPath = [],
|
|
384
|
-
highlightedNodeIds = [],
|
|
385
|
-
dimUnhighlighted,
|
|
386
|
-
layout = "fibonacci",
|
|
387
|
-
layoutOptions = {},
|
|
388
|
-
agentActivity = { mode: "idle" },
|
|
389
|
-
onNodeClick,
|
|
390
|
-
onNodeDoubleClick,
|
|
391
|
-
onNodeHoverChange,
|
|
392
|
-
onBackgroundClick,
|
|
393
|
-
maxNodeCountForLabels = 20,
|
|
394
|
-
embedMode = false
|
|
395
|
-
}, ref) => {
|
|
396
|
-
const { camera } = useThree();
|
|
397
|
-
const controlsRef = useRef(null);
|
|
398
|
-
const groupRef = useRef(null);
|
|
399
|
-
const [positions, setPositions] = useState(/* @__PURE__ */ new Map());
|
|
400
|
-
const [currentLayout, setCurrentLayout] = useState(layout);
|
|
401
|
-
const [currentLayoutOptions, setCurrentLayoutOptions] = useState(layoutOptions);
|
|
402
|
-
useEffect(() => {
|
|
403
|
-
let newPositions;
|
|
404
|
-
switch (currentLayout) {
|
|
405
|
-
case "force":
|
|
406
|
-
newPositions = layoutForce(graph.nodes, graph.edges, currentLayoutOptions);
|
|
407
|
-
break;
|
|
408
|
-
case "ring":
|
|
409
|
-
newPositions = layoutRing(graph.nodes, currentLayoutOptions);
|
|
410
|
-
break;
|
|
411
|
-
case "custom":
|
|
412
|
-
newPositions = layoutCustom(graph.nodes);
|
|
413
|
-
break;
|
|
414
|
-
case "fibonacci":
|
|
415
|
-
default:
|
|
416
|
-
newPositions = layoutFibonacci(graph.nodes, currentLayoutOptions);
|
|
417
|
-
break;
|
|
418
|
-
}
|
|
419
|
-
setPositions(newPositions);
|
|
420
|
-
}, [graph, currentLayout, currentLayoutOptions]);
|
|
421
|
-
useEffect(() => {
|
|
422
|
-
setCurrentLayout(layout);
|
|
423
|
-
setCurrentLayoutOptions(layoutOptions);
|
|
424
|
-
}, [layout, layoutOptions]);
|
|
425
|
-
useImperativeHandle(ref, () => ({
|
|
426
|
-
focusNode: (id, options) => {
|
|
427
|
-
const pos = positions.get(id);
|
|
428
|
-
if (pos && controlsRef.current) {
|
|
429
|
-
controlsRef.current.target.copy(pos);
|
|
430
|
-
if (options?.animateCamera) {
|
|
431
|
-
const offset = new THREE2.Vector3(0, 2, 6);
|
|
432
|
-
camera.position.copy(pos).add(offset);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
pulseNode: (_id, _options) => {
|
|
437
|
-
},
|
|
438
|
-
highlightPath: (_ids, _options) => {
|
|
439
|
-
},
|
|
440
|
-
showDiff: (_oldGraph, _newGraph, _options) => {
|
|
441
|
-
},
|
|
442
|
-
setLayout: (mode, opts) => {
|
|
443
|
-
setCurrentLayout(mode);
|
|
444
|
-
if (opts) setCurrentLayoutOptions(opts);
|
|
445
|
-
},
|
|
446
|
-
getNodePosition: (id) => {
|
|
447
|
-
return positions.get(id);
|
|
448
|
-
}
|
|
449
|
-
}));
|
|
450
|
-
useFrame((_state, delta) => {
|
|
451
|
-
if (groupRef.current && agentActivity.mode === "idle" && !selectedNodeId) {
|
|
452
|
-
groupRef.current.rotation.y += delta * 0.02;
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
const isNodeDimmed = (id) => {
|
|
456
|
-
if (!dimUnhighlighted) return false;
|
|
457
|
-
if (selectedNodeId && id === selectedNodeId) return false;
|
|
458
|
-
if (focusedPath.includes(id)) return false;
|
|
459
|
-
if (highlightedNodeIds.includes(id)) return false;
|
|
460
|
-
if (selectedNodeId || focusedPath.length > 0 || highlightedNodeIds.length > 0) return true;
|
|
461
|
-
return false;
|
|
462
|
-
};
|
|
463
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
464
|
-
!embedMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
465
|
-
/* @__PURE__ */ jsx("color", { attach: "background", args: ["#050812"] }),
|
|
466
|
-
/* @__PURE__ */ jsx("fog", { attach: "fog", args: ["#050812", 8, 25] }),
|
|
467
|
-
" ",
|
|
468
|
-
/* @__PURE__ */ jsx(Stars, { radius: 90, depth: 40, count: 1800, factor: 3, saturation: 0, fade: true, speed: 0.3 }),
|
|
469
|
-
/* @__PURE__ */ jsx("ambientLight", { intensity: 0.2 }),
|
|
470
|
-
/* @__PURE__ */ jsx("pointLight", { position: [10, 10, 10], intensity: 0.5, color: "#4060ff" }),
|
|
471
|
-
/* @__PURE__ */ jsx("pointLight", { position: [-10, -5, -10], intensity: 0.3, color: "#ff0080" }),
|
|
472
|
-
/* @__PURE__ */ jsx("hemisphereLight", { args: ["#050812", "#000000", 0.5] })
|
|
473
|
-
] }),
|
|
474
|
-
/* @__PURE__ */ jsx(
|
|
475
|
-
OrbitControls,
|
|
476
|
-
{
|
|
477
|
-
ref: controlsRef,
|
|
478
|
-
makeDefault: true,
|
|
479
|
-
enableDamping: true,
|
|
480
|
-
dampingFactor: 0.05,
|
|
481
|
-
rotateSpeed: 0.5,
|
|
482
|
-
minDistance: 3,
|
|
483
|
-
maxDistance: 16
|
|
484
|
-
}
|
|
485
|
-
),
|
|
486
|
-
/* @__PURE__ */ jsxs("mesh", { visible: false, scale: [100, 100, 100], onClick: () => onBackgroundClick?.(), children: [
|
|
487
|
-
/* @__PURE__ */ jsx("sphereGeometry", { args: [1, 16, 16] }),
|
|
488
|
-
/* @__PURE__ */ jsx("meshBasicMaterial", { side: THREE2.BackSide })
|
|
489
|
-
] }),
|
|
490
|
-
/* @__PURE__ */ jsxs("group", { ref: groupRef, children: [
|
|
491
|
-
graph.edges.map((edge) => {
|
|
492
|
-
const start = positions.get(edge.source);
|
|
493
|
-
const end = positions.get(edge.target);
|
|
494
|
-
if (!start || !end) return null;
|
|
495
|
-
const bothInPath = focusedPath.includes(edge.source) && focusedPath.includes(edge.target);
|
|
496
|
-
const isDimmed = dimUnhighlighted && !bothInPath && (focusedPath.length > 0 || !!selectedNodeId);
|
|
497
|
-
return /* @__PURE__ */ jsx(
|
|
498
|
-
GraphEdge,
|
|
499
|
-
{
|
|
500
|
-
edge,
|
|
501
|
-
start,
|
|
502
|
-
end,
|
|
503
|
-
isPathActive: bothInPath,
|
|
504
|
-
isDimmed
|
|
505
|
-
},
|
|
506
|
-
edge.id
|
|
507
|
-
);
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children: graph.nodes.map((node) => {
|
|
510
|
-
const pos = positions.get(node.id);
|
|
511
|
-
if (!pos) return null;
|
|
512
|
-
const isSelected = selectedNodeId === node.id;
|
|
513
|
-
const isPathActive = focusedPath.includes(node.id);
|
|
514
|
-
const shouldShowLabel = isSelected || isPathActive || highlightedNodeIds.includes(node.id) || graph.nodes.length < maxNodeCountForLabels;
|
|
515
|
-
return /* @__PURE__ */ jsx(
|
|
516
|
-
GraphNode,
|
|
517
|
-
{
|
|
518
|
-
node,
|
|
519
|
-
position: pos,
|
|
520
|
-
isSelected,
|
|
521
|
-
isPathActive,
|
|
522
|
-
isHovered: false,
|
|
523
|
-
isDimmed: isNodeDimmed(node.id),
|
|
524
|
-
showLabel: shouldShowLabel,
|
|
525
|
-
onClick: onNodeClick,
|
|
526
|
-
onDoubleClick: onNodeDoubleClick,
|
|
527
|
-
onHover: onNodeHoverChange
|
|
528
|
-
},
|
|
529
|
-
node.id
|
|
530
|
-
);
|
|
531
|
-
}) })
|
|
532
|
-
] })
|
|
533
|
-
] });
|
|
534
|
-
}
|
|
535
|
-
);
|
|
536
|
-
Graph3D.displayName = "Graph3D";
|
|
537
|
-
|
|
538
|
-
export { Graph3D };
|
|
539
|
-
//# sourceMappingURL=Graph3D-GO7N2EZQ.js.map
|
|
540
|
-
//# sourceMappingURL=Graph3D-GO7N2EZQ.js.map
|