playermap_graph 0.2.4 → 0.2.6
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/index.es.js +8788 -8585
- package/dist/index.umd.js +265 -265
- package/package.json +3 -1
- package/src/index.d.ts +25 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playermap_graph",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A React library for intuition visualization using force-directed graphs",
|
|
6
6
|
"author": "Agent Studio",
|
|
@@ -77,6 +77,8 @@
|
|
|
77
77
|
"@testing-library/jest-dom": "^6.6.3",
|
|
78
78
|
"@testing-library/react": "^16.1.0",
|
|
79
79
|
"@testing-library/user-event": "^14.5.2",
|
|
80
|
+
"@types/react": "^19.2.14",
|
|
81
|
+
"@types/react-dom": "^19.2.3",
|
|
80
82
|
"@vitejs/plugin-react": "^4.4.1",
|
|
81
83
|
"gh-pages": "^6.2.0",
|
|
82
84
|
"vite": "^5.4.19"
|
package/src/index.d.ts
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
|
|
3
|
+
export interface GraphControls {
|
|
4
|
+
goBack: () => void;
|
|
5
|
+
goForward: () => void;
|
|
6
|
+
canGoBack: boolean;
|
|
7
|
+
canGoForward: boolean;
|
|
8
|
+
resetGraph: () => void;
|
|
9
|
+
isSearching: boolean;
|
|
10
|
+
handleSearch: (query: string, filters: { subject: string; predicate: string; object: string }) => Promise<void>;
|
|
11
|
+
handleSearchStart: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
export interface GraphVisualizationProps {
|
|
4
15
|
endpoint?: string;
|
|
5
16
|
onNodeSelect?: (node: any) => void;
|
|
6
17
|
onLoadingChange?: (loading: boolean) => void;
|
|
18
|
+
walletAddress?: string;
|
|
19
|
+
gamesId?: string;
|
|
20
|
+
disableNodeDetailsSidebar?: boolean;
|
|
21
|
+
hideNavigationBar?: boolean;
|
|
22
|
+
onControlsReady?: (controls: GraphControls) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SmartSearchInterfaceProps {
|
|
26
|
+
endpoint?: string;
|
|
27
|
+
onSearch: (query: string, filters: { subject: string; predicate: string; object: string }) => Promise<void>;
|
|
28
|
+
isSearching: boolean;
|
|
29
|
+
onSearchStart: () => void;
|
|
7
30
|
}
|
|
8
31
|
|
|
9
32
|
export interface NodeDetailsSidebarProps {
|
|
@@ -24,6 +47,7 @@ export const NodeDetailsSidebar: FC<NodeDetailsSidebarProps>;
|
|
|
24
47
|
export const GraphLegend: FC;
|
|
25
48
|
export const EndpointSelector: FC<EndpointSelectorProps>;
|
|
26
49
|
export const LoadingAnimation: FC;
|
|
50
|
+
export const SmartSearchInterface: FC<SmartSearchInterfaceProps>;
|
|
27
51
|
|
|
28
52
|
export const ENDPOINTS: Record<string, {
|
|
29
53
|
url: string;
|
|
@@ -34,4 +58,4 @@ export const ENDPOINTS: Record<string, {
|
|
|
34
58
|
export function fetchTriples(endpoint?: string): Promise<any>;
|
|
35
59
|
export function fetchTriplesForNode(nodeId: string, endpoint?: string): Promise<any>;
|
|
36
60
|
export function fetchAtomDetails(atomId: string, endpoint?: string): Promise<any>;
|
|
37
|
-
export function searchTriples(filters: any, endpoint?: string): Promise<any>;
|
|
61
|
+
export function searchTriples(filters: any, endpoint?: string): Promise<any>;
|