@aigne/moonphase 1.11.0-beta.12
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/LICENSE.md +26 -0
- package/dist/index.d.mts +36 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +117 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +51 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 ArcBlock, Inc. All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are proprietary
|
|
6
|
+
and confidential. Unauthorized copying, modification, distribution, or use of
|
|
7
|
+
this Software, via any medium, is strictly prohibited.
|
|
8
|
+
|
|
9
|
+
The Software is provided for internal use only within ArcBlock, Inc. and its
|
|
10
|
+
authorized affiliates.
|
|
11
|
+
|
|
12
|
+
## No License Granted
|
|
13
|
+
|
|
14
|
+
No license, express or implied, is granted to any party for any purpose.
|
|
15
|
+
All rights are reserved by ArcBlock, Inc.
|
|
16
|
+
|
|
17
|
+
## Public Artifact Distribution
|
|
18
|
+
|
|
19
|
+
Portions of this Software may be released publicly under separate open-source
|
|
20
|
+
licenses (such as MIT License) through designated public repositories. Such
|
|
21
|
+
public releases are governed by their respective licenses and do not affect
|
|
22
|
+
the proprietary nature of this repository.
|
|
23
|
+
|
|
24
|
+
## Contact
|
|
25
|
+
|
|
26
|
+
For licensing inquiries, contact: legal@arcblock.io
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Lunar phase calculator — pure math, zero dependencies.
|
|
4
|
+
*
|
|
5
|
+
* Ported from lunarphase-calculator (blocklet/aistro).
|
|
6
|
+
*/
|
|
7
|
+
/** Mean synodic month in days (new moon → new moon). */
|
|
8
|
+
declare const SYNODIC_MONTH = 29.53058770576;
|
|
9
|
+
type LunarPhase = "NEW_MOON" | "WAXING_CRESCENT" | "FIRST_QUARTER" | "WAXING_GIBBOUS" | "FULL_MOON" | "WANING_GIBBOUS" | "LAST_QUARTER" | "WANING_CRESCENT";
|
|
10
|
+
declare const PHASES: readonly LunarPhase[];
|
|
11
|
+
/** Convert a Gregorian Date to Julian Day Number. */
|
|
12
|
+
declare function toJDN(date: Date): number;
|
|
13
|
+
/** Convert a Julian Day Number back to [year, month, day]. */
|
|
14
|
+
declare function fromJDN(jdn: number): [year: number, month: number, day: number];
|
|
15
|
+
/**
|
|
16
|
+
* Fractional lunar day (0 = new moon, ~14.77 = full moon, ~29.53 = next new moon).
|
|
17
|
+
*/
|
|
18
|
+
declare function getLunarDay(date?: Date): number;
|
|
19
|
+
/** Map a lunar day to its named phase. */
|
|
20
|
+
declare function getLunarPhase(lunarDay?: number): LunarPhase;
|
|
21
|
+
/** Illumination fraction (0 = new moon, 1 = full moon). */
|
|
22
|
+
declare function getIllumination(lunarDay?: number): number;
|
|
23
|
+
interface PhaseInfo {
|
|
24
|
+
date: string;
|
|
25
|
+
lunarDay: number;
|
|
26
|
+
phase: LunarPhase;
|
|
27
|
+
illumination: number;
|
|
28
|
+
}
|
|
29
|
+
/** Full phase info for a given date. */
|
|
30
|
+
declare function getPhaseInfo(date?: Date): PhaseInfo;
|
|
31
|
+
/** Phase for each day of the given month. */
|
|
32
|
+
declare function getMonthPhases(year: number, month: number): PhaseInfo[];
|
|
33
|
+
declare function getPhaseEmoji(phase: LunarPhase): string;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { LunarPhase, PHASES, PhaseInfo, SYNODIC_MONTH, fromJDN, getIllumination, getLunarDay, getLunarPhase, getMonthPhases, getPhaseEmoji, getPhaseInfo, toJDN };
|
|
36
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;AASA;;;;;cAAa,aAAA;AAAA,KAoBD,UAAA;AAAA,cAUC,MAAA,WAAiB,UAAA;;iBAcd,KAAA,CAAM,IAAA,EAAM,IAAA;AAd5B;AAAA,iBAmCgB,OAAA,CAAQ,GAAA,YAAe,IAAA,UAAc,KAAA,UAAe,GAAA;;;;iBAoBpD,WAAA,CAAY,IAAA,GAAM,IAAA;;iBASlB,aAAA,CAAc,QAAA,YAAmC,UAAA;;iBAcjD,eAAA,CAAgB,QAAA;AAAA,UAOf,SAAA;EACf,IAAA;EACA,QAAA;EACA,KAAA,EAAO,UAAA;EACP,YAAA;AAAA;;iBAIc,YAAA,CAAa,IAAA,GAAM,IAAA,GAAoB,SAAA;;iBAWvC,cAAA,CAAe,IAAA,UAAc,KAAA,WAAgB,SAAA;AAAA,iBAsB7C,aAAA,CAAc,KAAA,EAAO,UAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Lunar phase calculator — pure math, zero dependencies.
|
|
4
|
+
*
|
|
5
|
+
* Ported from lunarphase-calculator (blocklet/aistro).
|
|
6
|
+
*/
|
|
7
|
+
/** Mean synodic month in days (new moon → new moon). */
|
|
8
|
+
const SYNODIC_MONTH = 29.53058770576;
|
|
9
|
+
/** JDN of a known new-moon reference epoch (2000-01-06 18:14 UTC). */
|
|
10
|
+
const START_JDN = 2451550.1;
|
|
11
|
+
/** Phase boundary thresholds (in lunar days 0–29.53). */
|
|
12
|
+
const BOUNDARIES = {
|
|
13
|
+
WAXING_CRESCENT: 1,
|
|
14
|
+
FIRST_QUARTER: 6.382647,
|
|
15
|
+
WAXING_GIBBOUS: 8.382647,
|
|
16
|
+
FULL_MOON: 13.765294,
|
|
17
|
+
WANING_GIBBOUS: 15.765294,
|
|
18
|
+
LAST_QUARTER: 21.147941,
|
|
19
|
+
WANING_CRESCENT: 23.147941,
|
|
20
|
+
NEW_MOON_UPPER: 28.530588,
|
|
21
|
+
NEW_MOON_UPPER_END: 29.530588
|
|
22
|
+
};
|
|
23
|
+
const PHASES = [
|
|
24
|
+
"NEW_MOON",
|
|
25
|
+
"WAXING_CRESCENT",
|
|
26
|
+
"FIRST_QUARTER",
|
|
27
|
+
"WAXING_GIBBOUS",
|
|
28
|
+
"FULL_MOON",
|
|
29
|
+
"WANING_GIBBOUS",
|
|
30
|
+
"LAST_QUARTER",
|
|
31
|
+
"WANING_CRESCENT"
|
|
32
|
+
];
|
|
33
|
+
/** Convert a Gregorian Date to Julian Day Number. */
|
|
34
|
+
function toJDN(date) {
|
|
35
|
+
const day = date.getUTCDate();
|
|
36
|
+
const month = date.getUTCMonth() + 1;
|
|
37
|
+
const year = date.getFullYear();
|
|
38
|
+
const a = Math.trunc((14 - month) / 12);
|
|
39
|
+
const y = year + 4800 - a;
|
|
40
|
+
const m = month + 12 * a - 3;
|
|
41
|
+
return day + Math.trunc((153 * m + 2) / 5) + 365 * y + Math.trunc(y / 4) - Math.trunc(y / 100) + Math.trunc(y / 400) - 32045;
|
|
42
|
+
}
|
|
43
|
+
/** Convert a Julian Day Number back to [year, month, day]. */
|
|
44
|
+
function fromJDN(jdn) {
|
|
45
|
+
const a = jdn + 32044;
|
|
46
|
+
const b = Math.trunc((4 * a + 3) / 146097);
|
|
47
|
+
const c = a - Math.trunc(146097 * b / 4);
|
|
48
|
+
const d = Math.trunc((4 * c + 3) / 1461);
|
|
49
|
+
const e = c - Math.trunc(1461 * d / 4);
|
|
50
|
+
const mo = Math.trunc((5 * e + 2) / 153);
|
|
51
|
+
const day = e - Math.trunc((153 * mo + 2) / 5) + 1;
|
|
52
|
+
const month = mo + 3 - 12 * Math.trunc(mo / 10);
|
|
53
|
+
return [
|
|
54
|
+
100 * b + d - 4800 + Math.trunc(mo / 10),
|
|
55
|
+
month,
|
|
56
|
+
day
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Fractional lunar day (0 = new moon, ~14.77 = full moon, ~29.53 = next new moon).
|
|
61
|
+
*/
|
|
62
|
+
function getLunarDay(date = /* @__PURE__ */ new Date()) {
|
|
63
|
+
const raw = (toJDN(date) - START_JDN) / SYNODIC_MONTH;
|
|
64
|
+
const frac = raw - Math.floor(raw);
|
|
65
|
+
return (frac < 0 ? frac + 1 : frac) * SYNODIC_MONTH;
|
|
66
|
+
}
|
|
67
|
+
/** Map a lunar day to its named phase. */
|
|
68
|
+
function getLunarPhase(lunarDay = getLunarDay()) {
|
|
69
|
+
if (lunarDay < BOUNDARIES.WAXING_CRESCENT) return "NEW_MOON";
|
|
70
|
+
if (lunarDay < BOUNDARIES.FIRST_QUARTER) return "WAXING_CRESCENT";
|
|
71
|
+
if (lunarDay < BOUNDARIES.WAXING_GIBBOUS) return "FIRST_QUARTER";
|
|
72
|
+
if (lunarDay < BOUNDARIES.FULL_MOON) return "WAXING_GIBBOUS";
|
|
73
|
+
if (lunarDay < BOUNDARIES.WANING_GIBBOUS) return "FULL_MOON";
|
|
74
|
+
if (lunarDay < BOUNDARIES.LAST_QUARTER) return "WANING_GIBBOUS";
|
|
75
|
+
if (lunarDay < BOUNDARIES.WANING_CRESCENT) return "LAST_QUARTER";
|
|
76
|
+
if (lunarDay < BOUNDARIES.NEW_MOON_UPPER) return "WANING_CRESCENT";
|
|
77
|
+
if (lunarDay < BOUNDARIES.NEW_MOON_UPPER_END) return "NEW_MOON";
|
|
78
|
+
throw new RangeError(`Lunar day ${lunarDay} is out of range [0, ${SYNODIC_MONTH})`);
|
|
79
|
+
}
|
|
80
|
+
/** Illumination fraction (0 = new moon, 1 = full moon). */
|
|
81
|
+
function getIllumination(lunarDay = getLunarDay()) {
|
|
82
|
+
return (1 - Math.cos(lunarDay / SYNODIC_MONTH * 2 * Math.PI)) / 2;
|
|
83
|
+
}
|
|
84
|
+
/** Full phase info for a given date. */
|
|
85
|
+
function getPhaseInfo(date = /* @__PURE__ */ new Date()) {
|
|
86
|
+
const lunarDay = getLunarDay(date);
|
|
87
|
+
return {
|
|
88
|
+
date: date.toISOString().slice(0, 10),
|
|
89
|
+
lunarDay: +lunarDay.toFixed(4),
|
|
90
|
+
phase: getLunarPhase(lunarDay),
|
|
91
|
+
illumination: +getIllumination(lunarDay).toFixed(4)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/** Phase for each day of the given month. */
|
|
95
|
+
function getMonthPhases(year, month) {
|
|
96
|
+
const results = [];
|
|
97
|
+
const daysInMonth = new Date(year, month, 0).getDate();
|
|
98
|
+
for (let day = 1; day <= daysInMonth; day++) results.push(getPhaseInfo(new Date(year, month - 1, day)));
|
|
99
|
+
return results;
|
|
100
|
+
}
|
|
101
|
+
const PHASE_EMOJI = {
|
|
102
|
+
NEW_MOON: "🌑",
|
|
103
|
+
WAXING_CRESCENT: "🌒",
|
|
104
|
+
FIRST_QUARTER: "🌓",
|
|
105
|
+
WAXING_GIBBOUS: "🌔",
|
|
106
|
+
FULL_MOON: "🌕",
|
|
107
|
+
WANING_GIBBOUS: "🌖",
|
|
108
|
+
LAST_QUARTER: "🌗",
|
|
109
|
+
WANING_CRESCENT: "🌘"
|
|
110
|
+
};
|
|
111
|
+
function getPhaseEmoji(phase) {
|
|
112
|
+
return PHASE_EMOJI[phase];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
//#endregion
|
|
116
|
+
export { PHASES, SYNODIC_MONTH, fromJDN, getIllumination, getLunarDay, getLunarPhase, getMonthPhases, getPhaseEmoji, getPhaseInfo, toJDN };
|
|
117
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Lunar phase calculator — pure math, zero dependencies.\n *\n * Ported from lunarphase-calculator (blocklet/aistro).\n */\n\n// ── Constants ──\n\n/** Mean synodic month in days (new moon → new moon). */\nexport const SYNODIC_MONTH = 29.53058770576;\n\n/** JDN of a known new-moon reference epoch (2000-01-06 18:14 UTC). */\nconst START_JDN = 2451550.1;\n\n/** Phase boundary thresholds (in lunar days 0–29.53). */\nconst BOUNDARIES = {\n WAXING_CRESCENT: 1,\n FIRST_QUARTER: 6.382647,\n WAXING_GIBBOUS: 8.382647,\n FULL_MOON: 13.765294,\n WANING_GIBBOUS: 15.765294,\n LAST_QUARTER: 21.147941,\n WANING_CRESCENT: 23.147941,\n NEW_MOON_UPPER: 28.530588,\n NEW_MOON_UPPER_END: 29.530588,\n} as const;\n\n// ── Phase enum ──\n\nexport type LunarPhase =\n | \"NEW_MOON\"\n | \"WAXING_CRESCENT\"\n | \"FIRST_QUARTER\"\n | \"WAXING_GIBBOUS\"\n | \"FULL_MOON\"\n | \"WANING_GIBBOUS\"\n | \"LAST_QUARTER\"\n | \"WANING_CRESCENT\";\n\nexport const PHASES: readonly LunarPhase[] = [\n \"NEW_MOON\",\n \"WAXING_CRESCENT\",\n \"FIRST_QUARTER\",\n \"WAXING_GIBBOUS\",\n \"FULL_MOON\",\n \"WANING_GIBBOUS\",\n \"LAST_QUARTER\",\n \"WANING_CRESCENT\",\n] as const;\n\n// ── Julian Day Number conversion ──\n\n/** Convert a Gregorian Date to Julian Day Number. */\nexport function toJDN(date: Date): number {\n const day = date.getUTCDate();\n const month = date.getUTCMonth() + 1;\n const year = date.getFullYear();\n\n const a = Math.trunc((14 - month) / 12);\n const y = year + 4800 - a;\n const m = month + 12 * a - 3;\n\n return (\n day +\n Math.trunc((153 * m + 2) / 5) +\n 365 * y +\n Math.trunc(y / 4) -\n Math.trunc(y / 100) +\n Math.trunc(y / 400) -\n 32045\n );\n}\n\n/** Convert a Julian Day Number back to [year, month, day]. */\nexport function fromJDN(jdn: number): [year: number, month: number, day: number] {\n const a = jdn + 32044;\n const b = Math.trunc((4 * a + 3) / 146097);\n const c = a - Math.trunc((146097 * b) / 4);\n const d = Math.trunc((4 * c + 3) / 1461);\n const e = c - Math.trunc((1461 * d) / 4);\n const mo = Math.trunc((5 * e + 2) / 153);\n\n const day = e - Math.trunc((153 * mo + 2) / 5) + 1;\n const month = mo + 3 - 12 * Math.trunc(mo / 10);\n const year = 100 * b + d - 4800 + Math.trunc(mo / 10);\n\n return [year, month, day];\n}\n\n// ── Core calculation ──\n\n/**\n * Fractional lunar day (0 = new moon, ~14.77 = full moon, ~29.53 = next new moon).\n */\nexport function getLunarDay(date: Date = new Date()): number {\n const jdn = toJDN(date);\n const raw = (jdn - START_JDN) / SYNODIC_MONTH;\n const frac = raw - Math.floor(raw);\n const norm = frac < 0 ? frac + 1 : frac;\n return norm * SYNODIC_MONTH;\n}\n\n/** Map a lunar day to its named phase. */\nexport function getLunarPhase(lunarDay: number = getLunarDay()): LunarPhase {\n if (lunarDay < BOUNDARIES.WAXING_CRESCENT) return \"NEW_MOON\";\n if (lunarDay < BOUNDARIES.FIRST_QUARTER) return \"WAXING_CRESCENT\";\n if (lunarDay < BOUNDARIES.WAXING_GIBBOUS) return \"FIRST_QUARTER\";\n if (lunarDay < BOUNDARIES.FULL_MOON) return \"WAXING_GIBBOUS\";\n if (lunarDay < BOUNDARIES.WANING_GIBBOUS) return \"FULL_MOON\";\n if (lunarDay < BOUNDARIES.LAST_QUARTER) return \"WANING_GIBBOUS\";\n if (lunarDay < BOUNDARIES.WANING_CRESCENT) return \"LAST_QUARTER\";\n if (lunarDay < BOUNDARIES.NEW_MOON_UPPER) return \"WANING_CRESCENT\";\n if (lunarDay < BOUNDARIES.NEW_MOON_UPPER_END) return \"NEW_MOON\";\n throw new RangeError(`Lunar day ${lunarDay} is out of range [0, ${SYNODIC_MONTH})`);\n}\n\n/** Illumination fraction (0 = new moon, 1 = full moon). */\nexport function getIllumination(lunarDay: number = getLunarDay()): number {\n // Simple cosine approximation\n return (1 - Math.cos((lunarDay / SYNODIC_MONTH) * 2 * Math.PI)) / 2;\n}\n\n// ── Convenience ──\n\nexport interface PhaseInfo {\n date: string;\n lunarDay: number;\n phase: LunarPhase;\n illumination: number;\n}\n\n/** Full phase info for a given date. */\nexport function getPhaseInfo(date: Date = new Date()): PhaseInfo {\n const lunarDay = getLunarDay(date);\n return {\n date: date.toISOString().slice(0, 10),\n lunarDay: +lunarDay.toFixed(4),\n phase: getLunarPhase(lunarDay),\n illumination: +getIllumination(lunarDay).toFixed(4),\n };\n}\n\n/** Phase for each day of the given month. */\nexport function getMonthPhases(year: number, month: number): PhaseInfo[] {\n const results: PhaseInfo[] = [];\n const daysInMonth = new Date(year, month, 0).getDate(); // month is 1-based here\n for (let day = 1; day <= daysInMonth; day++) {\n results.push(getPhaseInfo(new Date(year, month - 1, day)));\n }\n return results;\n}\n\n// ── Phase emoji (for display) ──\n\nconst PHASE_EMOJI: Record<LunarPhase, string> = {\n NEW_MOON: \"\\u{1F311}\",\n WAXING_CRESCENT: \"\\u{1F312}\",\n FIRST_QUARTER: \"\\u{1F313}\",\n WAXING_GIBBOUS: \"\\u{1F314}\",\n FULL_MOON: \"\\u{1F315}\",\n WANING_GIBBOUS: \"\\u{1F316}\",\n LAST_QUARTER: \"\\u{1F317}\",\n WANING_CRESCENT: \"\\u{1F318}\",\n};\n\nexport function getPhaseEmoji(phase: LunarPhase): string {\n return PHASE_EMOJI[phase];\n}\n"],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aigne/moonphase",
|
|
3
|
+
"version": "1.11.0-beta.12",
|
|
4
|
+
"description": "Lunar phase calculator — pure math, zero dependencies",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"author": "Arcblock <blocklet@arcblock.io> https://github.com/arcblock",
|
|
10
|
+
"homepage": "https://github.com/arcblock/afs",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/arcblock/afs"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/arcblock/afs/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"require": "./dist/index.cjs",
|
|
25
|
+
"import": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./*": "./*"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"README.md",
|
|
33
|
+
"CHANGELOG.md"
|
|
34
|
+
],
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/bun": "^1.3.6",
|
|
37
|
+
"npm-run-all": "^4.1.5",
|
|
38
|
+
"rimraf": "^6.1.2",
|
|
39
|
+
"tsdown": "0.20.0-beta.3",
|
|
40
|
+
"typescript": "5.9.2",
|
|
41
|
+
"@aigne/scripts": "0.0.0",
|
|
42
|
+
"@aigne/typescript-config": "0.0.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsdown",
|
|
46
|
+
"check-types": "tsc --noEmit",
|
|
47
|
+
"clean": "rimraf dist coverage",
|
|
48
|
+
"test": "bun test",
|
|
49
|
+
"test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text"
|
|
50
|
+
}
|
|
51
|
+
}
|