@magmacomputing/tempo-plugin-astro 1.1.3 → 1.1.4
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 +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ When resolving the term, the plugin intelligently returns the correct astronomic
|
|
|
39
39
|
key: 'Vernal', // Flips to 'Autumnal' if sphere is set to 'south'
|
|
40
40
|
season: 'Spring', // Flips to 'Autumn' if sphere is set to 'south'
|
|
41
41
|
sphere: 'north', // Flips to 'south' if sphere is set to 'south'
|
|
42
|
-
|
|
42
|
+
event: 'Equinox',
|
|
43
43
|
group: 'astronomy',
|
|
44
44
|
year: 2026,
|
|
45
45
|
month: 3,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { Tempo } from '@magmacomputing/tempo/core';
|
|
2
|
+
declare module '@magmacomputing/tempo/core' {
|
|
3
|
+
interface TempoTermRegistry {
|
|
4
|
+
astro: 'Vernal' | 'Summer' | 'Autumnal' | 'Winter';
|
|
5
|
+
astronomy: {
|
|
6
|
+
key: 'Vernal' | 'Summer' | 'Autumnal' | 'Winter';
|
|
7
|
+
season: Tempo.SEASON;
|
|
8
|
+
sphere: Tempo.COMPASS;
|
|
9
|
+
event: 'Equinox' | 'Solstice';
|
|
10
|
+
group: 'astronomy';
|
|
11
|
+
year: number;
|
|
12
|
+
month: number;
|
|
13
|
+
day: number;
|
|
14
|
+
hour: number;
|
|
15
|
+
minute: number;
|
|
16
|
+
second: number;
|
|
17
|
+
millisecond: number;
|
|
18
|
+
microsecond: number;
|
|
19
|
+
nanosecond: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
2
23
|
/**
|
|
3
24
|
* ## AstroTerm
|
|
4
25
|
* Exposes precise astronomical calculations as a standard Tempo scope.
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x156bb5=a0_0x5924;(function(_0x44a49f,_0x3525f2){const _0x2ea014=a0_0x5924,_0x149a9f=_0x44a49f();while(!![]){try{const _0x4186e5=parseInt(_0x2ea014(0x1bc))/0x1+-parseInt(_0x2ea014(0x1d3))/0x2*(parseInt(_0x2ea014(0x1cd))/0x3)+parseInt(_0x2ea014(0x1d4))/0x4+parseInt(_0x2ea014(0x1b5))/0x5+parseInt(_0x2ea014(0x1c6))/0x6*(-parseInt(_0x2ea014(0x1b6))/0x7)+parseInt(_0x2ea014(0x1de))/0x8*(parseInt(_0x2ea014(0x1d1))/0x9)+parseInt(_0x2ea014(0x1d7))/0xa*(-parseInt(_0x2ea014(0x1bf))/0xb);if(_0x4186e5===_0x3525f2)break;else _0x149a9f['push'](_0x149a9f['shift']());}catch(_0x326041){_0x149a9f['push'](_0x149a9f['shift']());}}}(a0_0x3888,0x9aca2));import{Tempo,enums}from'@magmacomputing/tempo/core';import{getTermRange}from'@magmacomputing/tempo/term';function a0_0x3888(){const _0x58acde=['vernal','second','South','4762355WLfjAR','11571IXGggh','astronomy','year','winter','Vernal','minute','650647ayaawg','Autumn','hour','919105ARxOLL','Solstice','toDateTime','days','month','Spring','summer','948GOHxtV','Autumnal','millisecond','sphere','extend','config','microsecond','444zdeuVt','key','day','Equinox','117YLJHFs','Winter','4372XuDIeV','3968732HcgAaK','autumnal','timeZoneId','190Xhhwwa','astro','push','Summer','map','UTC','trunc','129824xCYJTV','nanosecond','find'];a0_0x3888=function(){return _0x58acde;};return a0_0x3888();}import{definePremiumTerm}from'@magmacomputing/tempo/plugin';import{enumify}from'@magmacomputing/tempo/library';var ASTRO=enumify({'Vernal':a0_0x156bb5(0x1b2),'Summer':a0_0x156bb5(0x1c5),'Autumnal':a0_0x156bb5(0x1d5),'Winter':a0_0x156bb5(0x1b9)}),{COMPASS,SEASON,DURATIONS}=enums,key=a0_0x156bb5(0x1d8),scope='astronomy';function calculateAstroMoment(_0x4d3666,_0x3622ee,_0x5856f8){const _0x379401=a0_0x156bb5,_0x3196fc=(_0x4d3666-0x7d0)/0x3e8;let _0x2d4eeb;switch(_0x3622ee){case ASTRO[_0x379401(0x1ba)]:_0x2d4eeb=2451623.80984+365242.37404*_0x3196fc+0.05169*_0x3196fc*_0x3196fc;break;case ASTRO[_0x379401(0x1da)]:_0x2d4eeb=2451716.56767+365241.62603*_0x3196fc+0.00325*_0x3196fc*_0x3196fc;break;case ASTRO['Autumnal']:_0x2d4eeb=2451810.21715+365242.01767*_0x3196fc-0.11575*_0x3196fc*_0x3196fc;break;case ASTRO[_0x379401(0x1d2)]:_0x2d4eeb=2451900.05952+365242.74049*_0x3196fc-0.06223*_0x3196fc*_0x3196fc;break;}const _0x5a8425=Math[_0x379401(0x1dd)]((_0x2d4eeb-2440587.5)*DURATIONS[_0x379401(0x1c2)]);return new Tempo(_0x5a8425,{'timeZone':_0x5856f8,'timeStamp':'ms'});}function resolve(_0x4f1347,_0x4531d3){const _0x2da391=a0_0x156bb5,_0x577fb=_0x4f1347[_0x2da391(0x1cb)][_0x2da391(0x1c9)];if(!_0x577fb)return[];const _0xe4bb39=_0x4531d3?.['yy']??_0x4531d3?.[_0x2da391(0x1b8)]??_0x4f1347['yy'],_0x1c9714=_0x4531d3?.[_0x2da391(0x1d6)]??_0x4f1347['tz']??_0x2da391(0x1dc),_0x16c714=[],_0x1d49b2=_0x577fb===COMPASS[_0x2da391(0x1b4)]?{'vernal':_0x2da391(0x1c7),'summer':_0x2da391(0x1d2),'autumnal':_0x2da391(0x1ba),'winter':_0x2da391(0x1da)}:{'vernal':_0x2da391(0x1ba),'summer':_0x2da391(0x1da),'autumnal':_0x2da391(0x1c7),'winter':_0x2da391(0x1d2)},_0x5e9ce4=_0x577fb===COMPASS[_0x2da391(0x1b4)]?{'vernal':SEASON[_0x2da391(0x1bd)],'summer':SEASON['Winter'],'autumnal':SEASON[_0x2da391(0x1c4)],'winter':SEASON['Summer']}:{'vernal':SEASON['Spring'],'summer':SEASON[_0x2da391(0x1da)],'autumnal':SEASON[_0x2da391(0x1bd)],'winter':SEASON[_0x2da391(0x1d2)]};for(const _0x1f1c29 of[_0xe4bb39-0x1,_0xe4bb39,_0xe4bb39+0x1]){const _0x526520=(_0x1333e0,_0x411157)=>{const _0x383baf=_0x2da391,_0x545df8=calculateAstroMoment(_0x1333e0,_0x411157,_0x1c9714),_0x4c8ac6=_0x545df8['toDateTime']();return{'year':_0x4c8ac6[_0x383baf(0x1b8)],'month':_0x4c8ac6['month'],'day':_0x4c8ac6[_0x383baf(0x1cf)],'hour':_0x4c8ac6[_0x383baf(0x1be)],'minute':_0x4c8ac6['minute'],'second':_0x4c8ac6[_0x383baf(0x1b3)],'millisecond':_0x4c8ac6[_0x383baf(0x1c8)],'microsecond':_0x4c8ac6[_0x383baf(0x1cc)],'nanosecond':_0x4c8ac6[_0x383baf(0x1b0)]};};_0x16c714['push']({'key':_0x1d49b2[_0x2da391(0x1b2)],'season':_0x5e9ce4[_0x2da391(0x1b2)],'sphere':_0x577fb,..._0x526520(_0x1f1c29,ASTRO['Vernal']),'event':_0x2da391(0x1d0),'group':_0x2da391(0x1b7)}),_0x16c714[_0x2da391(0x1d9)]({'key':_0x1d49b2['summer'],'season':_0x5e9ce4['summer'],'sphere':_0x577fb,..._0x526520(_0x1f1c29,ASTRO[_0x2da391(0x1da)]),'event':'Solstice','group':'astronomy'}),_0x16c714[_0x2da391(0x1d9)]({'key':_0x1d49b2[_0x2da391(0x1d5)],'season':_0x5e9ce4[_0x2da391(0x1d5)],'sphere':_0x577fb,..._0x526520(_0x1f1c29,ASTRO[_0x2da391(0x1c7)]),'event':'Equinox','group':_0x2da391(0x1b7)}),_0x16c714[_0x2da391(0x1d9)]({'key':_0x1d49b2[_0x2da391(0x1b9)],'season':_0x5e9ce4[_0x2da391(0x1b9)],'sphere':_0x577fb,..._0x526520(_0x1f1c29,ASTRO[_0x2da391(0x1d2)]),'event':_0x2da391(0x1c0),'group':_0x2da391(0x1b7)});}return _0x16c714;}function resolveDateBoundary(_0x27c6ab,_0x5f3cb0){const _0x3f3bfe=a0_0x156bb5,_0x533b69=resolve(_0x27c6ab,_0x5f3cb0);return _0x533b69[_0x3f3bfe(0x1db)](_0x482d46=>({..._0x482d46,'hour':0x0,'minute':0x0,'second':0x0,'millisecond':0x0,'microsecond':0x0,'nanosecond':0x0}));}var AstroTerm=definePremiumTerm({'key':key,'scope':scope,'resolve'(_0x1f5504){return resolve(this,_0x1f5504);},'define'(_0x1f0da3,_0x3d5a10){const _0x58ddba=a0_0x156bb5,_0x59a978=resolve(this,_0x3d5a10),_0x2e7b72=resolveDateBoundary(this,_0x3d5a10),_0x4477f9=_0x3d5a10??this[_0x58ddba(0x1c1)]();if(_0x1f0da3===!![]||_0x1f0da3===void 0x0){const _0x482ccf=getTermRange(this,_0x2e7b72,!![],_0x3d5a10);return _0x482ccf;}const _0x4fe544=getTermRange(this,_0x59a978,![],_0x3d5a10);if(!_0x4fe544)return _0x4fe544;const _0x255220=getTermRange(this,_0x2e7b72,![],_0x3d5a10);if(!_0x255220)return _0x4fe544;const _0x5424e4=_0x59a978[_0x58ddba(0x1b1)](_0x5b5172=>_0x5b5172[_0x58ddba(0x1ce)]===_0x255220[_0x58ddba(0x1ce)]&&_0x5b5172[_0x58ddba(0x1b8)]===_0x255220[_0x58ddba(0x1b8)]&&_0x5b5172[_0x58ddba(0x1c3)]===_0x255220[_0x58ddba(0x1c3)]&&_0x5b5172[_0x58ddba(0x1cf)]===_0x255220['day']);if(!_0x5424e4)return{..._0x255220,'strict':_0x4fe544['key']};const _0x119779=_0x4477f9['with']({'year':_0x5424e4[_0x58ddba(0x1b8)],'month':_0x5424e4[_0x58ddba(0x1c3)],'day':_0x5424e4['day'],'hour':_0x5424e4[_0x58ddba(0x1be)]??0x0,'minute':_0x5424e4[_0x58ddba(0x1bb)]??0x0,'second':_0x5424e4[_0x58ddba(0x1b3)]??0x0,'millisecond':_0x5424e4[_0x58ddba(0x1c8)]??0x0,'microsecond':_0x5424e4[_0x58ddba(0x1cc)]??0x0,'nanosecond':_0x5424e4['nanosecond']??0x0})['add']({'minutes':0x1}),_0x50b299=getTermRange(this,_0x59a978,![],_0x119779);if(!_0x50b299)return{..._0x255220,'strict':_0x4fe544[_0x58ddba(0x1ce)]};return{..._0x50b299,'strict':_0x4fe544['key']};}});Tempo[a0_0x156bb5(0x1ca)](AstroTerm);function a0_0x5924(_0x1ec4c8,_0xf7a27d){_0x1ec4c8=_0x1ec4c8-0x1b0;const _0x388883=a0_0x3888();let _0x5924b7=_0x388883[_0x1ec4c8];return _0x5924b7;}export{AstroTerm};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmacomputing/tempo-plugin-astro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Tempo plugin that calculates precise astronomical seasons (solstices & equinoxes) using the Jean Meeus algorithm — hemisphere-aware, sub-minute accuracy",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|