@omiron33/omi-neuron-web 0.1.0 → 0.1.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.
- package/README.md +6 -2
- package/dist/NeuronWeb-DG5ICk2K.d.cts +113 -0
- package/dist/NeuronWeb-DbcYoeQE.d.ts +113 -0
- package/dist/api/index.cjs +32 -32
- package/dist/api/index.js +1 -1
- package/dist/{chunk-XNR42GCJ.js → chunk-6LW4KNAU.js} +2 -2
- package/dist/{chunk-XNR42GCJ.js.map → chunk-6LW4KNAU.js.map} +1 -1
- package/dist/chunk-GPDX3O37.js +1194 -0
- package/dist/chunk-GPDX3O37.js.map +1 -0
- package/dist/chunk-KC7V76I3.cjs +1220 -0
- package/dist/chunk-KC7V76I3.cjs.map +1 -0
- package/dist/{chunk-RTSFO7BW.cjs → chunk-OBZGUYGW.cjs} +2 -2
- package/dist/{chunk-RTSFO7BW.cjs.map → chunk-OBZGUYGW.cjs.map} +1 -1
- package/dist/cli/index.cjs +4 -4
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +4 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +51 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/visualization/index.cjs +21 -478
- package/dist/visualization/index.cjs.map +1 -1
- package/dist/visualization/index.d.cts +29 -77
- package/dist/visualization/index.d.ts +29 -77
- package/dist/visualization/index.js +1 -458
- package/dist/visualization/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,80 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { N as NeuronWebTheme, a as NeuronWebThemeOverride, b as NeuronLayoutOptions } from '../NeuronWeb-DG5ICk2K.cjs';
|
|
2
|
+
export { H as HoverCardOptions, e as NeuronLayoutMode, c as NeuronWeb, d as NeuronWebProps } from '../NeuronWeb-DG5ICk2K.cjs';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
5
5
|
import { CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
label: string;
|
|
10
|
-
nodeIds: string[];
|
|
11
|
-
}
|
|
12
|
-
interface StudyPathRequest {
|
|
13
|
-
fromNodeId: string;
|
|
14
|
-
toNodeId: string;
|
|
15
|
-
}
|
|
16
|
-
interface NeuronWebTheme {
|
|
17
|
-
colors: {
|
|
18
|
-
background: string;
|
|
19
|
-
domainColors: Record<string, string>;
|
|
20
|
-
defaultDomainColor: string;
|
|
21
|
-
edgeDefault: string;
|
|
22
|
-
edgeActive: string;
|
|
23
|
-
edgeSelected: string;
|
|
24
|
-
labelText: string;
|
|
25
|
-
labelBackground: string;
|
|
26
|
-
};
|
|
27
|
-
typography: {
|
|
28
|
-
labelFontFamily: string;
|
|
29
|
-
labelFontSize: number;
|
|
30
|
-
labelFontWeight: string;
|
|
31
|
-
};
|
|
32
|
-
effects: {
|
|
33
|
-
starfieldEnabled: boolean;
|
|
34
|
-
starfieldColor: string;
|
|
35
|
-
glowEnabled: boolean;
|
|
36
|
-
glowIntensity: number;
|
|
37
|
-
};
|
|
38
|
-
animation: {
|
|
39
|
-
focusDuration: number;
|
|
40
|
-
transitionDuration: number;
|
|
41
|
-
easing: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
interface NeuronWebProps {
|
|
45
|
-
graphData: {
|
|
46
|
-
nodes: NeuronVisualNode[];
|
|
47
|
-
edges: NeuronVisualEdge[];
|
|
48
|
-
storyBeats?: NeuronStoryBeat[];
|
|
49
|
-
};
|
|
50
|
-
fullHeight?: boolean;
|
|
51
|
-
isFullScreen?: boolean;
|
|
52
|
-
className?: string;
|
|
53
|
-
style?: React__default.CSSProperties;
|
|
54
|
-
isLoading?: boolean;
|
|
55
|
-
error?: string | null;
|
|
56
|
-
selectedNode?: NeuronNode | null;
|
|
57
|
-
focusNodeSlug?: string | null;
|
|
58
|
-
visibleNodeSlugs?: string[] | null;
|
|
59
|
-
onNodeClick?: (node: NeuronNode) => void;
|
|
60
|
-
onNodeDoubleClick?: (node: NeuronNode) => void;
|
|
61
|
-
onNodeHover?: (node: NeuronNode | null) => void;
|
|
62
|
-
onNodeFocused?: (node: NeuronNode) => void;
|
|
63
|
-
onEdgeClick?: (edge: NeuronEdge) => void;
|
|
64
|
-
onBackgroundClick?: () => void;
|
|
65
|
-
onCameraChange?: (position: [number, number, number]) => void;
|
|
66
|
-
studyPathRequest?: StudyPathRequest | null;
|
|
67
|
-
onStudyPathComplete?: () => void;
|
|
68
|
-
theme?: Partial<NeuronWebTheme>;
|
|
69
|
-
domainColors?: Record<string, string>;
|
|
70
|
-
renderNodeDetail?: (node: NeuronNode) => React__default.ReactNode;
|
|
71
|
-
renderEmptyState?: () => React__default.ReactNode;
|
|
72
|
-
renderLoadingState?: () => React__default.ReactNode;
|
|
73
|
-
performanceMode?: 'auto' | 'normal' | 'degraded' | 'fallback';
|
|
74
|
-
ariaLabel?: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
declare function NeuronWeb({ graphData, className, style, isLoading, error, renderEmptyState, renderLoadingState, ariaLabel, theme, }: NeuronWebProps): React__default.ReactElement;
|
|
6
|
+
import { N as NeuronVisualNode } from '../edge-BzsYe2Ed.cjs';
|
|
7
|
+
export { a as NeuronVisualEdge } from '../edge-BzsYe2Ed.cjs';
|
|
8
|
+
import 'react';
|
|
78
9
|
|
|
79
10
|
interface SceneConfig {
|
|
80
11
|
backgroundColor: string;
|
|
@@ -84,7 +15,15 @@ interface SceneConfig {
|
|
|
84
15
|
maxZoom: number;
|
|
85
16
|
enableStarfield: boolean;
|
|
86
17
|
starfieldCount: number;
|
|
18
|
+
starfieldColor: string;
|
|
87
19
|
pixelRatioCap: number;
|
|
20
|
+
ambientLightIntensity?: number;
|
|
21
|
+
keyLightIntensity?: number;
|
|
22
|
+
fillLightIntensity?: number;
|
|
23
|
+
fogEnabled?: boolean;
|
|
24
|
+
fogColor?: string;
|
|
25
|
+
fogNear?: number;
|
|
26
|
+
fogFar?: number;
|
|
88
27
|
}
|
|
89
28
|
declare class SceneManager {
|
|
90
29
|
private container;
|
|
@@ -95,6 +34,13 @@ declare class SceneManager {
|
|
|
95
34
|
labelRenderer: CSS2DRenderer;
|
|
96
35
|
controls: OrbitControls;
|
|
97
36
|
private animationId;
|
|
37
|
+
private lastFrameTime;
|
|
38
|
+
private elapsedTime;
|
|
39
|
+
private frameListeners;
|
|
40
|
+
private starfield;
|
|
41
|
+
private ambientLight;
|
|
42
|
+
private keyLight;
|
|
43
|
+
private fillLight;
|
|
98
44
|
constructor(container: HTMLElement, config: SceneConfig);
|
|
99
45
|
initialize(): void;
|
|
100
46
|
dispose(): void;
|
|
@@ -104,6 +50,7 @@ declare class SceneManager {
|
|
|
104
50
|
resize: () => void;
|
|
105
51
|
updateBackground(color: string): void;
|
|
106
52
|
updateCamera(position: [number, number, number]): void;
|
|
53
|
+
addFrameListener(listener: (delta: number, elapsed: number) => void): () => void;
|
|
107
54
|
getWorldPosition(screenX: number, screenY: number): THREE.Vector3;
|
|
108
55
|
screenToWorld(x: number, y: number): THREE.Vector3;
|
|
109
56
|
worldToScreen(position: THREE.Vector3): {
|
|
@@ -112,14 +59,16 @@ declare class SceneManager {
|
|
|
112
59
|
};
|
|
113
60
|
onContextLost: () => void;
|
|
114
61
|
onContextRestored: () => void;
|
|
62
|
+
private initStarfield;
|
|
63
|
+
private initLights;
|
|
115
64
|
}
|
|
116
65
|
|
|
117
66
|
declare class ThemeEngine {
|
|
118
67
|
private theme;
|
|
119
68
|
onThemeChange: (theme: NeuronWebTheme) => void;
|
|
120
|
-
constructor(initialTheme?:
|
|
69
|
+
constructor(initialTheme?: NeuronWebThemeOverride);
|
|
121
70
|
getTheme(): NeuronWebTheme;
|
|
122
|
-
setTheme(theme:
|
|
71
|
+
setTheme(theme: NeuronWebThemeOverride): void;
|
|
123
72
|
resetTheme(): void;
|
|
124
73
|
setDomainColor(domain: string, color: string): void;
|
|
125
74
|
setBackground(color: string): void;
|
|
@@ -127,8 +76,11 @@ declare class ThemeEngine {
|
|
|
127
76
|
applyPreset(preset: 'dark' | 'light' | 'custom'): void;
|
|
128
77
|
saveToStorage(): void;
|
|
129
78
|
loadFromStorage(): void;
|
|
79
|
+
private mergeTheme;
|
|
130
80
|
}
|
|
131
81
|
|
|
132
82
|
declare const DEFAULT_THEME: NeuronWebTheme;
|
|
133
83
|
|
|
134
|
-
|
|
84
|
+
declare function applyFuzzyLayout(nodes: NeuronVisualNode[], options?: NeuronLayoutOptions): NeuronVisualNode[];
|
|
85
|
+
|
|
86
|
+
export { DEFAULT_THEME, NeuronLayoutOptions, NeuronVisualNode, NeuronWebTheme, NeuronWebThemeOverride, SceneManager, ThemeEngine, applyFuzzyLayout };
|
|
@@ -1,80 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { N as NeuronWebTheme, a as NeuronWebThemeOverride, b as NeuronLayoutOptions } from '../NeuronWeb-DbcYoeQE.js';
|
|
2
|
+
export { H as HoverCardOptions, e as NeuronLayoutMode, c as NeuronWeb, d as NeuronWebProps } from '../NeuronWeb-DbcYoeQE.js';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
5
5
|
import { CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
label: string;
|
|
10
|
-
nodeIds: string[];
|
|
11
|
-
}
|
|
12
|
-
interface StudyPathRequest {
|
|
13
|
-
fromNodeId: string;
|
|
14
|
-
toNodeId: string;
|
|
15
|
-
}
|
|
16
|
-
interface NeuronWebTheme {
|
|
17
|
-
colors: {
|
|
18
|
-
background: string;
|
|
19
|
-
domainColors: Record<string, string>;
|
|
20
|
-
defaultDomainColor: string;
|
|
21
|
-
edgeDefault: string;
|
|
22
|
-
edgeActive: string;
|
|
23
|
-
edgeSelected: string;
|
|
24
|
-
labelText: string;
|
|
25
|
-
labelBackground: string;
|
|
26
|
-
};
|
|
27
|
-
typography: {
|
|
28
|
-
labelFontFamily: string;
|
|
29
|
-
labelFontSize: number;
|
|
30
|
-
labelFontWeight: string;
|
|
31
|
-
};
|
|
32
|
-
effects: {
|
|
33
|
-
starfieldEnabled: boolean;
|
|
34
|
-
starfieldColor: string;
|
|
35
|
-
glowEnabled: boolean;
|
|
36
|
-
glowIntensity: number;
|
|
37
|
-
};
|
|
38
|
-
animation: {
|
|
39
|
-
focusDuration: number;
|
|
40
|
-
transitionDuration: number;
|
|
41
|
-
easing: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
interface NeuronWebProps {
|
|
45
|
-
graphData: {
|
|
46
|
-
nodes: NeuronVisualNode[];
|
|
47
|
-
edges: NeuronVisualEdge[];
|
|
48
|
-
storyBeats?: NeuronStoryBeat[];
|
|
49
|
-
};
|
|
50
|
-
fullHeight?: boolean;
|
|
51
|
-
isFullScreen?: boolean;
|
|
52
|
-
className?: string;
|
|
53
|
-
style?: React__default.CSSProperties;
|
|
54
|
-
isLoading?: boolean;
|
|
55
|
-
error?: string | null;
|
|
56
|
-
selectedNode?: NeuronNode | null;
|
|
57
|
-
focusNodeSlug?: string | null;
|
|
58
|
-
visibleNodeSlugs?: string[] | null;
|
|
59
|
-
onNodeClick?: (node: NeuronNode) => void;
|
|
60
|
-
onNodeDoubleClick?: (node: NeuronNode) => void;
|
|
61
|
-
onNodeHover?: (node: NeuronNode | null) => void;
|
|
62
|
-
onNodeFocused?: (node: NeuronNode) => void;
|
|
63
|
-
onEdgeClick?: (edge: NeuronEdge) => void;
|
|
64
|
-
onBackgroundClick?: () => void;
|
|
65
|
-
onCameraChange?: (position: [number, number, number]) => void;
|
|
66
|
-
studyPathRequest?: StudyPathRequest | null;
|
|
67
|
-
onStudyPathComplete?: () => void;
|
|
68
|
-
theme?: Partial<NeuronWebTheme>;
|
|
69
|
-
domainColors?: Record<string, string>;
|
|
70
|
-
renderNodeDetail?: (node: NeuronNode) => React__default.ReactNode;
|
|
71
|
-
renderEmptyState?: () => React__default.ReactNode;
|
|
72
|
-
renderLoadingState?: () => React__default.ReactNode;
|
|
73
|
-
performanceMode?: 'auto' | 'normal' | 'degraded' | 'fallback';
|
|
74
|
-
ariaLabel?: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
declare function NeuronWeb({ graphData, className, style, isLoading, error, renderEmptyState, renderLoadingState, ariaLabel, theme, }: NeuronWebProps): React__default.ReactElement;
|
|
6
|
+
import { N as NeuronVisualNode } from '../edge-BzsYe2Ed.js';
|
|
7
|
+
export { a as NeuronVisualEdge } from '../edge-BzsYe2Ed.js';
|
|
8
|
+
import 'react';
|
|
78
9
|
|
|
79
10
|
interface SceneConfig {
|
|
80
11
|
backgroundColor: string;
|
|
@@ -84,7 +15,15 @@ interface SceneConfig {
|
|
|
84
15
|
maxZoom: number;
|
|
85
16
|
enableStarfield: boolean;
|
|
86
17
|
starfieldCount: number;
|
|
18
|
+
starfieldColor: string;
|
|
87
19
|
pixelRatioCap: number;
|
|
20
|
+
ambientLightIntensity?: number;
|
|
21
|
+
keyLightIntensity?: number;
|
|
22
|
+
fillLightIntensity?: number;
|
|
23
|
+
fogEnabled?: boolean;
|
|
24
|
+
fogColor?: string;
|
|
25
|
+
fogNear?: number;
|
|
26
|
+
fogFar?: number;
|
|
88
27
|
}
|
|
89
28
|
declare class SceneManager {
|
|
90
29
|
private container;
|
|
@@ -95,6 +34,13 @@ declare class SceneManager {
|
|
|
95
34
|
labelRenderer: CSS2DRenderer;
|
|
96
35
|
controls: OrbitControls;
|
|
97
36
|
private animationId;
|
|
37
|
+
private lastFrameTime;
|
|
38
|
+
private elapsedTime;
|
|
39
|
+
private frameListeners;
|
|
40
|
+
private starfield;
|
|
41
|
+
private ambientLight;
|
|
42
|
+
private keyLight;
|
|
43
|
+
private fillLight;
|
|
98
44
|
constructor(container: HTMLElement, config: SceneConfig);
|
|
99
45
|
initialize(): void;
|
|
100
46
|
dispose(): void;
|
|
@@ -104,6 +50,7 @@ declare class SceneManager {
|
|
|
104
50
|
resize: () => void;
|
|
105
51
|
updateBackground(color: string): void;
|
|
106
52
|
updateCamera(position: [number, number, number]): void;
|
|
53
|
+
addFrameListener(listener: (delta: number, elapsed: number) => void): () => void;
|
|
107
54
|
getWorldPosition(screenX: number, screenY: number): THREE.Vector3;
|
|
108
55
|
screenToWorld(x: number, y: number): THREE.Vector3;
|
|
109
56
|
worldToScreen(position: THREE.Vector3): {
|
|
@@ -112,14 +59,16 @@ declare class SceneManager {
|
|
|
112
59
|
};
|
|
113
60
|
onContextLost: () => void;
|
|
114
61
|
onContextRestored: () => void;
|
|
62
|
+
private initStarfield;
|
|
63
|
+
private initLights;
|
|
115
64
|
}
|
|
116
65
|
|
|
117
66
|
declare class ThemeEngine {
|
|
118
67
|
private theme;
|
|
119
68
|
onThemeChange: (theme: NeuronWebTheme) => void;
|
|
120
|
-
constructor(initialTheme?:
|
|
69
|
+
constructor(initialTheme?: NeuronWebThemeOverride);
|
|
121
70
|
getTheme(): NeuronWebTheme;
|
|
122
|
-
setTheme(theme:
|
|
71
|
+
setTheme(theme: NeuronWebThemeOverride): void;
|
|
123
72
|
resetTheme(): void;
|
|
124
73
|
setDomainColor(domain: string, color: string): void;
|
|
125
74
|
setBackground(color: string): void;
|
|
@@ -127,8 +76,11 @@ declare class ThemeEngine {
|
|
|
127
76
|
applyPreset(preset: 'dark' | 'light' | 'custom'): void;
|
|
128
77
|
saveToStorage(): void;
|
|
129
78
|
loadFromStorage(): void;
|
|
79
|
+
private mergeTheme;
|
|
130
80
|
}
|
|
131
81
|
|
|
132
82
|
declare const DEFAULT_THEME: NeuronWebTheme;
|
|
133
83
|
|
|
134
|
-
|
|
84
|
+
declare function applyFuzzyLayout(nodes: NeuronVisualNode[], options?: NeuronLayoutOptions): NeuronVisualNode[];
|
|
85
|
+
|
|
86
|
+
export { DEFAULT_THEME, NeuronLayoutOptions, NeuronVisualNode, NeuronWebTheme, NeuronWebThemeOverride, SceneManager, ThemeEngine, applyFuzzyLayout };
|