@arcanea/core 0.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/README.md +118 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +7 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/mythology.d.ts +22 -0
- package/dist/constants/mythology.d.ts.map +1 -0
- package/dist/constants/mythology.js +170 -0
- package/dist/constants/mythology.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/types/agents.d.ts +101 -0
- package/dist/types/agents.d.ts.map +1 -0
- package/dist/types/agents.js +7 -0
- package/dist/types/agents.js.map +1 -0
- package/dist/types/content.d.ts +152 -0
- package/dist/types/content.d.ts.map +1 -0
- package/dist/types/content.js +7 -0
- package/dist/types/content.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/mythology.d.ts +103 -0
- package/dist/types/mythology.d.ts.map +1 -0
- package/dist/types/mythology.js +8 -0
- package/dist/types/mythology.js.map +1 -0
- package/dist/types/profile.d.ts +131 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/profile.js +7 -0
- package/dist/types/profile.js.map +1 -0
- package/dist/utils/index.d.ts +64 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +150 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arcanea Core Utilities
|
|
3
|
+
*
|
|
4
|
+
* Common utility functions for the Arcanea ecosystem.
|
|
5
|
+
*/
|
|
6
|
+
import { GATES, ELEMENTS, GUARDIANS } from '../constants/mythology.js';
|
|
7
|
+
// ============================================
|
|
8
|
+
// FREQUENCY UTILITIES
|
|
9
|
+
// ============================================
|
|
10
|
+
/**
|
|
11
|
+
* Solfeggio frequencies used in the Gate system
|
|
12
|
+
*/
|
|
13
|
+
export const SOLFEGGIO_FREQUENCIES = [396, 417, 528, 639, 741, 852, 963, 1111];
|
|
14
|
+
/**
|
|
15
|
+
* Get the healing/creative property of a frequency
|
|
16
|
+
*/
|
|
17
|
+
export function getFrequencyProperty(frequency) {
|
|
18
|
+
const properties = {
|
|
19
|
+
396: 'Liberating guilt and fear',
|
|
20
|
+
417: 'Facilitating change',
|
|
21
|
+
528: 'Transformation and miracles (Love frequency)',
|
|
22
|
+
639: 'Connecting relationships',
|
|
23
|
+
741: 'Awakening intuition',
|
|
24
|
+
852: 'Returning to spiritual order',
|
|
25
|
+
963: 'Cosmic consciousness',
|
|
26
|
+
1111: 'Angelic gateway / master number',
|
|
27
|
+
};
|
|
28
|
+
return properties[frequency] || 'Unknown frequency';
|
|
29
|
+
}
|
|
30
|
+
// ============================================
|
|
31
|
+
// GATE UTILITIES
|
|
32
|
+
// ============================================
|
|
33
|
+
/**
|
|
34
|
+
* Calculate magic rank based on gates opened
|
|
35
|
+
*/
|
|
36
|
+
export function calculateMagicRank(gatesOpened) {
|
|
37
|
+
if (gatesOpened >= 9)
|
|
38
|
+
return 'luminor';
|
|
39
|
+
if (gatesOpened >= 7)
|
|
40
|
+
return 'archmage';
|
|
41
|
+
if (gatesOpened >= 5)
|
|
42
|
+
return 'master';
|
|
43
|
+
if (gatesOpened >= 3)
|
|
44
|
+
return 'mage';
|
|
45
|
+
return 'apprentice';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get gate progression percentage
|
|
49
|
+
*/
|
|
50
|
+
export function getGateProgress(gatesOpened) {
|
|
51
|
+
return Math.min(100, (gatesOpened / 10) * 100);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get next gate to open
|
|
55
|
+
*/
|
|
56
|
+
export function getNextGate(gatesOpened) {
|
|
57
|
+
if (gatesOpened >= 10)
|
|
58
|
+
return null;
|
|
59
|
+
return GATES[gatesOpened];
|
|
60
|
+
}
|
|
61
|
+
// ============================================
|
|
62
|
+
// ELEMENT UTILITIES
|
|
63
|
+
// ============================================
|
|
64
|
+
/**
|
|
65
|
+
* Get element color (primary)
|
|
66
|
+
*/
|
|
67
|
+
export function getElementColor(element) {
|
|
68
|
+
const el = ELEMENTS.find(e => e.name === element);
|
|
69
|
+
return el?.colors[0] || '#888888';
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get complementary elements
|
|
73
|
+
*/
|
|
74
|
+
export function getComplementaryElements(element) {
|
|
75
|
+
const complements = {
|
|
76
|
+
fire: ['water', 'void'],
|
|
77
|
+
water: ['fire', 'earth'],
|
|
78
|
+
earth: ['wind', 'water'],
|
|
79
|
+
wind: ['earth', 'fire'],
|
|
80
|
+
void: ['fire', 'water', 'earth', 'wind'],
|
|
81
|
+
};
|
|
82
|
+
return complements[element] || [];
|
|
83
|
+
}
|
|
84
|
+
// ============================================
|
|
85
|
+
// GUARDIAN UTILITIES
|
|
86
|
+
// ============================================
|
|
87
|
+
/**
|
|
88
|
+
* Get guardian by gate number
|
|
89
|
+
*/
|
|
90
|
+
export function getGuardianByGateNumber(gateNumber) {
|
|
91
|
+
const gate = GATES.find(g => g.number === gateNumber);
|
|
92
|
+
if (!gate)
|
|
93
|
+
return null;
|
|
94
|
+
return GUARDIANS.find(g => g.name === gate.guardian);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get guardians by element
|
|
98
|
+
*/
|
|
99
|
+
export function getGuardiansByElement(element) {
|
|
100
|
+
return GUARDIANS.filter(g => g.element === element);
|
|
101
|
+
}
|
|
102
|
+
// ============================================
|
|
103
|
+
// STRING UTILITIES
|
|
104
|
+
// ============================================
|
|
105
|
+
/**
|
|
106
|
+
* Convert gate name to display format
|
|
107
|
+
*/
|
|
108
|
+
export function formatGateName(gate) {
|
|
109
|
+
return gate.charAt(0).toUpperCase() + gate.slice(1) + ' Gate';
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create a slug from text
|
|
113
|
+
*/
|
|
114
|
+
export function slugify(text) {
|
|
115
|
+
return text
|
|
116
|
+
.toLowerCase()
|
|
117
|
+
.replace(/[^\w\s-]/g, '')
|
|
118
|
+
.replace(/[\s_-]+/g, '-')
|
|
119
|
+
.replace(/^-+|-+$/g, '');
|
|
120
|
+
}
|
|
121
|
+
// ============================================
|
|
122
|
+
// DATE UTILITIES
|
|
123
|
+
// ============================================
|
|
124
|
+
/**
|
|
125
|
+
* Format date for Arcanea display
|
|
126
|
+
*/
|
|
127
|
+
export function formatArcaneaDate(date) {
|
|
128
|
+
const d = typeof date === 'string' ? new Date(date) : date;
|
|
129
|
+
return d.toLocaleDateString('en-US', {
|
|
130
|
+
year: 'numeric',
|
|
131
|
+
month: 'long',
|
|
132
|
+
day: 'numeric',
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// ============================================
|
|
136
|
+
// VALIDATION UTILITIES
|
|
137
|
+
// ============================================
|
|
138
|
+
/**
|
|
139
|
+
* Check if a string is a valid gate name
|
|
140
|
+
*/
|
|
141
|
+
export function isValidGateName(name) {
|
|
142
|
+
return GATES.some(g => g.name === name);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if a string is a valid element
|
|
146
|
+
*/
|
|
147
|
+
export function isValidElement(name) {
|
|
148
|
+
return ELEMENTS.some(e => e.name === name);
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,EAAe,QAAQ,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEpF,+CAA+C;AAC/C,sBAAsB;AACtB,+CAA+C;AAE/C;;GAEG;AACH,MAAM,CAAC,M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2
|
+
"name": "@arcanea/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Core types, constants, and utilities for the Arcanea ecosystem",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./types": {
|
|
15
|
+
"types": "./dist/types/index.d.ts",
|
|
16
|
+
"import": "./dist/types/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./constants": {
|
|
19
|
+
"types": "./dist/constants/index.d.ts",
|
|
20
|
+
"import": "./dist/constants/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./utils": {
|
|
23
|
+
"types": "./dist/utils/index.d.ts",
|
|
24
|
+
"import": "./dist/utils/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"dev": "tsc --watch",
|
|
34
|
+
"clean": "rm -rf dist",
|
|
35
|
+
"prepublishOnly": "npm run build"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"arcanea",
|
|
39
|
+
"mythology",
|
|
40
|
+
"ai",
|
|
41
|
+
"creative",
|
|
42
|
+
"types",
|
|
43
|
+
"typescript"
|
|
44
|
+
],
|
|
45
|
+
"author": "FrankX <frank@frankx.ai>",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/frankxai/arcanea.git",
|
|
50
|
+
"directory": "packages/core"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"typescript": "^5.9.3"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
|
+
}
|