@myhpmp/core 1.0.1 â 1.1.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/exp-calculator.d.ts +2 -1
- package/dist/exp-calculator.js +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tier.js +10 -10
- package/package.json +2 -2
package/dist/exp-calculator.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function calcTokenExp(tokens: number): number;
|
|
2
|
-
export declare
|
|
2
|
+
export declare const DAILY_SESSION_CAP = 30;
|
|
3
|
+
export declare function calcSessionExp(dailySessionCount?: number): number;
|
|
3
4
|
export declare function calcStreakBonus(streakDays: number): number;
|
|
4
5
|
export declare function calcWeeklyBonus(weeklyUsagePercent: number): number;
|
package/dist/exp-calculator.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export function calcTokenExp(tokens) {
|
|
2
2
|
return Math.floor(tokens / 1000);
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export const DAILY_SESSION_CAP = 30;
|
|
5
|
+
export function calcSessionExp(dailySessionCount = 0) {
|
|
6
|
+
if (dailySessionCount >= DAILY_SESSION_CAP)
|
|
7
|
+
return 0;
|
|
5
8
|
return 25;
|
|
6
9
|
}
|
|
7
10
|
export function calcStreakBonus(streakDays) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getLevelInfo, getTierForLevel, getStars, TIERS } from './level-system.js';
|
|
2
2
|
export type { Tier, LevelInfo } from './level-system.js';
|
|
3
|
-
export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus } from './exp-calculator.js';
|
|
3
|
+
export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus, DAILY_SESSION_CAP } from './exp-calculator.js';
|
|
4
4
|
export { getTierEmoji, getTierTitle, TIER_EMOJIS, TIER_TITLES, TIER_TITLE_KEYS } from './tier.js';
|
|
5
5
|
export type { TierTitle } from './tier.js';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getLevelInfo, getTierForLevel, getStars, TIERS } from './level-system.js';
|
|
2
|
-
export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus } from './exp-calculator.js';
|
|
2
|
+
export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus, DAILY_SESSION_CAP } from './exp-calculator.js';
|
|
3
3
|
export { getTierEmoji, getTierTitle, TIER_EMOJIS, TIER_TITLES, TIER_TITLE_KEYS } from './tier.js';
|
package/dist/tier.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
export const TIER_EMOJIS = {
|
|
3
3
|
0: 'đą',
|
|
4
4
|
1: 'âď¸',
|
|
5
|
-
2: '
|
|
6
|
-
3: '
|
|
5
|
+
2: 'đ ď¸',
|
|
6
|
+
3: 'đď¸',
|
|
7
7
|
4: 'đŽ',
|
|
8
8
|
5: 'đ',
|
|
9
9
|
6: 'đ',
|
|
@@ -13,14 +13,14 @@ export const TIER_EMOJIS = {
|
|
|
13
13
|
export const TIER_TITLE_KEYS = [1, 6, 11, 16, 21, 31, 41, 51];
|
|
14
14
|
/** Complete tier title data */
|
|
15
15
|
export const TIER_TITLES = {
|
|
16
|
-
0: { ko: '
|
|
17
|
-
1: { ko: '
|
|
18
|
-
2: { ko: '
|
|
19
|
-
3: { ko: '
|
|
20
|
-
4: { ko: '
|
|
21
|
-
5: { ko: '
|
|
22
|
-
6: { ko: '
|
|
23
|
-
7: { ko: '
|
|
16
|
+
0: { ko: 'í륏íí¸ ë´ëš', en: 'Prompt Newbie', emoji: 'đą' },
|
|
17
|
+
1: { ko: 'í í° ěľě¤íëĄëŹ', en: 'Token Explorer', emoji: 'âď¸' },
|
|
18
|
+
2: { ko: 'í륏íí¸ ěě§ëě´', en: 'Prompt Engineer', emoji: 'đ ď¸' },
|
|
19
|
+
3: { ko: '읨í
ě¤í¸ ěí¤í
í¸', en: 'Context Architect', emoji: 'đď¸' },
|
|
20
|
+
4: { ko: 'í륏íí¸ ěěëŹ', en: 'Prompt Sorcerer', emoji: 'đŽ' },
|
|
21
|
+
5: { ko: 'ëŞ¨ë¸ ë§ě¤í°', en: 'Model Master', emoji: 'đ' },
|
|
22
|
+
6: { ko: '읨í
ě¤í¸ ě¤ë˛ëĄë', en: 'Context Overlord', emoji: 'đ' },
|
|
23
|
+
7: { ko: 'ě ěíą ë§ě¸ë', en: 'Synthetic Mind', emoji: 'âĄ' },
|
|
24
24
|
};
|
|
25
25
|
export function getTierEmoji(tierIndex) {
|
|
26
26
|
return TIER_EMOJIS[tierIndex] ?? 'đą';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myhpmp/core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Shared core logic for My HP/MP â level system, EXP calculator, tier data, i18n",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
-
"test": "vitest run",
|
|
13
|
+
"test": "vitest run --passWithNoTests",
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|