@microcosmmoney/portal-react 2.2.1 → 2.3.0
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/components/auction/auction-page.d.ts +5 -0
- package/dist/components/auction/auction-page.js +70 -0
- package/dist/components/mcd/mcd-page.d.ts +5 -0
- package/dist/components/mcd/mcd-page.js +40 -0
- package/dist/components/mining/mining-page.d.ts +5 -0
- package/dist/components/mining/mining-page.js +49 -0
- package/dist/components/organization/organization-page.d.ts +5 -0
- package/dist/components/organization/organization-page.js +35 -0
- package/dist/components/territory/territory-page.d.ts +5 -0
- package/dist/components/territory/territory-page.js +44 -0
- package/dist/components/voting/voting-page.d.ts +5 -0
- package/dist/components/voting/voting-page.js +18 -0
- package/dist/components/wallet/wallet-page.d.ts +5 -0
- package/dist/components/wallet/wallet-page.js +45 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +15 -1
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmAuctionPage = MicrocosmAuctionPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
9
|
+
const fmt = (n, d = 2) => n.toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
10
|
+
function Spinner() {
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
12
|
+
}
|
|
13
|
+
function Modal({ open, onClose, children }) {
|
|
14
|
+
if (!open)
|
|
15
|
+
return null;
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center", onClick: onClose, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/60" }), (0, jsx_runtime_1.jsx)("div", { className: "relative bg-neutral-900 border border-neutral-700 rounded-lg p-6 max-w-md w-full mx-4 font-mono max-h-[90vh] overflow-y-auto", onClick: e => e.stopPropagation(), children: children })] }));
|
|
17
|
+
}
|
|
18
|
+
function MicrocosmAuctionPage({ basePath = '', onNavigate }) {
|
|
19
|
+
const { data: auctions, loading, refresh: refreshAuctions } = (0, auth_react_1.useAuctions)();
|
|
20
|
+
const { data: myBids, refresh: refreshBids } = (0, auth_react_1.useMyBids)();
|
|
21
|
+
const { data: history } = (0, auth_react_1.useAuctionHistory)();
|
|
22
|
+
const { placeBid, loading: bidLoading } = (0, auth_react_1.useAuctionBid)();
|
|
23
|
+
const [bidDialogOpen, setBidDialogOpen] = (0, react_1.useState)(false);
|
|
24
|
+
const [selectedAuction, setSelectedAuction] = (0, react_1.useState)(null);
|
|
25
|
+
const [bidAmount, setBidAmount] = (0, react_1.useState)('');
|
|
26
|
+
const [showMyBids, setShowMyBids] = (0, react_1.useState)(false);
|
|
27
|
+
const [showHistory, setShowHistory] = (0, react_1.useState)(false);
|
|
28
|
+
const [actionError, setActionError] = (0, react_1.useState)(null);
|
|
29
|
+
const [refreshing, setRefreshing] = (0, react_1.useState)(false);
|
|
30
|
+
const auctionList = Array.isArray(auctions) ? auctions : [];
|
|
31
|
+
const bidsList = Array.isArray(myBids) ? myBids : [];
|
|
32
|
+
const historyList = Array.isArray(history) ? history : [];
|
|
33
|
+
const totalBids = auctionList.reduce((s, a) => s + (a.bid_count ?? 0), 0);
|
|
34
|
+
const highestBid = auctionList.reduce((m, a) => Math.max(m, a.current_price ?? 0), 0);
|
|
35
|
+
const handleRefresh = (0, react_1.useCallback)(async () => {
|
|
36
|
+
setRefreshing(true);
|
|
37
|
+
await Promise.all([refreshAuctions(), refreshBids()]);
|
|
38
|
+
setRefreshing(false);
|
|
39
|
+
}, [refreshAuctions, refreshBids]);
|
|
40
|
+
const handleBid = async () => {
|
|
41
|
+
if (!selectedAuction)
|
|
42
|
+
return;
|
|
43
|
+
const amount = parseFloat(bidAmount);
|
|
44
|
+
if (isNaN(amount) || amount <= 0) {
|
|
45
|
+
setActionError('Enter a valid amount');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
setActionError(null);
|
|
50
|
+
await placeBid(selectedAuction.id, amount);
|
|
51
|
+
setBidDialogOpen(false);
|
|
52
|
+
setBidAmount('');
|
|
53
|
+
handleRefresh();
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
setActionError(err instanceof Error ? err.message : 'Bid failed');
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const formatTimeLeft = (endTime) => {
|
|
60
|
+
if (!endTime)
|
|
61
|
+
return '-';
|
|
62
|
+
const diff = new Date(endTime).getTime() - Date.now();
|
|
63
|
+
if (diff <= 0)
|
|
64
|
+
return 'Ended';
|
|
65
|
+
const hours = Math.floor(diff / 3600000);
|
|
66
|
+
const minutes = Math.floor((diff % 3600000) / 60000);
|
|
67
|
+
return `${hours}h ${minutes}m`;
|
|
68
|
+
};
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Auctions" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "Territory magistrate auctions" })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleRefresh, disabled: refreshing, className: "flex items-center gap-2 px-3 py-1.5 text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 disabled:opacity-50 bg-transparent", children: [(0, jsx_runtime_1.jsx)("svg", { className: `w-4 h-4 ${refreshing ? 'animate-spin' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) }), "Refresh"] })] }), actionError && ((0, jsx_runtime_1.jsx)("div", { className: "p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm", children: actionError })), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "ongoing" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-cyan-400", children: auctionList.length })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "total_bids" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-white", children: totalBids })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "highest_bid" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xl font-bold text-cyan-400", children: [fmt(highestBid), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "my_bids" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-white", children: bidsList.length })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4 block", children: "ACTIVE_AUCTIONS" }), loading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : auctionList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: auctionList.map((a) => ((0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded border border-neutral-700 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-start mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold", children: a.unit_name || a.territory_id || `Auction #${a.id}` }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 mt-0.5", children: [a.unit_type || 'Station', " \u2022 ", a.bid_count ?? 0, " bids", (a.bid_count ?? 0) >= 5 && (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 ml-1", children: "\uD83D\uDD25 Hot" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400", children: "Time Left" }), (0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold", children: formatTimeLeft(a.end_time) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-3 gap-3 mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400", children: "starting_price" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm font-bold text-white", children: [fmt(a.starting_price ?? 0), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400", children: "current_highest" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm font-bold text-cyan-400", children: [fmt(a.current_price ?? a.starting_price ?? 0), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400", children: "bid_increment" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm font-bold text-white", children: [fmt(a.bid_increment ?? 0), " MCC"] })] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => { setSelectedAuction(a); setBidDialogOpen(true); setActionError(null); }, className: "w-full py-2 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-sm font-mono", children: "Place Bid" })] }, a.id))) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "no active auctions" }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider", children: "MY_BIDS" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowMyBids(!showMyBids), className: "text-xs text-neutral-500 hover:text-cyan-400 font-mono", children: showMyBids ? 'Collapse' : 'Expand' })] }), showMyBids && (bidsList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "space-y-2", children: bidsList.map((b, i) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-sm", children: b.unit_name || `Auction #${b.auction_id}` }), (0, jsx_runtime_1.jsx)("span", { className: `ml-2 text-[10px] px-1.5 py-0.5 rounded ${b.status === 'active' || b.status === 'leading' ? 'bg-cyan-400/20 text-cyan-400' : b.status === 'won' ? 'bg-white/20 text-white' : 'bg-neutral-700 text-neutral-400'}`, children: b.status || 'active' })] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-bold font-mono", children: [fmt(b.amount ?? 0), " MCC"] })] }, i))) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-4 text-neutral-500 font-mono text-sm", children: "no bids placed" })))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider", children: "AUCTION_HISTORY" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowHistory(!showHistory), className: "text-xs text-neutral-500 hover:text-cyan-400 font-mono", children: showHistory ? 'Collapse' : 'Expand' })] }), showHistory && (historyList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Territory" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Final Price" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Bids" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Status" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: historyList.map((h, i) => ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-3 text-white", children: h.unit_name || h.territory_id || '-' }), (0, jsx_runtime_1.jsxs)("td", { className: "py-3 text-right text-cyan-400 font-bold", children: [fmt(h.final_price ?? 0), " MCC"] }), (0, jsx_runtime_1.jsx)("td", { className: "py-3 text-right text-neutral-400", children: h.bid_count ?? 0 }), (0, jsx_runtime_1.jsx)("td", { className: "py-3 text-right", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs bg-neutral-700 text-neutral-300 px-1.5 py-0.5 rounded", children: h.status || 'ended' }) })] }, i))) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-4 text-neutral-500 font-mono text-sm", children: "no auction history" })))] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "AUCTION_RULES" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-4 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold mb-2", children: "Target" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Territory magistrate position" }), (0, jsx_runtime_1.jsx)("li", { children: "Station / Matrix / Sector / System" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold mb-2", children: "Bidding Rules" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "50% deposit required" }), (0, jsx_runtime_1.jsx)("li", { children: "24h no-bid rule ends auction" }), (0, jsx_runtime_1.jsx)("li", { children: "Winner becomes magistrate" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold mb-2", children: "Requirements" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Sufficient MCC balance" }), (0, jsx_runtime_1.jsx)("li", { children: "Miner level or above" })] })] })] })] }), (0, jsx_runtime_1.jsx)(Modal, { open: bidDialogOpen, onClose: () => setBidDialogOpen(false), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-bold text-white", children: "Place Bid" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400 mt-1", children: selectedAuction?.unit_name || `Auction #${selectedAuction?.id}` })] }), selectedAuction && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "Current Highest" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-bold", children: [fmt(selectedAuction.current_price ?? selectedAuction.starting_price ?? 0), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "Min Next Bid" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-bold", children: [fmt((selectedAuction.current_price ?? selectedAuction.starting_price ?? 0) + (selectedAuction.bid_increment ?? 0)), " MCC"] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-xs text-neutral-400 tracking-wider", children: "bid_amount (MCC)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", step: "0.01", value: bidAmount, onChange: e => setBidAmount(e.target.value), placeholder: "Enter bid amount", className: "w-full px-3 py-2 bg-neutral-800 border border-neutral-600 rounded text-white placeholder-neutral-400 outline-none focus:border-cyan-400" })] }), bidAmount && parseFloat(bidAmount) > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700 text-xs text-neutral-400", children: ["Deposit required: ", (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-bold", children: [fmt(parseFloat(bidAmount) * 0.5), " MCC"] }), " (50%)"] }))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-end gap-3 pt-2", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setBidDialogOpen(false), className: "px-4 py-2 text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 bg-transparent", children: "Cancel" }), (0, jsx_runtime_1.jsx)("button", { onClick: handleBid, disabled: bidLoading || !bidAmount, className: "px-4 py-2 text-sm bg-cyan-700 hover:bg-cyan-600 text-white rounded disabled:opacity-50", children: bidLoading ? 'Processing...' : 'Confirm Bid' })] })] }) })] }));
|
|
70
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmMCDPage = MicrocosmMCDPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
9
|
+
const fmt = (n, d = 2) => n.toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
10
|
+
function Spinner() {
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
12
|
+
}
|
|
13
|
+
function MicrocosmMCDPage({ basePath = '', onNavigate }) {
|
|
14
|
+
const { balance: mcdData, loading: mcdLoading } = (0, auth_react_1.useMCD)(60000);
|
|
15
|
+
const { data: rewards, loading: rewardsLoading } = (0, auth_react_1.useMCDRewards)();
|
|
16
|
+
const { data: transactions, loading: txLoading } = (0, auth_react_1.useMCDTransactions)();
|
|
17
|
+
const { data: wallets } = (0, auth_react_1.useWallets)();
|
|
18
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)('daily');
|
|
19
|
+
const [showHelp, setShowHelp] = (0, react_1.useState)(false);
|
|
20
|
+
const mcdAmount = parseFloat(mcdData?.available_balance ?? '0');
|
|
21
|
+
const mcdReceived = parseFloat(mcdData?.total_balance ?? '0');
|
|
22
|
+
const mcdSpent = parseFloat(mcdData?.frozen_balance ?? '0');
|
|
23
|
+
const rewardsList = Array.isArray(rewards) ? rewards : [];
|
|
24
|
+
const txList = Array.isArray(transactions) ? transactions : [];
|
|
25
|
+
const resolvePath = (p) => basePath ? `${basePath.replace(/\/$/, '')}${p}` : p;
|
|
26
|
+
const formatDate = (iso) => {
|
|
27
|
+
if (!iso)
|
|
28
|
+
return '-';
|
|
29
|
+
return new Date(iso).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
30
|
+
};
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "MCD Points" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "Microcosm Dollar \u2014 ecosystem points" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/wallet')), className: "px-3 py-1.5 text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 bg-transparent", children: "Manage Wallet" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowHelp(!showHelp), className: "px-3 py-1.5 text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 bg-transparent", children: "? Help" })] })] }), showHelp && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-cyan-400/30 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold mb-3", children: "How MCD Works" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-4 text-sm text-neutral-400", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-cyan-400 text-xs mb-1", children: "How to Get MCD" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Daily distribution from territory vault (1% of vault balance)" }), (0, jsx_runtime_1.jsx)("li", { children: "Companion yield from mining operations" }), (0, jsx_runtime_1.jsx)("li", { children: "Ecosystem service rewards" })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-cyan-400 text-xs mb-1", children: "MCD Usage" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Spend on ecosystem services (Double Helix, xSocial, etc.)" }), (0, jsx_runtime_1.jsx)("li", { children: "Transfer between users" }), (0, jsx_runtime_1.jsx)("li", { children: "Future governance participation" })] })] })] })] })), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-1", children: "available_balance" }), (0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold font-mono text-cyan-400", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : fmt(mcdAmount) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500 mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-1", children: "total_received" }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold font-mono text-white", children: fmt(mcdReceived, 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500 mt-1", children: "lifetime income" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-1", children: "total_spent" }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold font-mono text-neutral-400", children: fmt(mcdSpent, 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500 mt-1", children: "lifetime spent" })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "ECOSYSTEM_SERVICES" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [
|
|
32
|
+
{ name: 'Double Helix', desc: 'Quantitative Trading', status: 'Running' },
|
|
33
|
+
{ name: 'xSocial', desc: 'AI Social Platform', status: 'Beta' },
|
|
34
|
+
{ name: 'Event Horizon', desc: 'Prediction Market', status: 'Dev' },
|
|
35
|
+
{ name: 'GreenSwans', desc: 'Climate Finance', status: 'Dev' },
|
|
36
|
+
].map((svc) => ((0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-sm font-bold", children: svc.name }), (0, jsx_runtime_1.jsx)("span", { className: `text-[10px] px-1.5 py-0.5 rounded ${svc.status === 'Running' ? 'bg-cyan-400/20 text-cyan-400' : 'bg-neutral-700 text-neutral-400'}`, children: svc.status })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: svc.desc })] }, svc.name))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 bg-black p-0.5 rounded w-fit", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setActiveTab('daily'), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === 'daily' ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: "Daily Distribution" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setActiveTab('history'), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === 'history' ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: "Transaction History" })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsx)("div", { className: "p-6", children: activeTab === 'daily' ? (rewardsLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : rewardsList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Date" }), (0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Territory" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Amount" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: rewardsList.map((r, i) => ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800 hover:bg-neutral-800/50", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-3 text-neutral-300", children: formatDate(r.reward_date || r.date) }), (0, jsx_runtime_1.jsx)("td", { className: "py-3 text-neutral-400", children: r.territory_id || r.station_id || '-' }), (0, jsx_runtime_1.jsxs)("td", { className: "py-3 text-right text-cyan-400 font-bold", children: ["+", fmt(r.mcd_received ?? r.amount ?? 0)] })] }, i))) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "no distribution records" }))) : (txLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : txList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Time" }), (0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Type" }), (0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "From/To" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Amount" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: txList.map((tx, i) => {
|
|
37
|
+
const isIncome = (tx.type ?? '').toLowerCase().includes('receive') || (tx.amount ?? 0) > 0;
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800 hover:bg-neutral-800/50", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-3 text-neutral-300", children: formatDate(tx.created_at || tx.timestamp) }), (0, jsx_runtime_1.jsx)("td", { className: "py-3", children: (0, jsx_runtime_1.jsx)("span", { className: `text-xs px-1.5 py-0.5 rounded ${isIncome ? 'bg-cyan-400/20 text-cyan-400' : 'bg-neutral-700 text-neutral-400'}`, children: tx.type || 'transfer' }) }), (0, jsx_runtime_1.jsx)("td", { className: "py-3 text-neutral-400 text-xs", children: tx.counterparty || tx.from_account || '-' }), (0, jsx_runtime_1.jsxs)("td", { className: `py-3 text-right font-bold ${isIncome ? 'text-cyan-400' : 'text-neutral-400'}`, children: [isIncome ? '+' : '-', fmt(Math.abs(tx.amount ?? 0))] })] }, i));
|
|
39
|
+
}) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "no transactions" }))) }) })] }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmMiningPage = MicrocosmMiningPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
9
|
+
const fmt = (n, d = 2) => n.toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
10
|
+
function Spinner() {
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
12
|
+
}
|
|
13
|
+
function MicrocosmMiningPage({ basePath = '', onNavigate }) {
|
|
14
|
+
const { data: stats, loading: statsLoading } = (0, auth_react_1.useMiningStats)();
|
|
15
|
+
const { data: recordsData, loading: recordsLoading, refresh: refreshRecords } = (0, auth_react_1.useMiningRecords)({ limit: 20 });
|
|
16
|
+
const records = Array.isArray(recordsData) ? recordsData : recordsData?.records ?? [];
|
|
17
|
+
const { data: mccStats } = (0, auth_react_1.useMCCStats)();
|
|
18
|
+
const { data: marketData } = (0, auth_react_1.useMarketData)();
|
|
19
|
+
const { balance: mccData } = (0, auth_react_1.useMCC)(60000);
|
|
20
|
+
const { data: wallets } = (0, auth_react_1.useWallets)();
|
|
21
|
+
const { startMining, loading: miningLoading } = (0, auth_react_1.useMiningFlow)();
|
|
22
|
+
const [showRecords, setShowRecords] = (0, react_1.useState)(true);
|
|
23
|
+
const price = marketData?.price_usd ?? 0;
|
|
24
|
+
const miningPrice = price > 0 ? price * 2 : 0;
|
|
25
|
+
const s = mccStats;
|
|
26
|
+
const totalMinted = s?.circulating_supply ?? 0;
|
|
27
|
+
const currentPhase = s?.current_phase ?? 0;
|
|
28
|
+
const miningRate = s?.current_mining_rate ?? 0;
|
|
29
|
+
const nextHalving = s?.next_halving_at ?? 100000000;
|
|
30
|
+
const mccBalance = mccData?.balance ?? 0;
|
|
31
|
+
const primaryWallet = Array.isArray(wallets) ? wallets.find((w) => w.is_primary)?.wallet_address : null;
|
|
32
|
+
const handleMine = (0, react_1.useCallback)(async () => {
|
|
33
|
+
if (!primaryWallet)
|
|
34
|
+
return;
|
|
35
|
+
try {
|
|
36
|
+
await startMining({ amount: 1, wallet_address: primaryWallet });
|
|
37
|
+
refreshRecords();
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
// Error handled by hook
|
|
41
|
+
}
|
|
42
|
+
}, [startMining, primaryWallet, refreshRecords]);
|
|
43
|
+
const formatDateTime = (iso) => {
|
|
44
|
+
if (!iso)
|
|
45
|
+
return '-';
|
|
46
|
+
return new Date(iso).toLocaleString('en-US', { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });
|
|
47
|
+
};
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between", children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Mining" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "MCC minting via X402 protocol" })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400", children: "\u26CF" }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider", children: "MINING_PRICE" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded", children: "X402" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-4 mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "1 MCC =" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-2xl font-bold text-cyan-400", children: ["$", miningPrice > 0 ? fmt(miningPrice, 4) : '--'] }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-500 mt-1", children: "market \u00D7 2" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "market_price" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-2xl font-bold text-white", children: ["$", price > 0 ? fmt(price, 4) : '--'] }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-500 mt-1", children: "DexScreener" })] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: handleMine, disabled: miningLoading || !primaryWallet, className: "w-full py-3 bg-cyan-700 hover:bg-cyan-600 text-white rounded font-mono font-bold disabled:opacity-50 transition-colors", children: miningLoading ? 'Processing...' : 'Start Minting' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "phase" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-white", children: currentPhase })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "total_minted" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xl font-bold text-white", children: [fmt(totalMinted), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "mining_rate" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-cyan-400", children: miningRate > 0 ? `${miningRate}:1` : '--' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: "next_halving" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-white", children: nextHalving > totalMinted ? fmt(nextHalving - totalMinted, 0) : 'N/A' })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2 text-xs font-mono", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "halving_progress" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white", children: [nextHalving > 0 ? ((totalMinted % nextHalving) / nextHalving * 100).toFixed(1) : 0, "%"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-neutral-700 rounded-full h-2", children: (0, jsx_runtime_1.jsx)("div", { className: "bg-cyan-400 h-2 rounded-full transition-all", style: { width: nextHalving > 0 ? `${(totalMinted % nextHalving) / nextHalving * 100}%` : '0%' } }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-2", children: "ON_CHAIN_BALANCE" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-2xl font-bold font-mono text-cyan-400", children: [fmt(mccBalance, 3), " MCC"] }), primaryWallet && ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-500 font-mono mt-1", children: [primaryWallet.slice(0, 8), "...", primaryWallet.slice(-4)] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider", children: "MINING_RECORDS" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowRecords(!showRecords), className: "text-xs text-neutral-500 hover:text-cyan-400 font-mono", children: showRecords ? 'Collapse' : 'Expand' })] }), showRecords && (recordsLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : records && records.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-2 font-normal", children: "Time" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Paid" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Minted" }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-2 font-normal", children: "Status" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: records.map((r, i) => ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800 hover:bg-neutral-800/50", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-3 text-neutral-300", children: formatDateTime(r.created_at || r.timestamp) }), (0, jsx_runtime_1.jsxs)("td", { className: "py-3 text-right text-white", children: [fmt(r.payment_amount ?? r.paid ?? 0), " USDC"] }), (0, jsx_runtime_1.jsxs)("td", { className: "py-3 text-right text-cyan-400", children: ["+", fmt(r.mcc_amount ?? r.minted ?? 0), " MCC"] }), (0, jsx_runtime_1.jsx)("td", { className: "py-3 text-right", children: (0, jsx_runtime_1.jsx)("span", { className: `text-xs px-1.5 py-0.5 rounded ${r.status === 'confirmed' ? 'bg-white/20 text-white' : 'bg-neutral-700 text-neutral-400'}`, children: r.status || 'confirmed' }) })] }, i))) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "no mining records" })))] }) }), stats && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4 block", children: "MY_MINING_STATS" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider", children: "total_mined" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg font-bold text-white", children: fmt(stats.total_mined ?? 0) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider", children: "total_paid" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg font-bold text-white", children: [fmt(stats.total_paid ?? 0), " USDC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider", children: "mining_count" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg font-bold text-white", children: stats.mining_count ?? 0 })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider", children: "active_days" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg font-bold text-white", children: stats.active_days_30d ?? 0 })] })] })] }))] }));
|
|
49
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmOrganizationPage = MicrocosmOrganizationPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
8
|
+
const fmt = (n) => n.toLocaleString('en-US');
|
|
9
|
+
function Spinner() {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
11
|
+
}
|
|
12
|
+
function MicrocosmOrganizationPage({ basePath = '', onNavigate }) {
|
|
13
|
+
const { data: summary, loading } = (0, auth_react_1.useOrganizationSummary)();
|
|
14
|
+
const s = summary;
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Organization" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "Ecosystem structure & user stats" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "USER_STATS" }), loading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : ((0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-5 gap-3", children: [
|
|
16
|
+
{ label: 'total_users', value: s?.total_users ?? 0, color: 'text-cyan-400' },
|
|
17
|
+
{ label: 'miners', value: s?.miners ?? 0, color: 'text-cyan-300' },
|
|
18
|
+
{ label: 'prospects', value: s?.prospects ?? 0, color: 'text-white' },
|
|
19
|
+
{ label: 'recruits', value: s?.recruits ?? 0, color: 'text-neutral-400' },
|
|
20
|
+
{ label: 'unassigned', value: s?.unassigned ?? 0, color: 'text-neutral-500' },
|
|
21
|
+
].map((stat) => ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider mb-1", children: stat.label }), (0, jsx_runtime_1.jsx)("div", { className: `text-2xl font-bold ${stat.color}`, children: fmt(stat.value) })] }, stat.label))) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "TERRITORY_DISTRIBUTION" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [
|
|
22
|
+
{ label: 'Systems', value: s?.system_count ?? 0, icon: '🌐' },
|
|
23
|
+
{ label: 'Sectors', value: s?.sector_count ?? 0, icon: '🔷' },
|
|
24
|
+
{ label: 'Matrices', value: s?.matrix_count ?? 0, icon: '🔶' },
|
|
25
|
+
{ label: 'Stations', value: s?.station_count ?? 0, icon: '⬡' },
|
|
26
|
+
].map((t) => ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4 text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-2xl mb-2", children: t.icon }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-white", children: fmt(t.value) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mt-1", children: t.label })] }, t.label))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "VAULT_BALANCE" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl font-bold text-cyan-400", children: loading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : fmt(s?.total_vault_balance ?? 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-sm mt-1", children: "MCD in all territory vaults" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-4 p-4 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white text-sm font-bold mb-2", children: "Vault Mechanism" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-sm text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "30% of mining companion yield flows to territory vault (MCD)" }), (0, jsx_runtime_1.jsx)("li", { children: "Daily distribution: 1% of vault balance to territory miners" }), (0, jsx_runtime_1.jsx)("li", { children: "Distribution proportional to mining activity" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "LEVEL_PROGRESSION" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3", children: [
|
|
27
|
+
{ level: 1, name: 'Recruit', req: 'Register' },
|
|
28
|
+
{ level: 2, name: 'Prospect', req: 'First mine' },
|
|
29
|
+
{ level: 3, name: 'Miner', req: '21d/30d mining' },
|
|
30
|
+
{ level: 4, name: 'Commander', req: 'Station NFT' },
|
|
31
|
+
{ level: 5, name: 'Pioneer', req: 'Matrix NFT' },
|
|
32
|
+
{ level: 6, name: 'Warden', req: 'Sector NFT' },
|
|
33
|
+
{ level: 7, name: 'Admiral', req: 'System NFT' },
|
|
34
|
+
].map((l) => ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3 text-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-cyan-400 text-lg font-bold", children: ["Lv.", l.level] }), (0, jsx_runtime_1.jsx)("div", { className: "text-white text-sm font-bold mt-1", children: l.name }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-500 mt-1", children: l.req })] }, l.level))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "TERRITORY_ARCHITECTURE" }), (0, jsx_runtime_1.jsx)("div", { className: "p-4 bg-neutral-800 rounded border border-neutral-700", children: (0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-neutral-400 space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-3 h-3 bg-cyan-200 rounded" }), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: "System" }), " \u2014 Top-level domain (10 Sectors)"] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 ml-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-3 h-3 bg-cyan-300 rounded" }), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: "Sector" }), " \u2014 Area governance (10 Matrices)"] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 ml-8", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-3 h-3 bg-cyan-400 rounded" }), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: "Matrix" }), " \u2014 Regional group (10 Stations)"] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 ml-12", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-3 h-3 bg-cyan-500 rounded" }), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: "Station" }), " \u2014 Base unit (1,000 users)"] })] }) })] })] }));
|
|
35
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmTerritoryPage = MicrocosmTerritoryPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
9
|
+
const fmt = (n) => n.toLocaleString('en-US');
|
|
10
|
+
function Spinner() {
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
12
|
+
}
|
|
13
|
+
function Modal({ open, onClose, children }) {
|
|
14
|
+
if (!open)
|
|
15
|
+
return null;
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center", onClick: onClose, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/60" }), (0, jsx_runtime_1.jsx)("div", { className: "relative bg-neutral-900 border border-neutral-700 rounded-lg p-6 max-w-lg w-full mx-4 font-mono max-h-[90vh] overflow-y-auto", onClick: e => e.stopPropagation(), children: children })] }));
|
|
17
|
+
}
|
|
18
|
+
const TYPE_COLORS = {
|
|
19
|
+
Station: 'bg-cyan-400/20 text-cyan-400',
|
|
20
|
+
Matrix: 'bg-white/20 text-white',
|
|
21
|
+
Sector: 'bg-cyan-300/20 text-cyan-300',
|
|
22
|
+
System: 'bg-cyan-400/30 text-cyan-200',
|
|
23
|
+
};
|
|
24
|
+
function MicrocosmTerritoryPage({ basePath = '', onNavigate }) {
|
|
25
|
+
const { data: collection, loading: colLoading } = (0, auth_react_1.useTerritoryNFTCollection)();
|
|
26
|
+
const { data: wallets } = (0, auth_react_1.useWallets)();
|
|
27
|
+
const primaryWallet = Array.isArray(wallets) ? wallets.find((w) => w.is_primary)?.wallet_address : undefined;
|
|
28
|
+
const { data: myNfts, loading: nftsLoading } = (0, auth_react_1.useTerritoryNFTs)(primaryWallet);
|
|
29
|
+
const [selectedNft, setSelectedNft] = (0, react_1.useState)(null);
|
|
30
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)('my');
|
|
31
|
+
const col = collection;
|
|
32
|
+
const nftList = Array.isArray(myNfts) ? myNfts : [];
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Territory" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "Territory NFT collection & management" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [
|
|
34
|
+
{ label: 'stations', value: col?.station_count ?? 0 },
|
|
35
|
+
{ label: 'matrices', value: col?.matrix_count ?? 0 },
|
|
36
|
+
{ label: 'sectors', value: col?.sector_count ?? 0 },
|
|
37
|
+
{ label: 'total_minted', value: col?.total_minted ?? 0 },
|
|
38
|
+
].map((s) => ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: s.label }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-white", children: colLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : fmt(s.value) })] }, s.label))) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 bg-black p-0.5 rounded w-fit", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('my'), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === 'my' ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: ["My NFTs (", nftList.length, ")"] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setActiveTab('all'), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === 'all' ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: "All NFTs" })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsx)("div", { className: "p-6", children: nftsLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : activeTab === 'my' ? (nftList.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", children: nftList.map((nft) => ((0, jsx_runtime_1.jsxs)("div", { onClick: () => setSelectedNft(nft), className: "bg-neutral-800 rounded-lg border border-neutral-700 hover:border-cyan-400/50 cursor-pointer transition-colors overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "aspect-square bg-neutral-700 flex items-center justify-center text-4xl", children: nft.image ? ((0, jsx_runtime_1.jsx)("img", { src: nft.image, alt: nft.name, className: "w-full h-full object-cover" })) : ('🏗') }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white text-sm font-bold truncate", children: nft.name || 'Territory NFT' }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: `text-[10px] px-1.5 py-0.5 rounded ${TYPE_COLORS[nft.nft_type] ?? 'bg-neutral-700 text-neutral-400'}`, children: nft.nft_type || 'Station' }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] text-neutral-500 mt-1 font-mono", children: [nft.mint?.slice(0, 8), "..."] })] })] }, nft.mint))) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "no territory NFTs owned" }))) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 font-mono text-sm", children: "Use search to find specific NFTs by mint address" })) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "TERRITORY_HIERARCHY" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [
|
|
39
|
+
{ name: 'Station', capacity: '1,000 users', desc: 'Base unit' },
|
|
40
|
+
{ name: 'Matrix', capacity: '10 Stations', desc: 'Regional group' },
|
|
41
|
+
{ name: 'Sector', capacity: '10 Matrices', desc: 'Area governance' },
|
|
42
|
+
{ name: 'System', capacity: '10 Sectors', desc: 'Top-level domain' },
|
|
43
|
+
].map((t) => ((0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: `text-sm font-bold ${TYPE_COLORS[t.name]?.split(' ')[1] ?? 'text-white'}`, children: t.name }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mt-1", children: t.capacity }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-500 mt-0.5", children: t.desc })] }, t.name))) })] }), (0, jsx_runtime_1.jsx)(Modal, { open: !!selectedNft, onClose: () => setSelectedNft(null), children: selectedNft && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "aspect-square bg-neutral-800 rounded-lg overflow-hidden flex items-center justify-center", children: selectedNft.image ? ((0, jsx_runtime_1.jsx)("img", { src: selectedNft.image, alt: selectedNft.name, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-6xl", children: "\uD83C\uDFD7" })) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-bold text-white", children: selectedNft.name }), (0, jsx_runtime_1.jsx)("span", { className: `text-xs px-2 py-0.5 rounded ${TYPE_COLORS[selectedNft.nft_type] ?? 'bg-neutral-700 text-neutral-400'}`, children: selectedNft.nft_type })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between p-2 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "Mint" }), (0, jsx_runtime_1.jsx)("span", { className: "text-white font-mono text-xs", children: selectedNft.mint })] }), selectedNft.owner && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between p-2 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "Owner" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-mono text-xs", children: [selectedNft.owner.slice(0, 8), "...", selectedNft.owner.slice(-4)] })] })), selectedNft.unit_id && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between p-2 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: "Unit ID" }), (0, jsx_runtime_1.jsx)("span", { className: "text-white font-mono", children: selectedNft.unit_id })] }))] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setSelectedNft(null), className: "w-full py-2 border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 bg-transparent text-sm", children: "Close" })] })) })] }));
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmVotingPage = MicrocosmVotingPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
function MicrocosmVotingPage({ basePath = '', onNavigate }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Voting & Governance" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "Decentralized decision-making protocol" })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] bg-cyan-400/20 text-cyan-400 px-2 py-0.5 rounded", children: "Under Construction" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "BUILD_GOAL" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-300 text-sm mb-4", children: "A decentralized governance system that aligns economic incentives with community decision-making, preventing Sybil attacks while ensuring fair representation." }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-3", children: [
|
|
9
|
+
{ title: 'Anti-Sybil', desc: 'Economic cost to vote prevents fake identity attacks', icon: '🛡' },
|
|
10
|
+
{ title: 'Incentive Alignment', desc: 'Voting costs create genuine commitment to outcomes', icon: '⚖️' },
|
|
11
|
+
{ title: 'Decentralized', desc: 'No central authority — community-driven decisions', icon: '🌐' },
|
|
12
|
+
].map((f) => ((0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-2xl mb-2", children: f.icon }), (0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold text-sm", children: f.title }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mt-1", children: f.desc })] }, f.title))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold", children: "Betting Mode" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded", children: "Prediction" })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400 mb-4", children: "Participants stake MCC on their predicted outcome. Winners share the losing pool proportionally." }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mb-2", children: "Mechanism" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside text-sm text-neutral-300 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Stake MCC on a predicted outcome" }), (0, jsx_runtime_1.jsx)("li", { children: "Wait for resolution (oracle / admin)" }), (0, jsx_runtime_1.jsx)("li", { children: "Winners split the losing pool" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\u2764\uFE0F" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold", children: "Welfare Mode" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] bg-red-400/20 text-red-400 px-1.5 py-0.5 rounded", children: "Public Good" })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400 mb-4", children: "Participants vote with MCC. All staked tokens go to a foundation fund for ecosystem development." }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mb-2", children: "Mechanism" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside text-sm text-neutral-300 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Vote with MCC (quadratic or linear)" }), (0, jsx_runtime_1.jsx)("li", { children: "All votes fund the foundation" }), (0, jsx_runtime_1.jsx)("li", { children: "Majority decision executed" })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "VOTING_PARAMETERS" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3", children: [
|
|
13
|
+
{ label: 'voting_currency', value: 'MCC', desc: 'Microcosm Coin' },
|
|
14
|
+
{ label: 'vote_weight', value: 'Quadratic', desc: 'sqrt(tokens) = votes' },
|
|
15
|
+
{ label: 'min_participation', value: 'Quorum', desc: 'Minimum voter threshold' },
|
|
16
|
+
{ label: 'foundation_fund', value: 'Reserve', desc: 'Ecosystem development' },
|
|
17
|
+
].map((p) => ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-400 tracking-wider mb-1", children: p.label }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg font-bold text-cyan-400", children: p.value }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] text-neutral-500 mt-1", children: p.desc })] }, p.label))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center py-8", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-3", children: "\uD83C\uDFD7" }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 font-mono text-sm", children: "Voting system is under active development. Stay tuned for updates." })] })] }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
'use client';
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MicrocosmWalletPage = MicrocosmWalletPage;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const auth_react_1 = require("@microcosmmoney/auth-react");
|
|
9
|
+
const fmt = (n, d = 2) => n.toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
10
|
+
function Spinner() {
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "inline-block w-5 h-5 border-2 border-cyan-400 border-t-transparent rounded-full animate-spin" });
|
|
12
|
+
}
|
|
13
|
+
function MicrocosmWalletPage({ basePath = '', onNavigate }) {
|
|
14
|
+
const { balance: mccData, loading: mccLoading } = (0, auth_react_1.useMCC)(60000);
|
|
15
|
+
const { balance: mcdData, loading: mcdLoading } = (0, auth_react_1.useMCD)(60000);
|
|
16
|
+
const { data: wallets, loading: walletsLoading } = (0, auth_react_1.useWallets)();
|
|
17
|
+
const { data: locks } = (0, auth_react_1.useMCCLocks)();
|
|
18
|
+
const { data: marketData } = (0, auth_react_1.useMarketData)();
|
|
19
|
+
const { data: multiBalance } = (0, auth_react_1.useMultiWalletBalance)();
|
|
20
|
+
const [hideBalance, setHideBalance] = (0, react_1.useState)(false);
|
|
21
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)('all');
|
|
22
|
+
const mccBalance = mccData?.balance ?? 0;
|
|
23
|
+
const mcdAmount = parseFloat(mcdData?.available_balance ?? '0');
|
|
24
|
+
const mcdReceived = parseFloat(mcdData?.total_balance ?? '0');
|
|
25
|
+
const mcdSpent = parseFloat(mcdData?.frozen_balance ?? '0');
|
|
26
|
+
const price = marketData?.price_usd ?? 0;
|
|
27
|
+
const totalUsd = mccBalance * price;
|
|
28
|
+
const walletList = Array.isArray(wallets) ? wallets : [];
|
|
29
|
+
const activeLocks = Array.isArray(locks) ? locks.filter((l) => l.status === 'locked') : [];
|
|
30
|
+
const lockedAmount = activeLocks.reduce((s, l) => s + (l.amount || 0), 0);
|
|
31
|
+
const mask = (v) => hideBalance ? '****' : v;
|
|
32
|
+
const resolvePath = (p) => basePath ? `${basePath.replace(/\/$/, '')}${p}` : p;
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto font-mono space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Wallet" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-sm mt-1", children: "On-chain assets & balances" })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setHideBalance(!hideBalance), className: "flex items-center gap-2 px-3 py-1.5 text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 bg-transparent", children: hideBalance ? '👁 Show' : '🙈 Hide' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-2", children: "TOTAL_ASSET_VALUE" }), (0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold font-mono text-cyan-400", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(`$${fmt(totalUsd)}`) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-500 font-mono mt-1", children: [mask(fmt(mccBalance, 3)), " MCC \u00D7 $", fmt(price, 4)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 bg-black p-0.5 rounded w-fit", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setActiveTab('all'), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === 'all' ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: "All Wallets" }), walletList.map((w, i) => ((0, jsx_runtime_1.jsx)("button", { onClick: () => setActiveTab(w.wallet_address), className: `px-3 py-1 text-xs font-mono rounded ${activeTab === w.wallet_address ? 'bg-cyan-700 text-white' : 'text-neutral-500 hover:text-neutral-300'}`, children: w.is_primary ? 'Primary' : `Wallet ${i + 1}` }, w.wallet_address)))] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-xs font-mono tracking-wider", children: "MCC_BALANCE" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/mining')), className: "text-xs text-cyan-400 hover:text-cyan-300 font-mono", children: "Start Mining \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold font-mono text-cyan-400", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mccBalance, 3)) }), totalUsd > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-500 font-mono mt-1", children: ["\u2248 ", mask(`$${fmt(totalUsd)}`)] })), walletList.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-4 space-y-2", children: walletList.map((w) => {
|
|
34
|
+
const wb = Array.isArray(multiBalance) ? multiBalance.find((b) => b.wallet_address === w.wallet_address) : null;
|
|
35
|
+
const bal = wb?.portfolio?.mcc_balance ?? 0;
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between p-3 bg-neutral-800 rounded border border-neutral-700 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 font-mono", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-4)] }), w.is_primary && (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded", children: "PRIMARY" })] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-mono font-bold", children: [mask(fmt(bal, 3)), " MCC"] })] }, w.wallet_address));
|
|
37
|
+
}) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-2", children: "MCD_BALANCE" }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold font-mono text-white", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdAmount)) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-500 font-mono mt-1 space-x-3", children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Income: ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: mask(fmt(mcdReceived, 0)) })] }), (0, jsx_runtime_1.jsxs)("span", { children: ["Spent: ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: mask(fmt(mcdSpent, 0)) })] })] })] }), activeLocks.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-xs font-mono tracking-wider mb-4", children: "LOCK_PERIODS" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-3", children: activeLocks.map((lock, i) => {
|
|
38
|
+
const start = new Date(lock.start_date || lock.created_at).getTime();
|
|
39
|
+
const end = new Date(lock.end_date || start + 14 * 86400000).getTime();
|
|
40
|
+
const now = Date.now();
|
|
41
|
+
const progress = Math.min(100, ((now - start) / (end - start)) * 100);
|
|
42
|
+
const daysLeft = Math.max(0, Math.ceil((end - now) / 86400000));
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-white font-mono font-bold", children: [mask(fmt(lock.amount, 2)), " MCC"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xs text-neutral-400", children: [daysLeft, "d remaining"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-neutral-700 rounded-full h-2", children: (0, jsx_runtime_1.jsx)("div", { className: "bg-cyan-400 h-2 rounded-full transition-all", style: { width: `${progress}%` } }) })] }, i));
|
|
44
|
+
}) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 text-xs text-neutral-500 font-mono", children: ["Total locked: ", mask(fmt(lockedAmount, 2)), " MCC"] })] }))] }));
|
|
45
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,3 +43,17 @@ export { MicrocosmFragmentPage } from './components/fragment/fragment-page';
|
|
|
43
43
|
export type { MicrocosmFragmentPageProps } from './components/fragment/fragment-page';
|
|
44
44
|
export { MicrocosmLendingPage } from './components/lending/lending-page';
|
|
45
45
|
export type { MicrocosmLendingPageProps } from './components/lending/lending-page';
|
|
46
|
+
export { MicrocosmWalletPage } from './components/wallet/wallet-page';
|
|
47
|
+
export type { MicrocosmWalletPageProps } from './components/wallet/wallet-page';
|
|
48
|
+
export { MicrocosmMiningPage } from './components/mining/mining-page';
|
|
49
|
+
export type { MicrocosmMiningPageProps } from './components/mining/mining-page';
|
|
50
|
+
export { MicrocosmMCDPage } from './components/mcd/mcd-page';
|
|
51
|
+
export type { MicrocosmMCDPageProps } from './components/mcd/mcd-page';
|
|
52
|
+
export { MicrocosmAuctionPage } from './components/auction/auction-page';
|
|
53
|
+
export type { MicrocosmAuctionPageProps } from './components/auction/auction-page';
|
|
54
|
+
export { MicrocosmTerritoryPage } from './components/territory/territory-page';
|
|
55
|
+
export type { MicrocosmTerritoryPageProps } from './components/territory/territory-page';
|
|
56
|
+
export { MicrocosmOrganizationPage } from './components/organization/organization-page';
|
|
57
|
+
export type { MicrocosmOrganizationPageProps } from './components/organization/organization-page';
|
|
58
|
+
export { MicrocosmVotingPage } from './components/voting/voting-page';
|
|
59
|
+
export type { MicrocosmVotingPageProps } from './components/voting/voting-page';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MicrocosmLendingPage = exports.MicrocosmFragmentPage = exports.MicrocosmLockPeriods = exports.MicrocosmMCDStats = exports.MicrocosmMCCTokenStats = exports.MicrocosmEcosystemStats = exports.MicrocosmMyMining = exports.MicrocosmMiningWeight = exports.MicrocosmMintingStats = exports.MicrocosmPriceChart = exports.MicrocosmAssetsSummary = exports.MicrocosmQuickActions = exports.MicrocosmMarketBar = exports.MicrocosmDashboardOverview = exports.KPIRadialChart = exports.VoteResultBar = exports.MiningProgressBar = exports.TerritoryCard = exports.TerminalTooltip = exports.TerminalInput = exports.TerminalCountdown = exports.TerminalDialog = exports.TerminalTabs = exports.TerminalTable = exports.TerminalProgress = exports.TerminalDataRow = exports.TerminalBadge = exports.TerminalEmpty = exports.TerminalError = exports.TerminalLoading = exports.TerminalPageHeader = exports.TerminalCommand = exports.StatBox = exports.TerminalCard = exports.resolveMenuPath = exports.getAllMenuItems = exports.microcosmMenuGroups = exports.dashboardMenu = exports.web3OsMenu = exports.blockchainMenu = exports.MicrocosmMenuSection = void 0;
|
|
3
|
+
exports.MicrocosmVotingPage = exports.MicrocosmOrganizationPage = exports.MicrocosmTerritoryPage = exports.MicrocosmAuctionPage = exports.MicrocosmMCDPage = exports.MicrocosmMiningPage = exports.MicrocosmWalletPage = exports.MicrocosmLendingPage = exports.MicrocosmFragmentPage = exports.MicrocosmLockPeriods = exports.MicrocosmMCDStats = exports.MicrocosmMCCTokenStats = exports.MicrocosmEcosystemStats = exports.MicrocosmMyMining = exports.MicrocosmMiningWeight = exports.MicrocosmMintingStats = exports.MicrocosmPriceChart = exports.MicrocosmAssetsSummary = exports.MicrocosmQuickActions = exports.MicrocosmMarketBar = exports.MicrocosmDashboardOverview = exports.KPIRadialChart = exports.VoteResultBar = exports.MiningProgressBar = exports.TerritoryCard = exports.TerminalTooltip = exports.TerminalInput = exports.TerminalCountdown = exports.TerminalDialog = exports.TerminalTabs = exports.TerminalTable = exports.TerminalProgress = exports.TerminalDataRow = exports.TerminalBadge = exports.TerminalEmpty = exports.TerminalError = exports.TerminalLoading = exports.TerminalPageHeader = exports.TerminalCommand = exports.StatBox = exports.TerminalCard = exports.resolveMenuPath = exports.getAllMenuItems = exports.microcosmMenuGroups = exports.dashboardMenu = exports.web3OsMenu = exports.blockchainMenu = exports.MicrocosmMenuSection = void 0;
|
|
4
4
|
// AI-generated · AI-managed · AI-maintained
|
|
5
5
|
var menu_section_1 = require("./components/menu-section");
|
|
6
6
|
Object.defineProperty(exports, "MicrocosmMenuSection", { enumerable: true, get: function () { return menu_section_1.MicrocosmMenuSection; } });
|
|
@@ -70,3 +70,17 @@ var fragment_page_1 = require("./components/fragment/fragment-page");
|
|
|
70
70
|
Object.defineProperty(exports, "MicrocosmFragmentPage", { enumerable: true, get: function () { return fragment_page_1.MicrocosmFragmentPage; } });
|
|
71
71
|
var lending_page_1 = require("./components/lending/lending-page");
|
|
72
72
|
Object.defineProperty(exports, "MicrocosmLendingPage", { enumerable: true, get: function () { return lending_page_1.MicrocosmLendingPage; } });
|
|
73
|
+
var wallet_page_1 = require("./components/wallet/wallet-page");
|
|
74
|
+
Object.defineProperty(exports, "MicrocosmWalletPage", { enumerable: true, get: function () { return wallet_page_1.MicrocosmWalletPage; } });
|
|
75
|
+
var mining_page_1 = require("./components/mining/mining-page");
|
|
76
|
+
Object.defineProperty(exports, "MicrocosmMiningPage", { enumerable: true, get: function () { return mining_page_1.MicrocosmMiningPage; } });
|
|
77
|
+
var mcd_page_1 = require("./components/mcd/mcd-page");
|
|
78
|
+
Object.defineProperty(exports, "MicrocosmMCDPage", { enumerable: true, get: function () { return mcd_page_1.MicrocosmMCDPage; } });
|
|
79
|
+
var auction_page_1 = require("./components/auction/auction-page");
|
|
80
|
+
Object.defineProperty(exports, "MicrocosmAuctionPage", { enumerable: true, get: function () { return auction_page_1.MicrocosmAuctionPage; } });
|
|
81
|
+
var territory_page_1 = require("./components/territory/territory-page");
|
|
82
|
+
Object.defineProperty(exports, "MicrocosmTerritoryPage", { enumerable: true, get: function () { return territory_page_1.MicrocosmTerritoryPage; } });
|
|
83
|
+
var organization_page_1 = require("./components/organization/organization-page");
|
|
84
|
+
Object.defineProperty(exports, "MicrocosmOrganizationPage", { enumerable: true, get: function () { return organization_page_1.MicrocosmOrganizationPage; } });
|
|
85
|
+
var voting_page_1 = require("./components/voting/voting-page");
|
|
86
|
+
Object.defineProperty(exports, "MicrocosmVotingPage", { enumerable: true, get: function () { return voting_page_1.MicrocosmVotingPage; } });
|