player-map 1.0.7 → 1.0.9

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 (41) hide show
  1. package/README.md +74 -2
  2. package/dist/index.es.js +29642 -30864
  3. package/dist/index.umd.js +557 -562
  4. package/dist/types/PlayerMapGraph.d.ts +4 -1
  5. package/dist/types/components/modals/ConnectWalletModal.d.ts +8 -0
  6. package/dist/types/components/modals/CreatePlayerModal.d.ts +9 -0
  7. package/dist/types/components/modals/index.d.ts +2 -0
  8. package/dist/types/components/vote/ClaimItem.d.ts +13 -0
  9. package/dist/types/components/vote/ClaimList.d.ts +14 -0
  10. package/dist/types/components/vote/ClaimVoting.d.ts +16 -0
  11. package/dist/types/components/vote/SubmitButton.d.ts +11 -0
  12. package/dist/types/components/vote/TransactionInfo.d.ts +9 -0
  13. package/dist/types/components/vote/TransactionStatus.d.ts +11 -0
  14. package/dist/types/components/vote/VotingHeader.d.ts +7 -0
  15. package/dist/types/hooks/useCheckSpecificTriplePosition.d.ts +14 -0
  16. package/dist/types/hooks/useDepositTriple.d.ts +14 -0
  17. package/dist/types/hooks/useDisplayTriplesWithPosition.d.ts +5 -0
  18. package/dist/types/hooks/useFetchTripleDetails.d.ts +27 -0
  19. package/dist/types/hooks/useSubmitVotes.d.ts +22 -0
  20. package/dist/types/hooks/useVoteItemsManagement.d.ts +21 -0
  21. package/dist/types/hooks.old.local/useAccountAtom.d.ts +19 -0
  22. package/dist/types/hooks.old.local/useAtomCreation.d.ts +23 -0
  23. package/dist/types/hooks.old.local/useAtomData.d.ts +61 -0
  24. package/dist/types/hooks.old.local/useAtomTriples.d.ts +22 -0
  25. package/dist/types/hooks.old.local/useAtomsByCreator.d.ts +14 -0
  26. package/dist/types/hooks.old.local/useBatchCreateTriple.d.ts +16 -0
  27. package/dist/types/hooks.old.local/useCreateSingleTriple.d.ts +10 -0
  28. package/dist/types/hooks.old.local/useDepositTriple.d.ts +14 -0
  29. package/dist/types/hooks.old.local/useDisplayTriplesWithPosition.d.ts +5 -0
  30. package/dist/types/hooks.old.local/useFetchTripleDetails.d.ts +27 -0
  31. package/dist/types/hooks.old.local/useMainnetAtomData.d.ts +20 -0
  32. package/dist/types/hooks.old.local/useSubmitVotes.d.ts +22 -0
  33. package/dist/types/hooks.old.local/useTestnetAtomData.d.ts +20 -0
  34. package/dist/types/hooks.old.local/useTripleByCreator.d.ts +39 -0
  35. package/dist/types/hooks.old.local/useVoteItemsManagement.d.ts +18 -0
  36. package/dist/types/pages/DirectPositionCheck.d.ts +4 -0
  37. package/dist/types/types/vote.d.ts +26 -0
  38. package/dist/types/utils/debugPosition.d.ts +11 -0
  39. package/dist/types/utils/voteConstants.d.ts +2 -0
  40. package/dist/types/utils/voteUtils.d.ts +32 -0
  41. package/package.json +2 -2
@@ -0,0 +1,32 @@
1
+ import { VoteItem } from '../types/vote';
2
+
3
+ /**
4
+ * Calculates the total number of transactions needed for the current vote selection
5
+ * @param voteItems Array of vote items
6
+ * @returns Number of transactions
7
+ */
8
+ export declare const calculateNumberOfTransactions: (voteItems: VoteItem[]) => number;
9
+ /**
10
+ * Calculates the total units selected across all vote items
11
+ * @param voteItems Array of vote items
12
+ * @returns Total units
13
+ */
14
+ export declare const calculateTotalUnits: (voteItems: VoteItem[]) => number;
15
+ /**
16
+ * Calculates the total ETH cost based on number of units
17
+ * @param units Number of units
18
+ * @returns Total ETH cost as a string with 3 decimal places
19
+ */
20
+ export declare const calculateEthCost: (units: number) => string;
21
+ /**
22
+ * Calculates the estimated gas cost for a set of transactions
23
+ * @param transactionCount Number of transactions
24
+ * @returns Estimated gas cost as a string with 4 decimal places
25
+ */
26
+ export declare const calculateGasCost: (transactionCount: number) => string;
27
+ /**
28
+ * Reset all vote items to zero units and no direction
29
+ * @param voteItems Array of vote items
30
+ * @returns New array with reset vote items
31
+ */
32
+ export declare const resetVoteItems: (voteItems: VoteItem[]) => VoteItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "player-map",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@0xintuition/graphql": "^0.8.0",
24
24
  "axios": "^1.9.0",
25
- "playermap_graph": "^0.1.2"
25
+ "playermap_graph": "^0.1.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/react": "^18.2.0",