player-map 2.0.26 → 2.0.27
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/PlayerCreationProgress.d.ts +1 -0
- package/dist/api/fetchFollowsAndFollowers.d.ts +2 -1
- package/dist/api/fetchTriplesByTermIds.d.ts +1 -0
- package/dist/components/RightPanel.d.ts +10 -0
- package/dist/components/TopNavBar.d.ts +1 -1
- package/dist/components/graph/AtomDetailsSection.d.ts +1 -0
- package/dist/components/graph/ClaimActionRow.d.ts +14 -0
- package/dist/components/graph/ClaimsSection.d.ts +1 -0
- package/dist/components/graph/FollowButton.d.ts +13 -0
- package/dist/components/vote/TransactionStatus.d.ts +1 -0
- package/dist/hooks/useBatchCreateTriple.d.ts +5 -1
- package/dist/hooks/useFollowPlayer.d.ts +22 -0
- package/dist/hooks/useOtherPlayerProfile.d.ts +20 -0
- package/dist/hooks/useVoteItemsManagement.d.ts +6 -2
- package/dist/index.es.js +15985 -15080
- package/dist/index.umd.js +523 -406
- package/dist/types/alias.d.ts +1 -1
- package/dist/types/vote.d.ts +3 -0
- package/dist/utils/constants.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Network } from '../hooks/useAtomData';
|
|
2
2
|
|
|
3
|
-
export declare const fetchFollowsAndFollowers: (
|
|
3
|
+
export declare const fetchFollowsAndFollowers: (_predicateId: string, // kept for backward compat, ignored — PREDICATES.FOLLOWS used directly
|
|
4
|
+
walletAddress: string, network?: Network, playerAccountAtomId?: string) => Promise<{
|
|
4
5
|
follows: any;
|
|
5
6
|
followers: any;
|
|
6
7
|
}>;
|
|
@@ -20,6 +20,16 @@ interface RightPanelProps {
|
|
|
20
20
|
selectedClaims?: any[];
|
|
21
21
|
selectedLoading?: boolean;
|
|
22
22
|
selectedError?: string | null;
|
|
23
|
+
otherPlayerAtomDetails?: any;
|
|
24
|
+
otherPlayerWallet?: string | null;
|
|
25
|
+
otherPlayerPositions?: any[];
|
|
26
|
+
otherPlayerActivities?: any[];
|
|
27
|
+
otherPlayerConnections?: {
|
|
28
|
+
followingCount: number;
|
|
29
|
+
followersCount: number;
|
|
30
|
+
};
|
|
31
|
+
otherPlayerLoading?: boolean;
|
|
32
|
+
otherPlayerError?: string | null;
|
|
23
33
|
}
|
|
24
34
|
declare const RightPanel: React.FC<RightPanelProps>;
|
|
25
35
|
export default RightPanel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export type RightPanelMode = "speakup" | "atom" | "profile";
|
|
3
|
+
export type RightPanelMode = "speakup" | "atom" | "profile" | "player-profile";
|
|
4
4
|
export interface GraphControls {
|
|
5
5
|
goBack: () => void;
|
|
6
6
|
goForward: () => void;
|
|
@@ -9,6 +9,7 @@ interface AtomDetailsSectionProps {
|
|
|
9
9
|
walletAddress?: string;
|
|
10
10
|
showDescription?: boolean;
|
|
11
11
|
placeholderElement?: React.ReactNode;
|
|
12
|
+
actionElement?: React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
declare const AtomDetailsSection: React.FC<AtomDetailsSectionProps>;
|
|
14
15
|
export default AtomDetailsSection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ClaimActionRowProps {
|
|
4
|
+
claim: any;
|
|
5
|
+
walletAddress: string;
|
|
6
|
+
walletConnected: any;
|
|
7
|
+
publicClient?: any;
|
|
8
|
+
positionsByTermId: Map<string, {
|
|
9
|
+
shares: bigint;
|
|
10
|
+
curveId: bigint;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
declare const ClaimActionRow: React.FC<ClaimActionRowProps>;
|
|
14
|
+
export default ClaimActionRow;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Network } from '../../hooks/useAtomData';
|
|
3
|
+
|
|
4
|
+
interface FollowButtonProps {
|
|
5
|
+
walletConnected?: any;
|
|
6
|
+
walletAddress?: string;
|
|
7
|
+
publicClient?: any;
|
|
8
|
+
myAccountAtomId: string | null;
|
|
9
|
+
otherAccountAtomId: string | null;
|
|
10
|
+
network?: Network;
|
|
11
|
+
}
|
|
12
|
+
declare const FollowButton: React.FC<FollowButtonProps>;
|
|
13
|
+
export default FollowButton;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Network } from './useAtomData';
|
|
2
|
+
|
|
1
3
|
export interface TripleToCreate {
|
|
2
4
|
subjectId: bigint;
|
|
3
5
|
predicateId: bigint;
|
|
@@ -7,10 +9,12 @@ interface UseBatchCreateTripleProps {
|
|
|
7
9
|
walletConnected?: any;
|
|
8
10
|
walletAddress?: string;
|
|
9
11
|
publicClient?: any;
|
|
12
|
+
network?: Network;
|
|
10
13
|
}
|
|
11
|
-
export declare const useBatchCreateTriple: ({ walletConnected, walletAddress, publicClient }: UseBatchCreateTripleProps) => {
|
|
14
|
+
export declare const useBatchCreateTriple: ({ walletConnected, walletAddress, publicClient, network }: UseBatchCreateTripleProps) => {
|
|
12
15
|
checkTripleExists: (subjectId: bigint, predicateId: bigint, objectId: bigint) => Promise<boolean>;
|
|
13
16
|
batchCreateTriple: (triples: TripleToCreate[]) => Promise<any>;
|
|
14
17
|
computeTripleId: (subjectId: bigint, predicateId: bigint, objectId: bigint) => Promise<bigint>;
|
|
18
|
+
depositOnVaultsWithoutPosition: (termIds: string[]) => Promise<void>;
|
|
15
19
|
};
|
|
16
20
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Network } from './useAtomData';
|
|
2
|
+
|
|
3
|
+
export type FollowState = 'idle' | 'loading' | 'not-following' | 'following';
|
|
4
|
+
interface UseFollowPlayerProps {
|
|
5
|
+
walletConnected?: any;
|
|
6
|
+
walletAddress?: string;
|
|
7
|
+
publicClient?: any;
|
|
8
|
+
myAccountAtomId: string | null;
|
|
9
|
+
otherAccountAtomId: string | null;
|
|
10
|
+
network?: Network;
|
|
11
|
+
}
|
|
12
|
+
interface UseFollowPlayerResult {
|
|
13
|
+
followState: FollowState;
|
|
14
|
+
tripleId: string | null;
|
|
15
|
+
userShares: bigint;
|
|
16
|
+
txLoading: boolean;
|
|
17
|
+
error: string | null;
|
|
18
|
+
follow: () => Promise<void>;
|
|
19
|
+
unfollow: () => Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare const useFollowPlayer: ({ walletConnected, walletAddress, publicClient, myAccountAtomId, otherAccountAtomId, network, }: UseFollowPlayerProps) => UseFollowPlayerResult;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Network } from './useAtomData';
|
|
2
|
+
|
|
3
|
+
interface OtherPlayerProfile {
|
|
4
|
+
atomDetails: {
|
|
5
|
+
term_id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
image: string;
|
|
8
|
+
} | null;
|
|
9
|
+
walletAddress: string | null;
|
|
10
|
+
positions: any[];
|
|
11
|
+
activities: any[];
|
|
12
|
+
connections: {
|
|
13
|
+
followingCount: number;
|
|
14
|
+
followersCount: number;
|
|
15
|
+
};
|
|
16
|
+
loading: boolean;
|
|
17
|
+
error: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const useOtherPlayerProfile: (accountAtomId: string | null, pseudoLabel: string, pseudoImage: string, network?: Network) => OtherPlayerProfile;
|
|
20
|
+
export {};
|
|
@@ -15,8 +15,12 @@ export declare const useVoteItemsManagement: ({ network, walletAddress, onError,
|
|
|
15
15
|
handleChangeUnits: (id: bigint, direction: VoteDirection, units: number) => void;
|
|
16
16
|
resetAllVotes: () => void;
|
|
17
17
|
refreshPositions: () => void;
|
|
18
|
-
loadTripleDetails: (currentUserPositions?: Record<string, VoteDirection
|
|
19
|
-
|
|
18
|
+
loadTripleDetails: (currentUserPositions?: Record<string, VoteDirection>, currentSharesMap?: Record<string, {
|
|
19
|
+
termId: string;
|
|
20
|
+
shares: bigint;
|
|
21
|
+
curveId: bigint;
|
|
22
|
+
}>) => Promise<void>;
|
|
23
|
+
isVoteDirectionAllowed: (_tripleId: bigint, _direction: VoteDirection) => boolean;
|
|
20
24
|
userPositions: Record<string, VoteDirection>;
|
|
21
25
|
};
|
|
22
26
|
export {};
|