@jjlmoya/utils-astronomy 1.28.0 → 1.34.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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +29 -29
  3. package/src/entries.ts +5 -1
  4. package/src/index.ts +1 -0
  5. package/src/tests/locale_completeness.test.ts +2 -2
  6. package/src/tests/tool_validation.test.ts +144 -143
  7. package/src/tool/meteorShowerObservingPlanner/bibliography.astro +14 -0
  8. package/src/tool/meteorShowerObservingPlanner/bibliography.ts +12 -0
  9. package/src/tool/meteorShowerObservingPlanner/component.astro +165 -0
  10. package/src/tool/meteorShowerObservingPlanner/controller.ts +178 -0
  11. package/src/tool/meteorShowerObservingPlanner/dom-views.ts +187 -0
  12. package/src/tool/meteorShowerObservingPlanner/entry.ts +29 -0
  13. package/src/tool/meteorShowerObservingPlanner/evaluator.ts +20 -0
  14. package/src/tool/meteorShowerObservingPlanner/i18n/de.ts +219 -0
  15. package/src/tool/meteorShowerObservingPlanner/i18n/en.ts +219 -0
  16. package/src/tool/meteorShowerObservingPlanner/i18n/es.ts +219 -0
  17. package/src/tool/meteorShowerObservingPlanner/i18n/fr.ts +219 -0
  18. package/src/tool/meteorShowerObservingPlanner/i18n/id.ts +223 -0
  19. package/src/tool/meteorShowerObservingPlanner/i18n/it.ts +223 -0
  20. package/src/tool/meteorShowerObservingPlanner/i18n/ja.ts +219 -0
  21. package/src/tool/meteorShowerObservingPlanner/i18n/ko.ts +219 -0
  22. package/src/tool/meteorShowerObservingPlanner/i18n/nl.ts +223 -0
  23. package/src/tool/meteorShowerObservingPlanner/i18n/pl.ts +223 -0
  24. package/src/tool/meteorShowerObservingPlanner/i18n/pt.ts +223 -0
  25. package/src/tool/meteorShowerObservingPlanner/i18n/ru.ts +219 -0
  26. package/src/tool/meteorShowerObservingPlanner/i18n/sv.ts +223 -0
  27. package/src/tool/meteorShowerObservingPlanner/i18n/tr.ts +223 -0
  28. package/src/tool/meteorShowerObservingPlanner/i18n/zh.ts +219 -0
  29. package/src/tool/meteorShowerObservingPlanner/index.ts +11 -0
  30. package/src/tool/meteorShowerObservingPlanner/logic.test.ts +117 -0
  31. package/src/tool/meteorShowerObservingPlanner/logic.ts +263 -0
  32. package/src/tool/meteorShowerObservingPlanner/meteor-shower-observing-planner.css +404 -0
  33. package/src/tool/meteorShowerObservingPlanner/seo.astro +14 -0
  34. package/src/tool/meteorShowerObservingPlanner/storage.ts +41 -0
  35. package/src/tool/meteorShowerObservingPlanner/ui.ts +87 -0
  36. package/src/tool/starExposureCalculator/index.ts +3 -0
  37. package/src/tool/telescopeResolution/index.ts +3 -0
  38. package/src/tools.ts +4 -0
@@ -0,0 +1,87 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export interface ShowerPreset {
4
+ id: string;
5
+ name: string;
6
+ peakMonth: number;
7
+ peakDay: number;
8
+ zhr: number;
9
+ radiantConstellation: string;
10
+ velocityKms: number;
11
+ parentBody: string;
12
+ }
13
+
14
+ export interface ObservingPlannerInput {
15
+ showerId: string;
16
+ customZhr: number;
17
+ latitude: number;
18
+ bortleClass: number;
19
+ moonPhase: number;
20
+ sessionStartHour: number;
21
+ sessionEndHour: number;
22
+ }
23
+
24
+ export interface HourlyCalculation {
25
+ hour: number;
26
+ formattedTime: string;
27
+ radiantElevationDeg: number;
28
+ effectiveZhr: number;
29
+ qualityScore: number;
30
+ moonInterferencePercent: number;
31
+ isPeakHour: boolean;
32
+ }
33
+
34
+ export interface EvaluationResult {
35
+ overallScore: number;
36
+ bestWindowStart: string;
37
+ bestWindowEnd: string;
38
+ maxEffectiveRate: number;
39
+ skyDarknessRating: string;
40
+ moonImpactRating: string;
41
+ badges: Array<{
42
+ label: string;
43
+ type: 'success' | 'warning' | 'info' | 'error';
44
+ }>;
45
+ hourlyBreakdown: HourlyCalculation[];
46
+ }
47
+
48
+ export interface MeteorShowerObservingPlannerUI {
49
+ [key: string]: unknown;
50
+ title: string;
51
+ subtitle: string;
52
+ presetLabel: string;
53
+ customZhrLabel: string;
54
+ latitudeLabel: string;
55
+ bortleLabel: string;
56
+ moonPhaseLabel: string;
57
+ sessionHoursLabel: string;
58
+ toLabel: string;
59
+ classLabel: string;
60
+ radiantTelemetryLabel: string;
61
+ belowHorizonLabel: string;
62
+ altLabel: string;
63
+ hrUnit: string;
64
+ presets: Record<string, string>;
65
+ bortleDescriptions: Record<number, string>;
66
+ moonPhaseNames: Record<string, string>;
67
+ badgeLabels: Record<string, string>;
68
+ resultsTitle: string;
69
+ bestWindowLabel: string;
70
+ maxRateLabel: string;
71
+ skyQualityLabel: string;
72
+ hourlyChartTitle: string;
73
+ checklistTitle: string;
74
+ checklistItems: string[];
75
+ }
76
+
77
+ export interface MeteorShowerObservingPlannerLocaleContent {
78
+ slug: string;
79
+ title: string;
80
+ description: string;
81
+ ui: MeteorShowerObservingPlannerUI;
82
+ seo: unknown[];
83
+ faq: Array<{ question: string; answer: string }>;
84
+ howTo: Array<{ name: string; text: string }>;
85
+ bibliography: BibliographyEntry[];
86
+ schemas: unknown[];
87
+ }
@@ -1,5 +1,8 @@
1
1
  import { starExposureCalculator } from './entry';
2
+ import type { ToolDefinition } from '../../types';
3
+
2
4
  export * from './entry';
5
+
3
6
  export const STAR_EXPOSURE_CALCULATOR_TOOL: ToolDefinition = {
4
7
  entry: starExposureCalculator,
5
8
  Component: () => import('./component.astro'),
@@ -1,5 +1,8 @@
1
1
  import { telescopeResolution } from './entry';
2
+ import type { ToolDefinition } from '../../types';
3
+
2
4
  export * from './entry';
5
+
3
6
  export const TELESCOPE_RESOLUTION_TOOL: ToolDefinition = {
4
7
  entry: telescopeResolution,
5
8
  Component: () => import('./component.astro'),
package/src/tools.ts CHANGED
@@ -5,6 +5,7 @@ import { STAR_EXPOSURE_CALCULATOR_TOOL } from './tool/starExposureCalculator';
5
5
  import { TELESCOPE_RESOLUTION_TOOL } from './tool/telescopeResolution';
6
6
  import { EYEPIECE_CALCULATOR_TOOL } from './tool/smartEyepieceCalculator';
7
7
  import { TELESCOPE_EXIT_PUPIL_PLANNER_TOOL } from './tool/telescopeExitPupilPlanner';
8
+ import { METEOR_SHOWER_OBSERVING_PLANNER_TOOL } from './tool/meteorShowerObservingPlanner';
8
9
  import type { ToolDefinition } from './types';
9
10
 
10
11
  export const ALL_TOOLS: ToolDefinition[] = [
@@ -14,6 +15,7 @@ export const ALL_TOOLS: ToolDefinition[] = [
14
15
  TELESCOPE_RESOLUTION_TOOL,
15
16
  EYEPIECE_CALCULATOR_TOOL,
16
17
  TELESCOPE_EXIT_PUPIL_PLANNER_TOOL,
18
+ METEOR_SHOWER_OBSERVING_PLANNER_TOOL,
17
19
  ];
18
20
 
19
21
  export {
@@ -23,4 +25,6 @@ export {
23
25
  TELESCOPE_RESOLUTION_TOOL,
24
26
  EYEPIECE_CALCULATOR_TOOL,
25
27
  TELESCOPE_EXIT_PUPIL_PLANNER_TOOL,
28
+ METEOR_SHOWER_OBSERVING_PLANNER_TOOL,
26
29
  };
30
+