@jjlmoya/utils-astronomy 1.11.0 → 1.12.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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-astronomy",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
7
7
  "exports": {
8
8
  ".": "./src/index.ts",
9
- "./data": "./src/data.ts"
9
+ "./data": "./src/data.ts",
10
+ "./entries": "./src/entries.ts"
10
11
  },
11
12
  "files": [
12
13
  "src"
@@ -1,8 +1,8 @@
1
1
  import type { AstronomyCategoryEntry } from '../types';
2
- import { bortleVisualizer } from '../tool/bortleVisualizer';
3
- import { deepSpaceScope } from '../tool/deepSpaceScope';
4
- import { starExposureCalculator } from '../tool/starExposureCalculator';
5
- import { telescopeResolution } from '../tool/telescopeResolution';
2
+ import { bortleVisualizer } from '../tool/bortleVisualizer/entry';
3
+ import { deepSpaceScope } from '../tool/deepSpaceScope/entry';
4
+ import { starExposureCalculator } from '../tool/starExposureCalculator/entry';
5
+ import { telescopeResolution } from '../tool/telescopeResolution/entry';
6
6
 
7
7
  export const toolsCategory: AstronomyCategoryEntry = {
8
8
  icon: 'mdi:telescope',
package/src/entries.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { bortleVisualizer } from './tool/bortleVisualizer/entry';
2
+ export type { BortleVisualizerUI, BortleLevel, BortleVisualizerLocaleContent } from './tool/bortleVisualizer/entry';
3
+ export { deepSpaceScope } from './tool/deepSpaceScope/entry';
4
+ export type { DeepSpaceObject, DeepSpaceScopeUI, DeepSpaceScopeLocaleContent } from './tool/deepSpaceScope/entry';
5
+ export { starExposureCalculator } from './tool/starExposureCalculator/entry';
6
+ export type { StarExposureCalculatorUI, StarExposureCalculatorLocaleContent } from './tool/starExposureCalculator/entry';
7
+ export { telescopeResolution } from './tool/telescopeResolution/entry';
8
+ export type { TelescopeResolutionUI, TelescopeResolutionLocaleContent } from './tool/telescopeResolution/entry';
9
+ export { toolsCategory, astronomyCategory } from './category';
10
+ import { bortleVisualizer } from './tool/bortleVisualizer/entry';
11
+ import { deepSpaceScope } from './tool/deepSpaceScope/entry';
12
+ import { starExposureCalculator } from './tool/starExposureCalculator/entry';
13
+ import { telescopeResolution } from './tool/telescopeResolution/entry';
14
+ export const ALL_ENTRIES = [bortleVisualizer, deepSpaceScope, starExposureCalculator, telescopeResolution];
@@ -0,0 +1,53 @@
1
+ import type { AstronomyToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface BortleVisualizerUI {
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ [key: string]: any;
6
+ toolTitle: string;
7
+ sliderLabel: string;
8
+ classLabel: string;
9
+ nelmLabel: string;
10
+ sqmLabel: string;
11
+ classPrefix: string;
12
+ bortleData: Record<number, BortleLevel>;
13
+ }
14
+
15
+ export interface BortleLevel {
16
+ title: string;
17
+ description: string;
18
+ nelm: number;
19
+ sqm: string;
20
+ starsVisible: boolean;
21
+ milkyWayVisible: boolean;
22
+ cloudsLit: boolean;
23
+ skyBrightness: number;
24
+ }
25
+
26
+ export interface BortleVisualizerLocaleContent extends ToolLocaleContent<BortleVisualizerUI> {
27
+ bortleData: Record<number, BortleLevel>;
28
+ }
29
+
30
+ export const bortleVisualizer: AstronomyToolEntry<BortleVisualizerUI> = {
31
+ id: 'bortle-visualizer',
32
+ icons: {
33
+ bg: 'mdi:weather-night',
34
+ fg: 'mdi:telescope',
35
+ },
36
+ i18n: {
37
+ de: () => import('./i18n/de').then((m) => m.content),
38
+ en: () => import('./i18n/en').then((m) => m.content),
39
+ es: () => import('./i18n/es').then((m) => m.content),
40
+ fr: () => import('./i18n/fr').then((m) => m.content),
41
+ id: () => import('./i18n/id').then((m) => m.content),
42
+ it: () => import('./i18n/it').then((m) => m.content),
43
+ ja: () => import('./i18n/ja').then((m) => m.content),
44
+ ko: () => import('./i18n/ko').then((m) => m.content),
45
+ nl: () => import('./i18n/nl').then((m) => m.content),
46
+ pl: () => import('./i18n/pl').then((m) => m.content),
47
+ pt: () => import('./i18n/pt').then((m) => m.content),
48
+ ru: () => import('./i18n/ru').then((m) => m.content),
49
+ sv: () => import('./i18n/sv').then((m) => m.content),
50
+ tr: () => import('./i18n/tr').then((m) => m.content),
51
+ zh: () => import('./i18n/zh').then((m) => m.content),
52
+ },
53
+ };
@@ -1,58 +1,5 @@
1
- import type { AstronomyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface BortleVisualizerUI {
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
- [key: string]: any;
6
- toolTitle: string;
7
- sliderLabel: string;
8
- classLabel: string;
9
- nelmLabel: string;
10
- sqmLabel: string;
11
- classPrefix: string;
12
- bortleData: Record<number, BortleLevel>;
13
- }
14
-
15
- export interface BortleLevel {
16
- title: string;
17
- description: string;
18
- nelm: number;
19
- sqm: string;
20
- starsVisible: boolean;
21
- milkyWayVisible: boolean;
22
- cloudsLit: boolean;
23
- skyBrightness: number;
24
- }
25
-
26
- export interface BortleVisualizerLocaleContent extends ToolLocaleContent<BortleVisualizerUI> {
27
- bortleData: Record<number, BortleLevel>;
28
- }
29
-
30
- export const bortleVisualizer: AstronomyToolEntry<BortleVisualizerUI> = {
31
- id: 'bortle-visualizer',
32
- icons: {
33
- bg: 'mdi:weather-night',
34
- fg: 'mdi:telescope',
35
- },
36
- i18n: {
37
- de: () => import('./i18n/de').then((m) => m.content),
38
- en: () => import('./i18n/en').then((m) => m.content),
39
- es: () => import('./i18n/es').then((m) => m.content),
40
- fr: () => import('./i18n/fr').then((m) => m.content),
41
- id: () => import('./i18n/id').then((m) => m.content),
42
- it: () => import('./i18n/it').then((m) => m.content),
43
- ja: () => import('./i18n/ja').then((m) => m.content),
44
- ko: () => import('./i18n/ko').then((m) => m.content),
45
- nl: () => import('./i18n/nl').then((m) => m.content),
46
- pl: () => import('./i18n/pl').then((m) => m.content),
47
- pt: () => import('./i18n/pt').then((m) => m.content),
48
- ru: () => import('./i18n/ru').then((m) => m.content),
49
- sv: () => import('./i18n/sv').then((m) => m.content),
50
- tr: () => import('./i18n/tr').then((m) => m.content),
51
- zh: () => import('./i18n/zh').then((m) => m.content),
52
- },
53
- };
54
-
55
-
1
+ import { bortleVisualizer } from './entry';
2
+ export * from './entry';
56
3
  export const BORTLE_VISUALIZER_TOOL: ToolDefinition = {
57
4
  entry: bortleVisualizer,
58
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,60 @@
1
+ import type { AstronomyToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface DeepSpaceObject {
4
+ name: string;
5
+ type: string;
6
+ mag: number;
7
+ az: number;
8
+ alt: number;
9
+ color: string;
10
+ icon: string;
11
+ }
12
+
13
+ export interface DeepSpaceScopeUI {
14
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
+ [key: string]: any;
16
+ toolTitle: string;
17
+ apertureLabel: string;
18
+ bortleLabel: string;
19
+ limitMagLabel: string;
20
+ azimuthLabel: string;
21
+ dragHint: string;
22
+ dragHintMobile: string;
23
+ planetLabel: string;
24
+ starLabel: string;
25
+ deepSpaceLabel: string;
26
+ magnitudeLabel: string;
27
+ coordinatesLabel: string;
28
+ closeLabel: string;
29
+ altitudeLabel: string;
30
+ defaultObjDesc: string;
31
+ bortleClassPrefix: string;
32
+ deepSpaceObjects: DeepSpaceObject[];
33
+ }
34
+
35
+ export type DeepSpaceScopeLocaleContent = ToolLocaleContent<DeepSpaceScopeUI>;
36
+
37
+ export const deepSpaceScope: AstronomyToolEntry<DeepSpaceScopeUI> = {
38
+ id: 'deep-space-scope',
39
+ icons: {
40
+ bg: 'mdi:telescope',
41
+ fg: 'mdi:eye',
42
+ },
43
+ i18n: {
44
+ de: () => import('./i18n/de').then((m) => m.content),
45
+ en: () => import('./i18n/en').then((m) => m.content),
46
+ es: () => import('./i18n/es').then((m) => m.content),
47
+ fr: () => import('./i18n/fr').then((m) => m.content),
48
+ id: () => import('./i18n/id').then((m) => m.content),
49
+ it: () => import('./i18n/it').then((m) => m.content),
50
+ ja: () => import('./i18n/ja').then((m) => m.content),
51
+ ko: () => import('./i18n/ko').then((m) => m.content),
52
+ nl: () => import('./i18n/nl').then((m) => m.content),
53
+ pl: () => import('./i18n/pl').then((m) => m.content),
54
+ pt: () => import('./i18n/pt').then((m) => m.content),
55
+ ru: () => import('./i18n/ru').then((m) => m.content),
56
+ sv: () => import('./i18n/sv').then((m) => m.content),
57
+ tr: () => import('./i18n/tr').then((m) => m.content),
58
+ zh: () => import('./i18n/zh').then((m) => m.content),
59
+ },
60
+ };
@@ -1,65 +1,5 @@
1
- import type { AstronomyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface DeepSpaceObject {
4
- name: string;
5
- type: string;
6
- mag: number;
7
- az: number;
8
- alt: number;
9
- color: string;
10
- icon: string;
11
- }
12
-
13
- export interface DeepSpaceScopeUI {
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- [key: string]: any;
16
- toolTitle: string;
17
- apertureLabel: string;
18
- bortleLabel: string;
19
- limitMagLabel: string;
20
- azimuthLabel: string;
21
- dragHint: string;
22
- dragHintMobile: string;
23
- planetLabel: string;
24
- starLabel: string;
25
- deepSpaceLabel: string;
26
- magnitudeLabel: string;
27
- coordinatesLabel: string;
28
- closeLabel: string;
29
- altitudeLabel: string;
30
- defaultObjDesc: string;
31
- bortleClassPrefix: string;
32
- deepSpaceObjects: DeepSpaceObject[];
33
- }
34
-
35
- export type DeepSpaceScopeLocaleContent = ToolLocaleContent<DeepSpaceScopeUI>;
36
-
37
- export const deepSpaceScope: AstronomyToolEntry<DeepSpaceScopeUI> = {
38
- id: 'deep-space-scope',
39
- icons: {
40
- bg: 'mdi:telescope',
41
- fg: 'mdi:eye',
42
- },
43
- i18n: {
44
- de: () => import('./i18n/de').then((m) => m.content),
45
- en: () => import('./i18n/en').then((m) => m.content),
46
- es: () => import('./i18n/es').then((m) => m.content),
47
- fr: () => import('./i18n/fr').then((m) => m.content),
48
- id: () => import('./i18n/id').then((m) => m.content),
49
- it: () => import('./i18n/it').then((m) => m.content),
50
- ja: () => import('./i18n/ja').then((m) => m.content),
51
- ko: () => import('./i18n/ko').then((m) => m.content),
52
- nl: () => import('./i18n/nl').then((m) => m.content),
53
- pl: () => import('./i18n/pl').then((m) => m.content),
54
- pt: () => import('./i18n/pt').then((m) => m.content),
55
- ru: () => import('./i18n/ru').then((m) => m.content),
56
- sv: () => import('./i18n/sv').then((m) => m.content),
57
- tr: () => import('./i18n/tr').then((m) => m.content),
58
- zh: () => import('./i18n/zh').then((m) => m.content),
59
- },
60
- };
61
-
62
-
1
+ import { deepSpaceScope } from './entry';
2
+ export * from './entry';
63
3
  export const DEEP_SPACE_SCOPE_TOOL: ToolDefinition = {
64
4
  entry: deepSpaceScope,
65
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,49 @@
1
+ import type { AstronomyToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface StarExposureCalculatorUI {
4
+ [key: string]: string;
5
+ toolTitle: string;
6
+ modeLabel: string;
7
+ classicMode: string;
8
+ npfMode: string;
9
+ sensorLabel: string;
10
+ focalLabel: string;
11
+ apertureLabel: string;
12
+ megapixelsLabel: string;
13
+ declinationLabel: string;
14
+ equatorLabel: string;
15
+ poleLabel: string;
16
+ secondsUnit: string;
17
+ resultText: string;
18
+ simLabel: string;
19
+ simRangeLabel: string;
20
+ pointStars: string;
21
+ trailStars: string;
22
+ }
23
+
24
+ export type StarExposureCalculatorLocaleContent = ToolLocaleContent<StarExposureCalculatorUI>;
25
+
26
+ export const starExposureCalculator: AstronomyToolEntry<StarExposureCalculatorUI> = {
27
+ id: 'star-exposure-calculator',
28
+ icons: {
29
+ bg: 'mdi:star-shooting',
30
+ fg: 'mdi:timer-sand',
31
+ },
32
+ i18n: {
33
+ de: () => import('./i18n/de').then((m) => m.content),
34
+ en: () => import('./i18n/en').then((m) => m.content),
35
+ es: () => import('./i18n/es').then((m) => m.content),
36
+ fr: () => import('./i18n/fr').then((m) => m.content),
37
+ id: () => import('./i18n/id').then((m) => m.content),
38
+ it: () => import('./i18n/it').then((m) => m.content),
39
+ ja: () => import('./i18n/ja').then((m) => m.content),
40
+ ko: () => import('./i18n/ko').then((m) => m.content),
41
+ nl: () => import('./i18n/nl').then((m) => m.content),
42
+ pl: () => import('./i18n/pl').then((m) => m.content),
43
+ pt: () => import('./i18n/pt').then((m) => m.content),
44
+ ru: () => import('./i18n/ru').then((m) => m.content),
45
+ sv: () => import('./i18n/sv').then((m) => m.content),
46
+ tr: () => import('./i18n/tr').then((m) => m.content),
47
+ zh: () => import('./i18n/zh').then((m) => m.content),
48
+ },
49
+ };
@@ -1,54 +1,5 @@
1
- import type { AstronomyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface StarExposureCalculatorUI {
4
- [key: string]: string;
5
- toolTitle: string;
6
- modeLabel: string;
7
- classicMode: string;
8
- npfMode: string;
9
- sensorLabel: string;
10
- focalLabel: string;
11
- apertureLabel: string;
12
- megapixelsLabel: string;
13
- declinationLabel: string;
14
- equatorLabel: string;
15
- poleLabel: string;
16
- secondsUnit: string;
17
- resultText: string;
18
- simLabel: string;
19
- simRangeLabel: string;
20
- pointStars: string;
21
- trailStars: string;
22
- }
23
-
24
- export type StarExposureCalculatorLocaleContent = ToolLocaleContent<StarExposureCalculatorUI>;
25
-
26
- export const starExposureCalculator: AstronomyToolEntry<StarExposureCalculatorUI> = {
27
- id: 'star-exposure-calculator',
28
- icons: {
29
- bg: 'mdi:star-shooting',
30
- fg: 'mdi:timer-sand',
31
- },
32
- i18n: {
33
- de: () => import('./i18n/de').then((m) => m.content),
34
- en: () => import('./i18n/en').then((m) => m.content),
35
- es: () => import('./i18n/es').then((m) => m.content),
36
- fr: () => import('./i18n/fr').then((m) => m.content),
37
- id: () => import('./i18n/id').then((m) => m.content),
38
- it: () => import('./i18n/it').then((m) => m.content),
39
- ja: () => import('./i18n/ja').then((m) => m.content),
40
- ko: () => import('./i18n/ko').then((m) => m.content),
41
- nl: () => import('./i18n/nl').then((m) => m.content),
42
- pl: () => import('./i18n/pl').then((m) => m.content),
43
- pt: () => import('./i18n/pt').then((m) => m.content),
44
- ru: () => import('./i18n/ru').then((m) => m.content),
45
- sv: () => import('./i18n/sv').then((m) => m.content),
46
- tr: () => import('./i18n/tr').then((m) => m.content),
47
- zh: () => import('./i18n/zh').then((m) => m.content),
48
- },
49
- };
50
-
51
-
1
+ import { starExposureCalculator } from './entry';
2
+ export * from './entry';
52
3
  export const STAR_EXPOSURE_CALCULATOR_TOOL: ToolDefinition = {
53
4
  entry: starExposureCalculator,
54
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,49 @@
1
+ import type { AstronomyToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface TelescopeResolutionUI {
4
+ [key: string]: string | Array<{ value: string; label: string }>;
5
+ toolTitle: string;
6
+ apertureLabel: string;
7
+ unitLabel: string;
8
+ mmUnit: string;
9
+ inUnit: string;
10
+ presetsLabel: string;
11
+ presetsPlaceholder: string;
12
+ seeingLabel: string;
13
+ dawesLabel: string;
14
+ arcsecUnit: string;
15
+ rayleighLabel: string;
16
+ maxMagLabel: string;
17
+ seeingAlertPrefix: string;
18
+ seeingAlertSuffix: string;
19
+ simLabel: string;
20
+ simExplanation: string;
21
+ presets: Array<{ value: string; label: string }>;
22
+ }
23
+
24
+ export type TelescopeResolutionLocaleContent = ToolLocaleContent<TelescopeResolutionUI>;
25
+
26
+ export const telescopeResolution: AstronomyToolEntry<TelescopeResolutionUI> = {
27
+ id: 'telescope-resolution',
28
+ icons: {
29
+ bg: 'mdi:telescope',
30
+ fg: 'mdi:flare',
31
+ },
32
+ i18n: {
33
+ de: () => import('./i18n/de').then((m) => m.content),
34
+ en: () => import('./i18n/en').then((m) => m.content),
35
+ es: () => import('./i18n/es').then((m) => m.content),
36
+ fr: () => import('./i18n/fr').then((m) => m.content),
37
+ id: () => import('./i18n/id').then((m) => m.content),
38
+ it: () => import('./i18n/it').then((m) => m.content),
39
+ ja: () => import('./i18n/ja').then((m) => m.content),
40
+ ko: () => import('./i18n/ko').then((m) => m.content),
41
+ nl: () => import('./i18n/nl').then((m) => m.content),
42
+ pl: () => import('./i18n/pl').then((m) => m.content),
43
+ pt: () => import('./i18n/pt').then((m) => m.content),
44
+ ru: () => import('./i18n/ru').then((m) => m.content),
45
+ sv: () => import('./i18n/sv').then((m) => m.content),
46
+ tr: () => import('./i18n/tr').then((m) => m.content),
47
+ zh: () => import('./i18n/zh').then((m) => m.content),
48
+ },
49
+ };
@@ -1,54 +1,5 @@
1
- import type { AstronomyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface TelescopeResolutionUI {
4
- [key: string]: string | Array<{ value: string; label: string }>;
5
- toolTitle: string;
6
- apertureLabel: string;
7
- unitLabel: string;
8
- mmUnit: string;
9
- inUnit: string;
10
- presetsLabel: string;
11
- presetsPlaceholder: string;
12
- seeingLabel: string;
13
- dawesLabel: string;
14
- arcsecUnit: string;
15
- rayleighLabel: string;
16
- maxMagLabel: string;
17
- seeingAlertPrefix: string;
18
- seeingAlertSuffix: string;
19
- simLabel: string;
20
- simExplanation: string;
21
- presets: Array<{ value: string; label: string }>;
22
- }
23
-
24
- export type TelescopeResolutionLocaleContent = ToolLocaleContent<TelescopeResolutionUI>;
25
-
26
- export const telescopeResolution: AstronomyToolEntry<TelescopeResolutionUI> = {
27
- id: 'telescope-resolution',
28
- icons: {
29
- bg: 'mdi:telescope',
30
- fg: 'mdi:flare',
31
- },
32
- i18n: {
33
- de: () => import('./i18n/de').then((m) => m.content),
34
- en: () => import('./i18n/en').then((m) => m.content),
35
- es: () => import('./i18n/es').then((m) => m.content),
36
- fr: () => import('./i18n/fr').then((m) => m.content),
37
- id: () => import('./i18n/id').then((m) => m.content),
38
- it: () => import('./i18n/it').then((m) => m.content),
39
- ja: () => import('./i18n/ja').then((m) => m.content),
40
- ko: () => import('./i18n/ko').then((m) => m.content),
41
- nl: () => import('./i18n/nl').then((m) => m.content),
42
- pl: () => import('./i18n/pl').then((m) => m.content),
43
- pt: () => import('./i18n/pt').then((m) => m.content),
44
- ru: () => import('./i18n/ru').then((m) => m.content),
45
- sv: () => import('./i18n/sv').then((m) => m.content),
46
- tr: () => import('./i18n/tr').then((m) => m.content),
47
- zh: () => import('./i18n/zh').then((m) => m.content),
48
- },
49
- };
50
-
51
-
1
+ import { telescopeResolution } from './entry';
2
+ export * from './entry';
52
3
  export const TELESCOPE_RESOLUTION_TOOL: ToolDefinition = {
53
4
  entry: telescopeResolution,
54
5
  Component: () => import('./component.astro'),
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import { BORTLE_VISUALIZER_TOOL } from './tool/bortleVisualizer';
2
3
  import { DEEP_SPACE_SCOPE_TOOL } from './tool/deepSpaceScope';
3
4
  import { STAR_EXPOSURE_CALCULATOR_TOOL } from './tool/starExposureCalculator';
@@ -18,4 +19,3 @@ export {
18
19
  TELESCOPE_RESOLUTION_TOOL,
19
20
  };
20
21
 
21
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);