@microcosmmoney/portal-react 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { MicrocosmMenuSection } from './components/menu-section';
2
2
  export type { MicrocosmMenuSectionProps } from './components/menu-section';
3
- export { blockchainMenu, web3OsMenu, dashboardMenu, microcosmMenuGroups, getAllMenuItems, resolveMenuPath, } from './menu-config';
4
- export type { MicrocosmMenuItem, MicrocosmMenuGroup } from './menu-config';
3
+ export { blockchainMenu, web3OsMenu, dashboardMenu, microcosmMenuGroups, getAllMenuItems, resolveMenuPath, getMenuTitle, getMenuDescription, } from './menu-config';
4
+ export type { MicrocosmMenuItem, MicrocosmMenuGroup, MenuLocale } from './menu-config';
5
5
  export { TerminalCard, StatBox, TerminalCommand, TerminalPageHeader, TerminalLoading, TerminalError, TerminalEmpty, TerminalBadge, TerminalDataRow, TerminalProgress, } from './components/terminal';
6
6
  export { TerminalTable } from './components/terminal-table';
7
7
  export type { TerminalTableColumn, TerminalTableProps } from './components/terminal-table';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
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.getMenuDescription = exports.getMenuTitle = 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; } });
@@ -11,6 +11,8 @@ Object.defineProperty(exports, "dashboardMenu", { enumerable: true, get: functio
11
11
  Object.defineProperty(exports, "microcosmMenuGroups", { enumerable: true, get: function () { return menu_config_1.microcosmMenuGroups; } });
12
12
  Object.defineProperty(exports, "getAllMenuItems", { enumerable: true, get: function () { return menu_config_1.getAllMenuItems; } });
13
13
  Object.defineProperty(exports, "resolveMenuPath", { enumerable: true, get: function () { return menu_config_1.resolveMenuPath; } });
14
+ Object.defineProperty(exports, "getMenuTitle", { enumerable: true, get: function () { return menu_config_1.getMenuTitle; } });
15
+ Object.defineProperty(exports, "getMenuDescription", { enumerable: true, get: function () { return menu_config_1.getMenuDescription; } });
14
16
  var terminal_1 = require("./components/terminal");
15
17
  Object.defineProperty(exports, "TerminalCard", { enumerable: true, get: function () { return terminal_1.TerminalCard; } });
16
18
  Object.defineProperty(exports, "StatBox", { enumerable: true, get: function () { return terminal_1.StatBox; } });
@@ -1,18 +1,29 @@
1
1
  import { type LucideIcon } from 'lucide-react';
2
+ export type MenuLocale = 'en' | 'zh' | 'ja' | 'ko';
2
3
  export interface MicrocosmMenuItem {
3
4
  title: string;
5
+ titles?: Partial<Record<MenuLocale, string>>;
4
6
  key: string;
5
7
  path: string;
6
8
  icon: LucideIcon;
7
9
  description?: string;
10
+ descriptions?: Partial<Record<MenuLocale, string>>;
8
11
  badge?: string;
9
12
  }
10
13
  export interface MicrocosmMenuGroup {
11
14
  title: string;
15
+ titles?: Partial<Record<MenuLocale, string>>;
12
16
  key: string;
13
17
  icon: LucideIcon;
14
18
  items: MicrocosmMenuItem[];
15
19
  }
20
+ /** Resolve localized title — falls back to `item.title` (English) */
21
+ export declare function getMenuTitle(item: {
22
+ title: string;
23
+ titles?: Partial<Record<MenuLocale, string>>;
24
+ }, locale?: MenuLocale): string;
25
+ /** Resolve localized description */
26
+ export declare function getMenuDescription(item: MicrocosmMenuItem, locale?: MenuLocale): string;
16
27
  export declare const dashboardMenu: MicrocosmMenuGroup;
17
28
  export declare const blockchainMenu: MicrocosmMenuGroup;
18
29
  export declare const web3OsMenu: MicrocosmMenuGroup;
@@ -1,10 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.microcosmMenuGroups = exports.web3OsMenu = exports.blockchainMenu = exports.dashboardMenu = void 0;
4
+ exports.getMenuTitle = getMenuTitle;
5
+ exports.getMenuDescription = getMenuDescription;
4
6
  exports.getAllMenuItems = getAllMenuItems;
5
7
  exports.resolveMenuPath = resolveMenuPath;
6
8
  // AI-generated · AI-managed · AI-maintained
7
9
  const lucide_react_1 = require("lucide-react");
10
+ /** Resolve localized title — falls back to `item.title` (English) */
11
+ function getMenuTitle(item, locale) {
12
+ if (!locale || !item.titles)
13
+ return item.title;
14
+ return item.titles[locale] ?? item.title;
15
+ }
16
+ /** Resolve localized description */
17
+ function getMenuDescription(item, locale) {
18
+ if (!locale || !item.descriptions)
19
+ return item.description ?? '';
20
+ return item.descriptions[locale] ?? item.description ?? '';
21
+ }
8
22
  exports.dashboardMenu = {
9
23
  title: 'Overview',
10
24
  key: 'overview',
@@ -54,31 +68,57 @@ exports.web3OsMenu = {
54
68
  items: [
55
69
  {
56
70
  title: 'Auctions',
71
+ titles: { zh: '拍卖', ja: 'Auctions', ko: 'Auctions' },
57
72
  key: 'auctions',
58
73
  path: '/mcc/auctions',
59
74
  icon: lucide_react_1.Gift,
60
75
  description: 'Territory auction bidding',
76
+ descriptions: { zh: '领地拍卖竞价', ja: '領地オークション', ko: '영토 경매' },
61
77
  },
62
78
  {
63
79
  title: 'Territories',
80
+ titles: { zh: '领地管理', ja: 'Territories', ko: 'Territories' },
64
81
  key: 'territory',
65
82
  path: '/user-system/territory',
66
83
  icon: lucide_react_1.Building2,
67
84
  description: 'Territory list and details',
85
+ descriptions: { zh: '领地列表与详情', ja: '領地一覧と詳細', ko: '영토 목록 및 상세' },
86
+ },
87
+ {
88
+ title: 'NFT Fragments',
89
+ titles: { zh: 'NFT 碎片化', ja: 'NFT Fragments', ko: 'NFT Fragments' },
90
+ key: 'fragments',
91
+ path: '/mcc/fragments',
92
+ icon: lucide_react_1.Puzzle,
93
+ description: 'Fractionalize territory NFTs',
94
+ descriptions: { zh: '领地 NFT 碎片化交易', ja: 'NFTフラクション化', ko: 'NFT 분할화' },
95
+ },
96
+ {
97
+ title: 'Lending',
98
+ titles: { zh: '去中心化借贷', ja: 'Lending', ko: 'Lending' },
99
+ key: 'lending',
100
+ path: '/mcc/lending',
101
+ icon: lucide_react_1.Landmark,
102
+ description: 'Borrow MCC with NFT collateral',
103
+ descriptions: { zh: 'NFT 抵押借贷 MCC', ja: 'NFT担保レンディング', ko: 'NFT 담보 대출' },
68
104
  },
69
105
  {
70
106
  title: 'Voting',
107
+ titles: { zh: '投票', ja: 'Voting', ko: 'Voting' },
71
108
  key: 'voting',
72
109
  path: '/mcc/voting',
73
110
  icon: lucide_react_1.Vote,
74
111
  description: 'Community proposal voting',
112
+ descriptions: { zh: '社区提案投票', ja: '提案投票', ko: '제안 투표' },
75
113
  },
76
114
  {
77
115
  title: 'Organization',
116
+ titles: { zh: '组织', ja: 'Organization', ko: 'Organization' },
78
117
  key: 'organization',
79
118
  path: '/user-system/organization',
80
119
  icon: lucide_react_1.Users,
81
120
  description: 'Organization structure',
121
+ descriptions: { zh: '组织架构管理', ja: '組織構造', ko: '조직 구조' },
82
122
  },
83
123
  ],
84
124
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microcosmmoney/portal-react",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Microcosm Portal UI components for React/Next.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",