@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.
Files changed (226) hide show
  1. package/dist/audio/index.js +1145 -5
  2. package/dist/audio/index.js.map +1 -1
  3. package/dist/components/index.js +3187 -10
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/core.js +19714 -12
  6. package/dist/core.js.map +1 -1
  7. package/dist/emotion/index.js +1 -1
  8. package/dist/emotion/index.js.map +1 -1
  9. package/dist/hooks/index.js +941 -6
  10. package/dist/hooks/index.js.map +1 -1
  11. package/dist/index.js +31841 -183
  12. package/dist/index.js.map +1 -1
  13. package/dist/primitives/index.js +21111 -57
  14. package/dist/primitives/index.js.map +1 -1
  15. package/dist/protocol/index.js +360 -2
  16. package/dist/protocol/index.js.map +1 -1
  17. package/dist/speakeasy/index.js +2786 -38
  18. package/dist/speakeasy/index.js.map +1 -1
  19. package/dist/styles.css +1 -1
  20. package/dist/theme/index.js +1150 -3
  21. package/dist/theme/index.js.map +1 -1
  22. package/dist/vision/index.js +370 -2
  23. package/dist/vision/index.js.map +1 -1
  24. package/dist/workspace/index.js +16824 -2
  25. package/dist/workspace/index.js.map +1 -1
  26. package/package.json +16 -10
  27. package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
  28. package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
  29. package/dist/BentoGrid-CDARICNM.js +0 -6
  30. package/dist/BentoGrid-CDARICNM.js.map +0 -1
  31. package/dist/CommandPalette-JCWJKRBY.js +0 -6
  32. package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
  33. package/dist/Glass-H4X4ZI4P.js +0 -7
  34. package/dist/Glass-H4X4ZI4P.js.map +0 -1
  35. package/dist/GlitchText-KLQ57PPY.js +0 -6
  36. package/dist/GlitchText-KLQ57PPY.js.map +0 -1
  37. package/dist/GlowButton-VGBPMZO7.js +0 -6
  38. package/dist/GlowButton-VGBPMZO7.js.map +0 -1
  39. package/dist/Graph3D-GO7N2EZQ.js +0 -540
  40. package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
  41. package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
  42. package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
  43. package/dist/KPIStat-PBQK27ZB.js +0 -6
  44. package/dist/KPIStat-PBQK27ZB.js.map +0 -1
  45. package/dist/NeonToast-W5F7MU3U.js +0 -6
  46. package/dist/NeonToast-W5F7MU3U.js.map +0 -1
  47. package/dist/ParticleField-WK6CNHWU.js +0 -51
  48. package/dist/ParticleField-WK6CNHWU.js.map +0 -1
  49. package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
  50. package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
  51. package/dist/ThreeDCard-VH5I3SSY.js +0 -6
  52. package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
  53. package/dist/TypingAnimation-GIWOHPIX.js +0 -6
  54. package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
  55. package/dist/alert-dialog-QOSYBIIE.js +0 -19
  56. package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
  57. package/dist/avatar-N5R37PCU.js +0 -10
  58. package/dist/avatar-N5R37PCU.js.map +0 -1
  59. package/dist/badge-GTVIIGPY.js +0 -8
  60. package/dist/badge-GTVIIGPY.js.map +0 -1
  61. package/dist/button-D7IMSV2D.js +0 -8
  62. package/dist/button-D7IMSV2D.js.map +0 -1
  63. package/dist/chunk-3CMPQOMY.js +0 -69
  64. package/dist/chunk-3CMPQOMY.js.map +0 -1
  65. package/dist/chunk-3OQT6IYR.js +0 -41
  66. package/dist/chunk-3OQT6IYR.js.map +0 -1
  67. package/dist/chunk-43B2WVLS.js +0 -85
  68. package/dist/chunk-43B2WVLS.js.map +0 -1
  69. package/dist/chunk-4SRFO5W3.js +0 -121
  70. package/dist/chunk-4SRFO5W3.js.map +0 -1
  71. package/dist/chunk-5IZELOOU.js +0 -362
  72. package/dist/chunk-5IZELOOU.js.map +0 -1
  73. package/dist/chunk-6DM4ACSS.js +0 -154
  74. package/dist/chunk-6DM4ACSS.js.map +0 -1
  75. package/dist/chunk-6IGT34PC.js +0 -50
  76. package/dist/chunk-6IGT34PC.js.map +0 -1
  77. package/dist/chunk-6RKBCJHN.js +0 -194
  78. package/dist/chunk-6RKBCJHN.js.map +0 -1
  79. package/dist/chunk-6RX2WGCO.js +0 -108
  80. package/dist/chunk-6RX2WGCO.js.map +0 -1
  81. package/dist/chunk-7K4WZM3U.js +0 -189
  82. package/dist/chunk-7K4WZM3U.js.map +0 -1
  83. package/dist/chunk-7MDBHJPT.js +0 -407
  84. package/dist/chunk-7MDBHJPT.js.map +0 -1
  85. package/dist/chunk-7UQD6ROV.js +0 -9
  86. package/dist/chunk-7UQD6ROV.js.map +0 -1
  87. package/dist/chunk-AFNIVLZP.js +0 -1069
  88. package/dist/chunk-AFNIVLZP.js.map +0 -1
  89. package/dist/chunk-ANWYRO6A.js +0 -407
  90. package/dist/chunk-ANWYRO6A.js.map +0 -1
  91. package/dist/chunk-DIXPOHDO.js +0 -71
  92. package/dist/chunk-DIXPOHDO.js.map +0 -1
  93. package/dist/chunk-DWYMKYPI.js +0 -3
  94. package/dist/chunk-DWYMKYPI.js.map +0 -1
  95. package/dist/chunk-E3NVDCZG.js +0 -280
  96. package/dist/chunk-E3NVDCZG.js.map +0 -1
  97. package/dist/chunk-EBM7YBKL.js +0 -399
  98. package/dist/chunk-EBM7YBKL.js.map +0 -1
  99. package/dist/chunk-EPAM7IWW.js +0 -294
  100. package/dist/chunk-EPAM7IWW.js.map +0 -1
  101. package/dist/chunk-EXQ7GYRS.js +0 -134
  102. package/dist/chunk-EXQ7GYRS.js.map +0 -1
  103. package/dist/chunk-F4QTUZ3C.js +0 -136
  104. package/dist/chunk-F4QTUZ3C.js.map +0 -1
  105. package/dist/chunk-FEW533R2.js +0 -105
  106. package/dist/chunk-FEW533R2.js.map +0 -1
  107. package/dist/chunk-FFZLJKC7.js +0 -270
  108. package/dist/chunk-FFZLJKC7.js.map +0 -1
  109. package/dist/chunk-GEAMOBF7.js +0 -8486
  110. package/dist/chunk-GEAMOBF7.js.map +0 -1
  111. package/dist/chunk-GRTRSCTD.js +0 -74
  112. package/dist/chunk-GRTRSCTD.js.map +0 -1
  113. package/dist/chunk-IKGYOGLK.js +0 -16
  114. package/dist/chunk-IKGYOGLK.js.map +0 -1
  115. package/dist/chunk-IQ7WYWVJ.js +0 -73
  116. package/dist/chunk-IQ7WYWVJ.js.map +0 -1
  117. package/dist/chunk-IXIVWQLF.js +0 -543
  118. package/dist/chunk-IXIVWQLF.js.map +0 -1
  119. package/dist/chunk-JCJU57RC.js +0 -115
  120. package/dist/chunk-JCJU57RC.js.map +0 -1
  121. package/dist/chunk-KORSTBU4.js +0 -117
  122. package/dist/chunk-KORSTBU4.js.map +0 -1
  123. package/dist/chunk-KSEZ6UM2.js +0 -235
  124. package/dist/chunk-KSEZ6UM2.js.map +0 -1
  125. package/dist/chunk-MHPF7R3O.js +0 -1376
  126. package/dist/chunk-MHPF7R3O.js.map +0 -1
  127. package/dist/chunk-MPC5IH7E.js +0 -81
  128. package/dist/chunk-MPC5IH7E.js.map +0 -1
  129. package/dist/chunk-MQIU2NYA.js +0 -114
  130. package/dist/chunk-MQIU2NYA.js.map +0 -1
  131. package/dist/chunk-NYMBJOGR.js +0 -2192
  132. package/dist/chunk-NYMBJOGR.js.map +0 -1
  133. package/dist/chunk-OBZD2M3C.js +0 -169
  134. package/dist/chunk-OBZD2M3C.js.map +0 -1
  135. package/dist/chunk-ODM2AG6G.js +0 -176
  136. package/dist/chunk-ODM2AG6G.js.map +0 -1
  137. package/dist/chunk-ONDKF5LP.js +0 -53
  138. package/dist/chunk-ONDKF5LP.js.map +0 -1
  139. package/dist/chunk-P25YCWQB.js +0 -41
  140. package/dist/chunk-P25YCWQB.js.map +0 -1
  141. package/dist/chunk-PFYVNM6H.js +0 -14
  142. package/dist/chunk-PFYVNM6H.js.map +0 -1
  143. package/dist/chunk-PWNNSGFL.js +0 -20
  144. package/dist/chunk-PWNNSGFL.js.map +0 -1
  145. package/dist/chunk-Q2PGZVOT.js +0 -36
  146. package/dist/chunk-Q2PGZVOT.js.map +0 -1
  147. package/dist/chunk-Q2XDMV7U.js +0 -76
  148. package/dist/chunk-Q2XDMV7U.js.map +0 -1
  149. package/dist/chunk-QG7FH2FI.js +0 -45
  150. package/dist/chunk-QG7FH2FI.js.map +0 -1
  151. package/dist/chunk-R7HUOK2D.js +0 -1914
  152. package/dist/chunk-R7HUOK2D.js.map +0 -1
  153. package/dist/chunk-REUYY7G5.js +0 -773
  154. package/dist/chunk-REUYY7G5.js.map +0 -1
  155. package/dist/chunk-RHC2Z2HT.js +0 -199
  156. package/dist/chunk-RHC2Z2HT.js.map +0 -1
  157. package/dist/chunk-RMCVLIFE.js +0 -23
  158. package/dist/chunk-RMCVLIFE.js.map +0 -1
  159. package/dist/chunk-ROZLTXGR.js +0 -234
  160. package/dist/chunk-ROZLTXGR.js.map +0 -1
  161. package/dist/chunk-RSS2C2O3.js +0 -17
  162. package/dist/chunk-RSS2C2O3.js.map +0 -1
  163. package/dist/chunk-SAGCG5SH.js +0 -355
  164. package/dist/chunk-SAGCG5SH.js.map +0 -1
  165. package/dist/chunk-TM6AOUSD.js +0 -40
  166. package/dist/chunk-TM6AOUSD.js.map +0 -1
  167. package/dist/chunk-TPK4BYCO.js +0 -970
  168. package/dist/chunk-TPK4BYCO.js.map +0 -1
  169. package/dist/chunk-UNQIL4K2.js +0 -34
  170. package/dist/chunk-UNQIL4K2.js.map +0 -1
  171. package/dist/chunk-UUG6L75Y.js +0 -47
  172. package/dist/chunk-UUG6L75Y.js.map +0 -1
  173. package/dist/chunk-V2SYMV4W.js +0 -114
  174. package/dist/chunk-V2SYMV4W.js.map +0 -1
  175. package/dist/chunk-V7EN5CTH.js +0 -130
  176. package/dist/chunk-V7EN5CTH.js.map +0 -1
  177. package/dist/chunk-VITKG2HL.js +0 -1125
  178. package/dist/chunk-VITKG2HL.js.map +0 -1
  179. package/dist/chunk-VYEWU5LO.js +0 -2631
  180. package/dist/chunk-VYEWU5LO.js.map +0 -1
  181. package/dist/chunk-W67QAGSH.js +0 -178
  182. package/dist/chunk-W67QAGSH.js.map +0 -1
  183. package/dist/chunk-WWBIN6KV.js +0 -1353
  184. package/dist/chunk-WWBIN6KV.js.map +0 -1
  185. package/dist/chunk-X77Z4PFB.js +0 -224
  186. package/dist/chunk-X77Z4PFB.js.map +0 -1
  187. package/dist/chunk-X7VG7OTT.js +0 -8
  188. package/dist/chunk-X7VG7OTT.js.map +0 -1
  189. package/dist/chunk-XE4K2SGI.js +0 -74
  190. package/dist/chunk-XE4K2SGI.js.map +0 -1
  191. package/dist/chunk-YIUG7IJK.js +0 -628
  192. package/dist/chunk-YIUG7IJK.js.map +0 -1
  193. package/dist/chunk-YNVN3V4Y.js +0 -13
  194. package/dist/chunk-YNVN3V4Y.js.map +0 -1
  195. package/dist/chunk-Z2S54IZX.js +0 -198
  196. package/dist/chunk-Z2S54IZX.js.map +0 -1
  197. package/dist/chunk-ZR6AH25Z.js +0 -17
  198. package/dist/chunk-ZR6AH25Z.js.map +0 -1
  199. package/dist/dialog-SPM3DTTI.js +0 -17
  200. package/dist/dialog-SPM3DTTI.js.map +0 -1
  201. package/dist/dropdown-menu-HMTWKWGK.js +0 -21
  202. package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
  203. package/dist/input-BH4P4S26.js +0 -6
  204. package/dist/input-BH4P4S26.js.map +0 -1
  205. package/dist/label-5Z4Q6VER.js +0 -8
  206. package/dist/label-5Z4Q6VER.js.map +0 -1
  207. package/dist/popover-IFOUXYLI.js +0 -18
  208. package/dist/popover-IFOUXYLI.js.map +0 -1
  209. package/dist/scroll-area-DJXNW6QX.js +0 -14
  210. package/dist/scroll-area-DJXNW6QX.js.map +0 -1
  211. package/dist/select-FZ277C3G.js +0 -22
  212. package/dist/select-FZ277C3G.js.map +0 -1
  213. package/dist/separator-BTMLN4NB.js +0 -8
  214. package/dist/separator-BTMLN4NB.js.map +0 -1
  215. package/dist/skeleton-DXIWBH4W.js +0 -6
  216. package/dist/skeleton-DXIWBH4W.js.map +0 -1
  217. package/dist/switch-4MCXIZBY.js +0 -13
  218. package/dist/switch-4MCXIZBY.js.map +0 -1
  219. package/dist/tabs-O7AW3APK.js +0 -17
  220. package/dist/tabs-O7AW3APK.js.map +0 -1
  221. package/dist/textarea-IB5WAFDO.js +0 -6
  222. package/dist/textarea-IB5WAFDO.js.map +0 -1
  223. package/dist/toggle-XVPPG6P4.js +0 -10
  224. package/dist/toggle-XVPPG6P4.js.map +0 -1
  225. package/dist/tooltip-JICZTD4F.js +0 -18
  226. 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.6",
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
- "homepage": "https://github.com/backbay/glia#readme",
9
+ "author": "Backbay <dev@backbay.industries>",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/backbay/glia.git"
12
+ "url": "https://github.com/backbay/backbay-sdk.git",
13
+ "directory": "packages/glia"
13
14
  },
14
15
  "bugs": {
15
- "url": "https://github.com/backbay/glia/issues"
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.4",
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.2",
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,6 +0,0 @@
1
- export { AuroraBackground } from './chunk-QG7FH2FI.js';
2
- import './chunk-6RX2WGCO.js';
3
- import './chunk-3CMPQOMY.js';
4
- import './chunk-TM6AOUSD.js';
5
- //# sourceMappingURL=AuroraBackground-AP6ZHVFA.js.map
6
- //# sourceMappingURL=AuroraBackground-AP6ZHVFA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"AuroraBackground-AP6ZHVFA.js"}
@@ -1,6 +0,0 @@
1
- export { BentoGrid, BentoGridItem } from './chunk-UUG6L75Y.js';
2
- import './chunk-6RX2WGCO.js';
3
- import './chunk-3CMPQOMY.js';
4
- import './chunk-TM6AOUSD.js';
5
- //# sourceMappingURL=BentoGrid-CDARICNM.js.map
6
- //# sourceMappingURL=BentoGrid-CDARICNM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"BentoGrid-CDARICNM.js"}
@@ -1,6 +0,0 @@
1
- export { CommandPalette } from './chunk-W67QAGSH.js';
2
- import './chunk-6RX2WGCO.js';
3
- import './chunk-3CMPQOMY.js';
4
- import './chunk-TM6AOUSD.js';
5
- //# sourceMappingURL=CommandPalette-JCWJKRBY.js.map
6
- //# sourceMappingURL=CommandPalette-JCWJKRBY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"CommandPalette-JCWJKRBY.js"}
@@ -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,6 +0,0 @@
1
- export { GlitchText } from './chunk-GRTRSCTD.js';
2
- import './chunk-6RX2WGCO.js';
3
- import './chunk-3CMPQOMY.js';
4
- import './chunk-TM6AOUSD.js';
5
- //# sourceMappingURL=GlitchText-KLQ57PPY.js.map
6
- //# sourceMappingURL=GlitchText-KLQ57PPY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"GlitchText-KLQ57PPY.js"}
@@ -1,6 +0,0 @@
1
- export { GlowButton } from './chunk-MQIU2NYA.js';
2
- import './chunk-6RX2WGCO.js';
3
- import './chunk-3CMPQOMY.js';
4
- import './chunk-TM6AOUSD.js';
5
- //# sourceMappingURL=GlowButton-VGBPMZO7.js.map
6
- //# sourceMappingURL=GlowButton-VGBPMZO7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"GlowButton-VGBPMZO7.js"}
@@ -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