@backbay/glia-three 0.2.0-alpha.2

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 (172) hide show
  1. package/package.json +43 -0
  2. package/src/environment/AuroraLayer/AuroraLayer.stories.tsx +43 -0
  3. package/src/environment/AuroraLayer/AuroraLayer.tsx +200 -0
  4. package/src/environment/AuroraLayer/index.ts +2 -0
  5. package/src/environment/AuroraLayer/types.ts +30 -0
  6. package/src/environment/EnvironmentLayer/EnvironmentLayer.stories.tsx +262 -0
  7. package/src/environment/EnvironmentLayer/EnvironmentLayer.tsx +105 -0
  8. package/src/environment/EnvironmentLayer/index.ts +4 -0
  9. package/src/environment/EnvironmentLayer/presets.ts +128 -0
  10. package/src/environment/FogLayer/FogLayer.stories.tsx +83 -0
  11. package/src/environment/FogLayer/FogLayer.tsx +113 -0
  12. package/src/environment/FogLayer/index.ts +2 -0
  13. package/src/environment/FogLayer/types.ts +45 -0
  14. package/src/environment/VolumetricLight/VolumetricLight.stories.tsx +55 -0
  15. package/src/environment/VolumetricLight/VolumetricLight.tsx +188 -0
  16. package/src/environment/VolumetricLight/index.ts +2 -0
  17. package/src/environment/VolumetricLight/types.ts +33 -0
  18. package/src/environment/WeatherLayer/WeatherLayer.stories.tsx +348 -0
  19. package/src/environment/WeatherLayer/WeatherLayer.tsx +266 -0
  20. package/src/environment/WeatherLayer/cinematicCanvas.tsx +809 -0
  21. package/src/environment/WeatherLayer/colors.ts +27 -0
  22. package/src/environment/WeatherLayer/index.ts +4 -0
  23. package/src/environment/WeatherLayer/leafPresets.ts +12 -0
  24. package/src/environment/WeatherLayer/particles.ts +227 -0
  25. package/src/environment/WeatherLayer/types.ts +140 -0
  26. package/src/environment/index.ts +17 -0
  27. package/src/environment/shared/index.ts +2 -0
  28. package/src/environment/shared/noise.ts +10 -0
  29. package/src/environment/shared/performance.ts +33 -0
  30. package/src/environment/shared/types.ts +26 -0
  31. package/src/index.ts +2 -0
  32. package/src/lib/utils.ts +6 -0
  33. package/src/lib/vision-types.ts +84 -0
  34. package/src/three/AgentConsole/AgentConsole.stories.tsx +397 -0
  35. package/src/three/AgentConsole/AgentConsole.tsx +195 -0
  36. package/src/three/AgentConsole/ConsoleChat.tsx +237 -0
  37. package/src/three/AgentConsole/FocusConstellation.tsx +297 -0
  38. package/src/three/AgentConsole/GlyphAvatar.stories.tsx +110 -0
  39. package/src/three/AgentConsole/GlyphAvatar.tsx +117 -0
  40. package/src/three/AgentConsole/QuickActions.tsx +111 -0
  41. package/src/three/AgentConsole/index.ts +41 -0
  42. package/src/three/AgentConsole/types.ts +241 -0
  43. package/src/three/AmbientField/AmbientField.stories.tsx +290 -0
  44. package/src/three/AmbientField/AmbientField.tsx +307 -0
  45. package/src/three/AmbientField/BackbayFieldBus.ts +326 -0
  46. package/src/three/AmbientField/FieldProvider.tsx +83 -0
  47. package/src/three/AmbientField/index.ts +37 -0
  48. package/src/three/AmbientField/shaders/constellation.ts +384 -0
  49. package/src/three/AmbientField/types.ts +174 -0
  50. package/src/three/AttackGraph/AttackGraph.stories.tsx +144 -0
  51. package/src/three/AttackGraph/AttackGraph.tsx +325 -0
  52. package/src/three/AttackGraph/index.ts +19 -0
  53. package/src/three/AttackGraph/types.ts +97 -0
  54. package/src/three/AuditTrail/AuditTrail.stories.tsx +567 -0
  55. package/src/three/AuditTrail/AuditTrail.tsx +644 -0
  56. package/src/three/AuditTrail/index.ts +33 -0
  57. package/src/three/AuditTrail/types.ts +192 -0
  58. package/src/three/CrystallineOrganism/Breadcrumb.tsx +61 -0
  59. package/src/three/CrystallineOrganism/CrystallineOrganism.stories.tsx +509 -0
  60. package/src/three/CrystallineOrganism/CrystallineOrganism.tsx +273 -0
  61. package/src/three/CrystallineOrganism/LatticeEdge.tsx +69 -0
  62. package/src/three/CrystallineOrganism/OrganismLattice.tsx +159 -0
  63. package/src/three/CrystallineOrganism/OrganismParticles.tsx +148 -0
  64. package/src/three/CrystallineOrganism/OrganismShell.tsx +277 -0
  65. package/src/three/CrystallineOrganism/constants.ts +161 -0
  66. package/src/three/CrystallineOrganism/index.ts +17 -0
  67. package/src/three/CrystallineOrganism/layouts/hexGrid.ts +85 -0
  68. package/src/three/CrystallineOrganism/layouts/index.ts +1 -0
  69. package/src/three/CrystallineOrganism/types.ts +167 -0
  70. package/src/three/CrystallineOrganism/useOrganismEmotion.ts +84 -0
  71. package/src/three/FirewallBarrier/FirewallBarrier.stories.tsx +167 -0
  72. package/src/three/FirewallBarrier/FirewallBarrier.tsx +259 -0
  73. package/src/three/FirewallBarrier/index.ts +14 -0
  74. package/src/three/FirewallBarrier/types.ts +52 -0
  75. package/src/three/Glyph/GlyphObject.stories.tsx +577 -0
  76. package/src/three/Glyph/GlyphObject.tsx +422 -0
  77. package/src/three/Glyph/index.ts +10 -0
  78. package/src/three/Glyph/types.ts +36 -0
  79. package/src/three/Glyph/useGlyphController.ts +231 -0
  80. package/src/three/Glyph/useGlyphEmotion.ts +70 -0
  81. package/src/three/Graph3D/Graph3D.stories.tsx +269 -0
  82. package/src/three/Graph3D/Graph3D.tsx +248 -0
  83. package/src/three/Graph3D/GraphEdge.tsx +79 -0
  84. package/src/three/Graph3D/GraphNode.tsx +239 -0
  85. package/src/three/Graph3D/types.ts +66 -0
  86. package/src/three/Graph3D/utils.ts +204 -0
  87. package/src/three/IntelFeed/IntelFeed.stories.tsx +168 -0
  88. package/src/three/IntelFeed/IntelFeed.tsx +284 -0
  89. package/src/three/IntelFeed/index.ts +14 -0
  90. package/src/three/IntelFeed/types.ts +56 -0
  91. package/src/three/MetricsGalaxy/MetricsGalaxy.tsx +484 -0
  92. package/src/three/MetricsGalaxy/index.ts +6 -0
  93. package/src/three/MetricsGalaxy/types.ts +26 -0
  94. package/src/three/NetworkTopology/NetworkTopology.stories.tsx +184 -0
  95. package/src/three/NetworkTopology/NetworkTopology.tsx +421 -0
  96. package/src/three/NetworkTopology/index.ts +34 -0
  97. package/src/three/NetworkTopology/types.ts +128 -0
  98. package/src/three/ParticleField/ParticleField.stories.tsx +162 -0
  99. package/src/three/ParticleField/ParticleField.tsx +81 -0
  100. package/src/three/ParticleField/index.ts +1 -0
  101. package/src/three/PermissionMatrix/PermissionMatrix.stories.tsx +475 -0
  102. package/src/three/PermissionMatrix/PermissionMatrix.tsx +380 -0
  103. package/src/three/PermissionMatrix/index.ts +15 -0
  104. package/src/three/PermissionMatrix/types.ts +54 -0
  105. package/src/three/QuantumField/ConstellationField.tsx +238 -0
  106. package/src/three/QuantumField/FieldBus.ts +349 -0
  107. package/src/three/QuantumField/FieldLayer.tsx +430 -0
  108. package/src/three/QuantumField/FieldProvider.tsx +460 -0
  109. package/src/three/QuantumField/PcbField.tsx +406 -0
  110. package/src/three/QuantumField/QuantumField.stories.tsx +1155 -0
  111. package/src/three/QuantumField/TrailRTT.ts +212 -0
  112. package/src/three/QuantumField/WaterField.tsx +226 -0
  113. package/src/three/QuantumField/WaterSimRTT.ts +283 -0
  114. package/src/three/QuantumField/domMapping.ts +185 -0
  115. package/src/three/QuantumField/index.ts +110 -0
  116. package/src/three/QuantumField/styles/index.ts +9 -0
  117. package/src/three/QuantumField/styles/styleA.ts +526 -0
  118. package/src/three/QuantumField/styles/styleB.ts +1210 -0
  119. package/src/three/QuantumField/styles/styleC.ts +266 -0
  120. package/src/three/QuantumField/themes.ts +211 -0
  121. package/src/three/QuantumField/types.ts +380 -0
  122. package/src/three/SOCCommandCenter/SOCCommandCenter.stories.tsx +591 -0
  123. package/src/three/SOCCommandCenter/SOCCommandCenter.tsx +248 -0
  124. package/src/three/SOCCommandCenter/index.ts +26 -0
  125. package/src/three/SOCCommandCenter/types.ts +201 -0
  126. package/src/three/SecurityDashboard/SecurityDashboard.stories.tsx +508 -0
  127. package/src/three/SecurityDashboard/SecurityDashboard.tsx +507 -0
  128. package/src/three/SecurityDashboard/index.ts +37 -0
  129. package/src/three/SecurityDashboard/types.ts +143 -0
  130. package/src/three/SecurityShield/SecurityShield.stories.tsx +257 -0
  131. package/src/three/SecurityShield/SecurityShield.tsx +502 -0
  132. package/src/three/SecurityShield/index.ts +25 -0
  133. package/src/three/SecurityShield/types.ts +64 -0
  134. package/src/three/Sentinel/AvatarMode.tsx +578 -0
  135. package/src/three/Sentinel/AvatarRenderer.tsx +199 -0
  136. package/src/three/Sentinel/CameraPip.tsx +127 -0
  137. package/src/three/Sentinel/CardinalItem.tsx +83 -0
  138. package/src/three/Sentinel/CardinalMenu.tsx +370 -0
  139. package/src/three/Sentinel/DockedMiniOrb.tsx +146 -0
  140. package/src/three/Sentinel/RadialSubmenu.tsx +273 -0
  141. package/src/three/Sentinel/SentinelConversation.tsx +802 -0
  142. package/src/three/Sentinel/SentinelOrb.tsx +316 -0
  143. package/src/three/Sentinel/SentinelOverlay.tsx +146 -0
  144. package/src/three/Sentinel/SentinelProvider.tsx +145 -0
  145. package/src/three/Sentinel/SentinelTether.tsx +182 -0
  146. package/src/three/Sentinel/SigilPlaceholder.tsx +176 -0
  147. package/src/three/Sentinel/VerticalSubmenu.tsx +150 -0
  148. package/src/three/Sentinel/index.ts +145 -0
  149. package/src/three/Sentinel/sentinelStore.ts +196 -0
  150. package/src/three/Sentinel/types.ts +403 -0
  151. package/src/three/Sentinel/useCameraPermission.ts +153 -0
  152. package/src/three/Sentinel/useThrowPhysics.ts +220 -0
  153. package/src/three/SpatialWorkspace/CyntraWorkspace.tsx +84 -0
  154. package/src/three/SpatialWorkspace/JobCluster.tsx +281 -0
  155. package/src/three/SpatialWorkspace/NodeGraph.tsx +236 -0
  156. package/src/three/SpatialWorkspace/ReceiptOrbit.tsx +368 -0
  157. package/src/three/SpatialWorkspace/SpatialWorkspace.stories.tsx +547 -0
  158. package/src/three/SpatialWorkspace/SpatialWorkspace.tsx +428 -0
  159. package/src/three/SpatialWorkspace/TrustRings.tsx +228 -0
  160. package/src/three/SpatialWorkspace/adapters.ts +353 -0
  161. package/src/three/SpatialWorkspace/index.ts +85 -0
  162. package/src/three/SpatialWorkspace/nexusAdapter.ts +182 -0
  163. package/src/three/SpatialWorkspace/types.ts +389 -0
  164. package/src/three/ThreatRadar/ThreatRadar.stories.tsx +451 -0
  165. package/src/three/ThreatRadar/ThreatRadar.tsx +542 -0
  166. package/src/three/ThreatRadar/index.ts +8 -0
  167. package/src/three/ThreatRadar/types.ts +90 -0
  168. package/src/three/ThreeErrorBoundary/ThreeErrorBoundary.tsx +235 -0
  169. package/src/three/ThreeErrorBoundary/index.ts +5 -0
  170. package/src/three/index.ts +56 -0
  171. package/tsconfig.json +20 -0
  172. package/tsup.config.ts +21 -0
@@ -0,0 +1,591 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Canvas } from "@react-three/fiber";
3
+ import { OrbitControls, Stars } from "@react-three/drei";
4
+ import * as React from "react";
5
+ import { SOCCommandCenter } from "./SOCCommandCenter";
6
+ import type { SOCCommandCenterProps } from "./types";
7
+
8
+ const networkData: SOCCommandCenterProps["networkData"] = {
9
+ nodes: [
10
+ {
11
+ id: "fw-1",
12
+ type: "firewall",
13
+ hostname: "gateway-fw",
14
+ ip: "10.0.0.1",
15
+ status: "healthy",
16
+ services: ["vpn", "dpi"],
17
+ },
18
+ {
19
+ id: "router-1",
20
+ type: "router",
21
+ hostname: "core-router",
22
+ ip: "10.0.0.254",
23
+ status: "warning",
24
+ services: ["bgp", "ospf"],
25
+ vulnerabilities: 2,
26
+ },
27
+ {
28
+ id: "srv-1",
29
+ type: "server",
30
+ hostname: "db-prod-01",
31
+ ip: "10.0.2.10",
32
+ status: "healthy",
33
+ services: ["postgres"],
34
+ },
35
+ {
36
+ id: "srv-2",
37
+ type: "server",
38
+ hostname: "api-prod-02",
39
+ ip: "10.0.2.20",
40
+ status: "compromised",
41
+ services: ["api", "grpc"],
42
+ vulnerabilities: 5,
43
+ },
44
+ {
45
+ id: "ws-1",
46
+ type: "workstation",
47
+ hostname: "analyst-07",
48
+ ip: "10.0.4.33",
49
+ status: "healthy",
50
+ services: ["edr"],
51
+ },
52
+ ],
53
+ edges: [
54
+ {
55
+ id: "e1",
56
+ source: "fw-1",
57
+ target: "router-1",
58
+ protocol: "tcp",
59
+ encrypted: true,
60
+ status: "active",
61
+ bandwidth: 5800,
62
+ },
63
+ {
64
+ id: "e2",
65
+ source: "router-1",
66
+ target: "srv-1",
67
+ protocol: "https",
68
+ encrypted: true,
69
+ status: "active",
70
+ bandwidth: 3200,
71
+ },
72
+ {
73
+ id: "e3",
74
+ source: "router-1",
75
+ target: "srv-2",
76
+ protocol: "ssh",
77
+ encrypted: false,
78
+ status: "suspicious",
79
+ bandwidth: 1200,
80
+ },
81
+ {
82
+ id: "e4",
83
+ source: "router-1",
84
+ target: "ws-1",
85
+ protocol: "rdp",
86
+ encrypted: true,
87
+ status: "idle",
88
+ },
89
+ ],
90
+ layout: "force",
91
+ showTraffic: true,
92
+ showLabels: false,
93
+ };
94
+
95
+ const threatData: SOCCommandCenterProps["threatData"] = {
96
+ threats: [
97
+ {
98
+ id: "t-1",
99
+ angle: Math.PI * 0.2,
100
+ distance: 0.7,
101
+ severity: 0.85,
102
+ type: "malware",
103
+ active: true,
104
+ label: "Malware",
105
+ },
106
+ {
107
+ id: "t-2",
108
+ angle: Math.PI * 1.3,
109
+ distance: 0.5,
110
+ severity: 0.6,
111
+ type: "intrusion",
112
+ active: false,
113
+ label: "Intrusion",
114
+ },
115
+ {
116
+ id: "t-3",
117
+ angle: Math.PI * 1.9,
118
+ distance: 0.8,
119
+ severity: 0.9,
120
+ type: "ddos",
121
+ active: true,
122
+ label: "DDoS",
123
+ },
124
+ ],
125
+ radius: 2.2,
126
+ showLabels: false,
127
+ showStats: true,
128
+ };
129
+
130
+ const threatDataHigh: SOCCommandCenterProps["threatData"] = {
131
+ threats: [
132
+ {
133
+ id: "t-4",
134
+ angle: Math.PI * 0.1,
135
+ distance: 0.6,
136
+ severity: 0.95,
137
+ type: "malware",
138
+ active: true,
139
+ label: "Credential Theft",
140
+ },
141
+ {
142
+ id: "t-5",
143
+ angle: Math.PI * 0.55,
144
+ distance: 0.4,
145
+ severity: 0.82,
146
+ type: "intrusion",
147
+ active: true,
148
+ label: "Lateral Move",
149
+ },
150
+ {
151
+ id: "t-6",
152
+ angle: Math.PI * 1.25,
153
+ distance: 0.75,
154
+ severity: 0.88,
155
+ type: "ddos",
156
+ active: true,
157
+ label: "Volumetric",
158
+ },
159
+ {
160
+ id: "t-7",
161
+ angle: Math.PI * 1.7,
162
+ distance: 0.65,
163
+ severity: 0.7,
164
+ type: "phishing",
165
+ active: false,
166
+ label: "Phishing",
167
+ },
168
+ ],
169
+ radius: 2.4,
170
+ showLabels: false,
171
+ showStats: true,
172
+ };
173
+
174
+ const threatDataCalm: SOCCommandCenterProps["threatData"] = {
175
+ threats: [
176
+ {
177
+ id: "t-8",
178
+ angle: Math.PI * 0.4,
179
+ distance: 0.5,
180
+ severity: 0.2,
181
+ type: "anomaly",
182
+ active: false,
183
+ label: "Anomaly",
184
+ },
185
+ {
186
+ id: "t-9",
187
+ angle: Math.PI * 1.4,
188
+ distance: 0.7,
189
+ severity: 0.3,
190
+ type: "intrusion",
191
+ active: false,
192
+ label: "Recon",
193
+ },
194
+ ],
195
+ radius: 2.1,
196
+ showLabels: false,
197
+ showStats: false,
198
+ };
199
+
200
+ const auditEvents: SOCCommandCenterProps["auditData"]["events"] = [
201
+ {
202
+ id: "event-1",
203
+ timestamp: new Date(Date.now() - 1000 * 60 * 12),
204
+ type: "login",
205
+ severity: "info",
206
+ actor: "svc-auth",
207
+ resource: "auth-service",
208
+ action: "login success",
209
+ success: true,
210
+ },
211
+ {
212
+ id: "event-2",
213
+ timestamp: new Date(Date.now() - 1000 * 60 * 8),
214
+ type: "access",
215
+ severity: "warning",
216
+ actor: "api-prod-02",
217
+ resource: "customer-db",
218
+ action: "unusual query volume",
219
+ success: false,
220
+ },
221
+ {
222
+ id: "event-3",
223
+ timestamp: new Date(Date.now() - 1000 * 60 * 4),
224
+ type: "alert",
225
+ severity: "critical",
226
+ actor: "edr-agent",
227
+ resource: "workstation-07",
228
+ action: "malicious process blocked",
229
+ success: true,
230
+ },
231
+ ];
232
+
233
+ const auditData: SOCCommandCenterProps["auditData"] = {
234
+ events: auditEvents,
235
+ orientation: "vertical",
236
+ showDetails: true,
237
+ showSummary: false,
238
+ enableParticles: true,
239
+ };
240
+
241
+ const auditEventsHigh: SOCCommandCenterProps["auditData"]["events"] = [
242
+ ...auditEvents,
243
+ {
244
+ id: "event-4",
245
+ timestamp: new Date(Date.now() - 1000 * 60 * 2),
246
+ type: "error",
247
+ severity: "error",
248
+ actor: "edr-agent",
249
+ resource: "api-prod-02",
250
+ action: "suspicious process spawned",
251
+ success: false,
252
+ },
253
+ {
254
+ id: "event-5",
255
+ timestamp: new Date(Date.now() - 1000 * 60 * 1),
256
+ type: "alert",
257
+ severity: "critical",
258
+ actor: "soc-sentinel",
259
+ resource: "vpn-gateway",
260
+ action: "brute force detected",
261
+ success: false,
262
+ },
263
+ ];
264
+
265
+ const auditDataHigh: SOCCommandCenterProps["auditData"] = {
266
+ events: auditEventsHigh,
267
+ orientation: "vertical",
268
+ showDetails: true,
269
+ showSummary: false,
270
+ enableParticles: true,
271
+ };
272
+
273
+ const auditEventsCalm: SOCCommandCenterProps["auditData"]["events"] = [
274
+ {
275
+ id: "event-6",
276
+ timestamp: new Date(Date.now() - 1000 * 60 * 18),
277
+ type: "login",
278
+ severity: "info",
279
+ actor: "svc-auth",
280
+ resource: "auth-service",
281
+ action: "login success",
282
+ success: true,
283
+ },
284
+ {
285
+ id: "event-7",
286
+ timestamp: new Date(Date.now() - 1000 * 60 * 10),
287
+ type: "access",
288
+ severity: "info",
289
+ actor: "reporting-job",
290
+ resource: "metrics-cluster",
291
+ action: "scheduled export",
292
+ success: true,
293
+ },
294
+ ];
295
+
296
+ const auditDataCalm: SOCCommandCenterProps["auditData"] = {
297
+ events: auditEventsCalm,
298
+ orientation: "vertical",
299
+ showDetails: false,
300
+ showSummary: false,
301
+ enableParticles: false,
302
+ };
303
+
304
+ const alertData: SOCCommandCenterProps["alertData"] = {
305
+ shield: {
306
+ level: 0.7,
307
+ status: "warning",
308
+ threatsBlocked: 12,
309
+ },
310
+ threats: threatData.threats,
311
+ auditEvents,
312
+ layout: "compact",
313
+ showConnections: false,
314
+ showStatusHUD: false,
315
+ animated: true,
316
+ theme: "cyber",
317
+ };
318
+
319
+ const alertDataCritical: SOCCommandCenterProps["alertData"] = {
320
+ shield: {
321
+ level: 0.35,
322
+ status: "breach",
323
+ threatsBlocked: 4,
324
+ },
325
+ threats: threatDataHigh.threats,
326
+ auditEvents: auditEventsHigh,
327
+ layout: "compact",
328
+ showConnections: false,
329
+ showStatusHUD: false,
330
+ animated: true,
331
+ theme: "cyber",
332
+ };
333
+
334
+ const alertDataCalm: SOCCommandCenterProps["alertData"] = {
335
+ shield: {
336
+ level: 0.95,
337
+ status: "active",
338
+ threatsBlocked: 28,
339
+ },
340
+ threats: threatDataCalm.threats,
341
+ auditEvents: auditEventsCalm,
342
+ layout: "compact",
343
+ showConnections: false,
344
+ showStatusHUD: false,
345
+ animated: true,
346
+ theme: "blueprint",
347
+ };
348
+
349
+ const intelData: SOCCommandCenterProps["intelData"] = {
350
+ sources: [
351
+ { id: "s1", name: "OpenCTI", type: "osint", reliability: 0.72 },
352
+ { id: "s2", name: "Finance-ISAC", type: "isac", reliability: 0.86 },
353
+ { id: "s3", name: "SOC Sensors", type: "internal", reliability: 0.9 },
354
+ ],
355
+ items: [
356
+ {
357
+ id: "intel-1",
358
+ source: "SOC Sensors",
359
+ type: "ioc",
360
+ severity: "high",
361
+ title: "Suspicious Beacon",
362
+ summary: "HTTPS beacon to 104.21.33.7",
363
+ timestamp: new Date(Date.now() - 1000 * 60 * 15),
364
+ actionRequired: true,
365
+ },
366
+ {
367
+ id: "intel-2",
368
+ source: "OpenCTI",
369
+ type: "actor",
370
+ severity: "medium",
371
+ title: "APT29 Activity",
372
+ summary: "New infrastructure targeting SaaS",
373
+ timestamp: new Date(Date.now() - 1000 * 60 * 35),
374
+ },
375
+ {
376
+ id: "intel-3",
377
+ source: "Finance-ISAC",
378
+ type: "vulnerability",
379
+ severity: "critical",
380
+ title: "CVE-2026-1024",
381
+ summary: "RCE in VPN gateway",
382
+ timestamp: new Date(Date.now() - 1000 * 60 * 55),
383
+ actionRequired: true,
384
+ },
385
+ ],
386
+ layout: "waterfall",
387
+ autoScroll: true,
388
+ };
389
+
390
+ const intelDataDense: SOCCommandCenterProps["intelData"] = {
391
+ ...intelData,
392
+ items: [
393
+ ...intelData.items,
394
+ {
395
+ id: "intel-4",
396
+ source: "SOC Sensors",
397
+ type: "ioc",
398
+ severity: "high",
399
+ title: "DNS Tunneling",
400
+ summary: "Anomalous NXDOMAIN burst",
401
+ timestamp: new Date(Date.now() - 1000 * 60 * 70),
402
+ },
403
+ {
404
+ id: "intel-5",
405
+ source: "OpenCTI",
406
+ type: "tool",
407
+ severity: "medium",
408
+ title: "Cobalt Strike",
409
+ summary: "Beacon signatures observed",
410
+ timestamp: new Date(Date.now() - 1000 * 60 * 90),
411
+ },
412
+ {
413
+ id: "intel-6",
414
+ source: "Finance-ISAC",
415
+ type: "report",
416
+ severity: "low",
417
+ title: "Weekly Threat Brief",
418
+ summary: "Sector update",
419
+ timestamp: new Date(Date.now() - 1000 * 60 * 110),
420
+ },
421
+ ],
422
+ layout: "waterfall",
423
+ autoScroll: true,
424
+ };
425
+
426
+ const intelDataGrid: SOCCommandCenterProps["intelData"] = {
427
+ ...intelDataDense,
428
+ layout: "grid",
429
+ autoScroll: false,
430
+ };
431
+
432
+ const intelDataTimeline: SOCCommandCenterProps["intelData"] = {
433
+ ...intelDataDense,
434
+ layout: "timeline",
435
+ autoScroll: false,
436
+ };
437
+
438
+ const meta: Meta<typeof SOCCommandCenter> = {
439
+ title: "Primitives/3D/Security/SOCCommandCenter",
440
+ component: SOCCommandCenter,
441
+ parameters: {
442
+ layout: "fullscreen",
443
+ backgrounds: { default: "dark" },
444
+ },
445
+ decorators: [
446
+ (Story) => (
447
+ <div style={{ width: "100vw", height: "100vh", background: "#050812" }}>
448
+ <Canvas camera={{ position: [0, 4.5, 14], fov: 45 }} dpr={[1, 2]}>
449
+ <color attach="background" args={["#050812"]} />
450
+ <fog attach="fog" args={["#050812", 10, 30]} />
451
+ <Stars radius={90} depth={40} count={1600} factor={2} saturation={0} fade speed={0.3} />
452
+ <ambientLight intensity={0.3} />
453
+ <pointLight position={[8, 10, 8]} intensity={0.8} color="#38bdf8" />
454
+ <pointLight position={[-8, 6, -8]} intensity={0.4} color="#22d3ee" />
455
+ <OrbitControls enableDamping dampingFactor={0.08} />
456
+ <Story />
457
+ </Canvas>
458
+ </div>
459
+ ),
460
+ ],
461
+ };
462
+
463
+ export default meta;
464
+ type Story = StoryObj<typeof SOCCommandCenter>;
465
+
466
+ export const Standard: Story = {
467
+ args: {
468
+ networkData,
469
+ threatData,
470
+ auditData,
471
+ alertData,
472
+ intelData,
473
+ layout: "standard",
474
+ showGlobalStatus: true,
475
+ },
476
+ };
477
+
478
+ export const Expanded: Story = {
479
+ args: {
480
+ networkData,
481
+ threatData,
482
+ auditData,
483
+ alertData,
484
+ intelData,
485
+ layout: "expanded",
486
+ showGlobalStatus: true,
487
+ theme: "blueprint",
488
+ },
489
+ };
490
+
491
+ export const Compact: Story = {
492
+ args: {
493
+ networkData,
494
+ threatData,
495
+ auditData,
496
+ alertData,
497
+ intelData,
498
+ layout: "compact",
499
+ showGlobalStatus: false,
500
+ theme: "matrix",
501
+ },
502
+ };
503
+
504
+ export const HighAlertHero: Story = {
505
+ args: {
506
+ networkData,
507
+ threatData: threatDataHigh,
508
+ auditData: auditDataHigh,
509
+ alertData: alertDataCritical,
510
+ intelData: intelDataDense,
511
+ layout: "standard",
512
+ selectedPanel: "threat",
513
+ showGlobalStatus: true,
514
+ theme: "cyber",
515
+ },
516
+ };
517
+
518
+ export const QuietShift: Story = {
519
+ args: {
520
+ networkData: {
521
+ ...networkData,
522
+ nodes: networkData.nodes.map((node) => ({
523
+ ...node,
524
+ status: node.id === "srv-2" ? "warning" : "healthy",
525
+ vulnerabilities: node.id === "srv-2" ? 1 : node.vulnerabilities,
526
+ })),
527
+ },
528
+ threatData: threatDataCalm,
529
+ auditData: auditDataCalm,
530
+ alertData: alertDataCalm,
531
+ intelData: { ...intelData, layout: "timeline", autoScroll: false },
532
+ layout: "standard",
533
+ showGlobalStatus: true,
534
+ theme: "blueprint",
535
+ },
536
+ };
537
+
538
+ export const IntelGridFocus: Story = {
539
+ args: {
540
+ networkData,
541
+ threatData,
542
+ auditData,
543
+ alertData,
544
+ intelData: intelDataGrid,
545
+ layout: "expanded",
546
+ selectedPanel: "intel",
547
+ showGlobalStatus: true,
548
+ theme: "blueprint",
549
+ },
550
+ };
551
+
552
+ export const CompactSelected: Story = {
553
+ args: {
554
+ networkData,
555
+ threatData: threatDataHigh,
556
+ auditData: auditDataHigh,
557
+ alertData: alertDataCritical,
558
+ intelData: intelDataDense,
559
+ layout: "compact",
560
+ selectedPanel: "alerts",
561
+ showGlobalStatus: false,
562
+ theme: "matrix",
563
+ },
564
+ };
565
+
566
+ export const TypographyClean: Story = {
567
+ args: {
568
+ networkData,
569
+ threatData: { ...threatDataCalm, showStats: false },
570
+ auditData: auditDataCalm,
571
+ alertData: alertDataCalm,
572
+ intelData: { ...intelDataGrid, maxItems: 6 },
573
+ layout: "standard",
574
+ showGlobalStatus: true,
575
+ theme: "blueprint",
576
+ },
577
+ };
578
+
579
+ export const TimelineIntel: Story = {
580
+ args: {
581
+ networkData,
582
+ threatData,
583
+ auditData,
584
+ alertData,
585
+ intelData: intelDataTimeline,
586
+ layout: "expanded",
587
+ selectedPanel: "intel",
588
+ showGlobalStatus: true,
589
+ theme: "cyber",
590
+ },
591
+ };