@interstellar-tools/constants 0.1.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.
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # @interstellar-tools/constants
2
+
3
+ ## Installation
4
+
5
+ - [Node.js](https://nodejs.org/) version 22.9.0 or higher
6
+ - npm version 11.5.1 or higher
7
+
8
+ ::: code-group
9
+
10
+ ```shell [npm]
11
+ npm i --save @interstellar-tools/constants
12
+ ```
13
+
14
+ ```shell [yarn]
15
+ yarn add @interstellar-tools/constants
16
+ ```
17
+
18
+ :::
package/dist/date.d.ts ADDED
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Time-scale tags used in this package.
3
+ *
4
+ * ::: info
5
+ *
6
+ * Astronomy formulas are defined in specific time scales (most commonly **TT**).
7
+ * JavaScript `Date` represents **UTC** only. Keep these symbols explicit to avoid ambiguity.
8
+ *
9
+ * :::
10
+ *
11
+ * @category Date
12
+ */
13
+ export declare const TIME_SCALE_UTC: "UTC";
14
+ /**
15
+ * @category Date
16
+ */
17
+ export declare const TIME_SCALE_TT: "TT";
18
+ /**
19
+ * **J2000 epoch as a UTC timestamp** for JavaScript usage.
20
+ *
21
+ * J2000 is *defined* as **JD 2451545.0 (TT)**, i.e. 2000-01-01 12:00:00 **TT**.
22
+ * At that epoch **TT − UTC = 64.184 s**, so the corresponding UTC instant is:
23
+ * **2000-01-01T11:58:55.816Z**.
24
+ *
25
+ * @example
26
+ * // Milliseconds from UTC midnight to J2000 (UTC):
27
+ * const deltaMs = +J2000_UTC - +EPOCH_2000_UTC_MIDNIGHT; // 43_135_816 ms
28
+ *
29
+ * // If you need the TT-based Julian centuries since J2000:
30
+ * // T = (JD_TT - J2000_TT) / 36525
31
+ * // Compute JD_TT from a UTC Date using your UTC→TT→JD pipeline, then use J2000_TT.
32
+ * @category Date
33
+ */
34
+ export declare const J2000_UTC: Date;
35
+ /**
36
+ * Time scale associated with {@link J2000_UTC}.
37
+ * @category Date
38
+ */
39
+ export declare const J2000_UTC_TIME_SCALE: "UTC";
40
+ /**
41
+ * **UTC midnight at the start of 2000-01-01** (convenient calendar anchor).
42
+ *
43
+ * ::: warning
44
+ *
45
+ * This is **not** the J2000 epoch itself (which occurs 11:58:55.816 later in UTC).
46
+ *
47
+ * :::
48
+ *
49
+ * @category Date
50
+ */
51
+ export declare const EPOCH_2000_UTC_MIDNIGHT: Date;
52
+ /**
53
+ * Time scale associated with {@link EPOCH_2000_UTC_MIDNIGHT}.
54
+ * @category Date
55
+ */
56
+ export declare const EPOCH_2000_UTC_MIDNIGHT_TIME_SCALE: "UTC";
57
+ /**
58
+ * **J2000 epoch as a Julian Date in the TT time scale.**
59
+ *
60
+ * Defined as **JD 2451545.0 (TT)**, corresponding to 2000-01-01 12:00:00 **TT**.
61
+ *
62
+ * @example
63
+ * // Julian centuries since J2000 in TT:
64
+ * // const T = (jdTT - J2000_TT) / 36525;
65
+ * @category Date
66
+ */
67
+ export declare const J2000_TT: 2451545;
68
+ /**
69
+ * The **defining** time scale for the J2000 epoch.
70
+ * J2000 is conventionally specified in **Terrestrial Time** (TT).
71
+ *
72
+ * @example
73
+ * // When computing Julian centuries:
74
+ * // T = (JD_TT - J2000_TT) / 36525
75
+ * @category Date
76
+ */
77
+ export declare const J2000_EPOCH_TIME_SCALE: "TT";
78
+ /**
79
+ * Useful offset at the J2000 epoch (for UTC↔TT conversions near that instant).
80
+ *
81
+ * - TT − UTC = **64.184 s** at 2000-01-01
82
+ * - Provided in both seconds and milliseconds for convenience.
83
+ *
84
+ * ::: info
85
+ *
86
+ * UTC–TT offset changes when leap seconds are introduced; this constant is
87
+ * specific to the J2000 epoch.
88
+ *
89
+ * :::
90
+ * @category Date
91
+ */
92
+ export declare const TT_MINUS_UTC_AT_J2000_SECONDS = 64.184;
93
+ /**
94
+ * @category Date
95
+ */
96
+ export declare const TT_MINUS_UTC_AT_J2000_MS = 64184;
97
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../src/date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAG,KAAc,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAG,IAAa,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,MAAuC,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAiB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,MAAmC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,kCAAkC,OAAiB,CAAC;AAEjE;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,EAAG,OAAkB,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,MAAgB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,6BAA6B,SAAS,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAC"}
package/dist/date.js ADDED
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Time-scale tags used in this package.
3
+ *
4
+ * ::: info
5
+ *
6
+ * Astronomy formulas are defined in specific time scales (most commonly **TT**).
7
+ * JavaScript `Date` represents **UTC** only. Keep these symbols explicit to avoid ambiguity.
8
+ *
9
+ * :::
10
+ *
11
+ * @category Date
12
+ */
13
+ export const TIME_SCALE_UTC = 'UTC';
14
+ /**
15
+ * @category Date
16
+ */
17
+ export const TIME_SCALE_TT = 'TT';
18
+ /**
19
+ * **J2000 epoch as a UTC timestamp** for JavaScript usage.
20
+ *
21
+ * J2000 is *defined* as **JD 2451545.0 (TT)**, i.e. 2000-01-01 12:00:00 **TT**.
22
+ * At that epoch **TT − UTC = 64.184 s**, so the corresponding UTC instant is:
23
+ * **2000-01-01T11:58:55.816Z**.
24
+ *
25
+ * @example
26
+ * // Milliseconds from UTC midnight to J2000 (UTC):
27
+ * const deltaMs = +J2000_UTC - +EPOCH_2000_UTC_MIDNIGHT; // 43_135_816 ms
28
+ *
29
+ * // If you need the TT-based Julian centuries since J2000:
30
+ * // T = (JD_TT - J2000_TT) / 36525
31
+ * // Compute JD_TT from a UTC Date using your UTC→TT→JD pipeline, then use J2000_TT.
32
+ * @category Date
33
+ */
34
+ export const J2000_UTC = new Date('2000-01-01T11:58:55.816Z');
35
+ /**
36
+ * Time scale associated with {@link J2000_UTC}.
37
+ * @category Date
38
+ */
39
+ export const J2000_UTC_TIME_SCALE = TIME_SCALE_UTC;
40
+ /**
41
+ * **UTC midnight at the start of 2000-01-01** (convenient calendar anchor).
42
+ *
43
+ * ::: warning
44
+ *
45
+ * This is **not** the J2000 epoch itself (which occurs 11:58:55.816 later in UTC).
46
+ *
47
+ * :::
48
+ *
49
+ * @category Date
50
+ */
51
+ export const EPOCH_2000_UTC_MIDNIGHT = new Date('2000-01-01T00:00:00Z');
52
+ /**
53
+ * Time scale associated with {@link EPOCH_2000_UTC_MIDNIGHT}.
54
+ * @category Date
55
+ */
56
+ export const EPOCH_2000_UTC_MIDNIGHT_TIME_SCALE = TIME_SCALE_UTC;
57
+ /**
58
+ * **J2000 epoch as a Julian Date in the TT time scale.**
59
+ *
60
+ * Defined as **JD 2451545.0 (TT)**, corresponding to 2000-01-01 12:00:00 **TT**.
61
+ *
62
+ * @example
63
+ * // Julian centuries since J2000 in TT:
64
+ * // const T = (jdTT - J2000_TT) / 36525;
65
+ * @category Date
66
+ */
67
+ export const J2000_TT = 2451545.0;
68
+ /**
69
+ * The **defining** time scale for the J2000 epoch.
70
+ * J2000 is conventionally specified in **Terrestrial Time** (TT).
71
+ *
72
+ * @example
73
+ * // When computing Julian centuries:
74
+ * // T = (JD_TT - J2000_TT) / 36525
75
+ * @category Date
76
+ */
77
+ export const J2000_EPOCH_TIME_SCALE = TIME_SCALE_TT;
78
+ /**
79
+ * Useful offset at the J2000 epoch (for UTC↔TT conversions near that instant).
80
+ *
81
+ * - TT − UTC = **64.184 s** at 2000-01-01
82
+ * - Provided in both seconds and milliseconds for convenience.
83
+ *
84
+ * ::: info
85
+ *
86
+ * UTC–TT offset changes when leap seconds are introduced; this constant is
87
+ * specific to the J2000 epoch.
88
+ *
89
+ * :::
90
+ * @category Date
91
+ */
92
+ export const TT_MINUS_UTC_AT_J2000_SECONDS = 64.184;
93
+ /**
94
+ * @category Date
95
+ */
96
+ export const TT_MINUS_UTC_AT_J2000_MS = 64184;
97
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../src/date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAc,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAa,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,cAAc,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAkB,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAM,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Core **astronomical distance constants** and **conversion ratios**.
3
+ *
4
+ * ## Conventions
5
+ * - **Meters** are the base distance unit.
6
+ * - **Light-year** uses the **Julian year** (exactly 365.25 d) via {@link JULIAN_YEAR_SECONDS}.
7
+ * - **Astronomical unit (au)** is exact per IAU 2012 B2.
8
+ * - **Parsec** is defined by trigonometric parallax: `pc = au / tan(1″)`.
9
+ *
10
+ * @see https://www.bipm.org/en/publications/si-brochure (SI Brochure)
11
+ * @see https://www.iau.org/static/resolutions/IAU2012_English.pdf (IAU 2012 B2 — astronomical unit)
12
+ * @see https://en.wikipedia.org/wiki/Julian_year_(astronomy) (Julian year)
13
+ * @see https://en.wikipedia.org/wiki/Parsec (Parsec definition)
14
+ */
15
+ /**
16
+ * Speed of light in vacuum, **exact** per SI (m·s⁻¹).
17
+ * @category Distance
18
+ */
19
+ export declare const SPEED_OF_LIGHT_M_PER_S: 299792458;
20
+ /**
21
+ * Astronomical unit in meters, **exact** (IAU 2012 B2).
22
+ * @category Distance
23
+ */
24
+ export declare const AU_METERS: 149597870700;
25
+ /**
26
+ * Meters in one **light-year**, defined as `c × (Julian year)`.
27
+ *
28
+ * ::: info
29
+ *
30
+ * Uses {@link SPEED_OF_LIGHT_M_PER_S} × {@link JULIAN_YEAR_SECONDS}.
31
+ *
32
+ * :::
33
+ *
34
+ * @category Distance
35
+ */
36
+ export declare const METERS_PER_LY: number;
37
+ /**
38
+ * Radians in one arcsecond: `π / 648 000`.
39
+ *
40
+ * ::: tip
41
+ *
42
+ * Convenient for expressing the exact parsec definition.
43
+ *
44
+ * :::
45
+ *
46
+ * @category Distance
47
+ */
48
+ export declare const RADIANS_PER_ARCSECOND: number;
49
+ /**
50
+ * Meters in one **parsec**, using the exact trigonometric definition: `pc = au / tan(1″)`.
51
+ *
52
+ * ::: info
53
+ *
54
+ * Computed as {@link AU_METERS} / tan({@link RADIANS_PER_ARCSECOND}).
55
+ *
56
+ * :::
57
+ *
58
+ * @category Distance
59
+ */
60
+ export declare const METERS_PER_PC: number;
61
+ /**
62
+ * Astronomical units per light-year.
63
+ *
64
+ * ::: info
65
+ *
66
+ * Computed as {@link METERS_PER_LY} / {@link AU_METERS}.
67
+ *
68
+ * :::
69
+ *
70
+ * @category Distance
71
+ */
72
+ export declare const AU_PER_LY: number;
73
+ /**
74
+ * Light-years per astronomical unit (reciprocal of {@link AU_PER_LY}).
75
+ * @category Distance
76
+ */
77
+ export declare const LY_PER_AU: number;
78
+ /**
79
+ * Kilometers in one astronomical unit.
80
+ * @category Distance
81
+ */
82
+ export declare const KM_PER_AU: number;
83
+ /**
84
+ * Light-years per parsec.
85
+ *
86
+ * ::: info
87
+ *
88
+ * Computed as {@link METERS_PER_PC} / {@link METERS_PER_LY}.
89
+ *
90
+ * :::
91
+ *
92
+ * @category Distance
93
+ */
94
+ export declare const LY_PER_PC: number;
95
+ /**
96
+ * Parsecs per light-year (reciprocal of {@link LY_PER_PC}).
97
+ * @category Distance
98
+ */
99
+ export declare const PC_PER_LY: number;
100
+ //# sourceMappingURL=distance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../src/distance.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAIH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAG,SAAoB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAG,YAAwB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,QAA+C,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAAoB,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,QAA8C,CAAC;AAIzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,QAA4B,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAgB,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,QAAgC,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAgB,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { JULIAN_YEAR_SECONDS } from './temporal';
2
+ /**
3
+ * Core **astronomical distance constants** and **conversion ratios**.
4
+ *
5
+ * ## Conventions
6
+ * - **Meters** are the base distance unit.
7
+ * - **Light-year** uses the **Julian year** (exactly 365.25 d) via {@link JULIAN_YEAR_SECONDS}.
8
+ * - **Astronomical unit (au)** is exact per IAU 2012 B2.
9
+ * - **Parsec** is defined by trigonometric parallax: `pc = au / tan(1″)`.
10
+ *
11
+ * @see https://www.bipm.org/en/publications/si-brochure (SI Brochure)
12
+ * @see https://www.iau.org/static/resolutions/IAU2012_English.pdf (IAU 2012 B2 — astronomical unit)
13
+ * @see https://en.wikipedia.org/wiki/Julian_year_(astronomy) (Julian year)
14
+ * @see https://en.wikipedia.org/wiki/Parsec (Parsec definition)
15
+ */
16
+ // Base physical/constants
17
+ /**
18
+ * Speed of light in vacuum, **exact** per SI (m·s⁻¹).
19
+ * @category Distance
20
+ */
21
+ export const SPEED_OF_LIGHT_M_PER_S = 299792458; // exact (SI)
22
+ /**
23
+ * Astronomical unit in meters, **exact** (IAU 2012 B2).
24
+ * @category Distance
25
+ */
26
+ export const AU_METERS = 149597870700;
27
+ /**
28
+ * Meters in one **light-year**, defined as `c × (Julian year)`.
29
+ *
30
+ * ::: info
31
+ *
32
+ * Uses {@link SPEED_OF_LIGHT_M_PER_S} × {@link JULIAN_YEAR_SECONDS}.
33
+ *
34
+ * :::
35
+ *
36
+ * @category Distance
37
+ */
38
+ export const METERS_PER_LY = SPEED_OF_LIGHT_M_PER_S * JULIAN_YEAR_SECONDS; // 9_460_730_472_580_800
39
+ /**
40
+ * Radians in one arcsecond: `π / 648 000`.
41
+ *
42
+ * ::: tip
43
+ *
44
+ * Convenient for expressing the exact parsec definition.
45
+ *
46
+ * :::
47
+ *
48
+ * @category Distance
49
+ */
50
+ export const RADIANS_PER_ARCSECOND = Math.PI / 648000;
51
+ /**
52
+ * Meters in one **parsec**, using the exact trigonometric definition: `pc = au / tan(1″)`.
53
+ *
54
+ * ::: info
55
+ *
56
+ * Computed as {@link AU_METERS} / tan({@link RADIANS_PER_ARCSECOND}).
57
+ *
58
+ * :::
59
+ *
60
+ * @category Distance
61
+ */
62
+ export const METERS_PER_PC = AU_METERS / Math.tan(RADIANS_PER_ARCSECOND); // ≈ 3.08567758149e16
63
+ // Helpful ratios (derive from the above to avoid drift)
64
+ /**
65
+ * Astronomical units per light-year.
66
+ *
67
+ * ::: info
68
+ *
69
+ * Computed as {@link METERS_PER_LY} / {@link AU_METERS}.
70
+ *
71
+ * :::
72
+ *
73
+ * @category Distance
74
+ */
75
+ export const AU_PER_LY = METERS_PER_LY / AU_METERS; // ≈ 63_241.07708426628
76
+ /**
77
+ * Light-years per astronomical unit (reciprocal of {@link AU_PER_LY}).
78
+ * @category Distance
79
+ */
80
+ export const LY_PER_AU = 1 / AU_PER_LY;
81
+ /**
82
+ * Kilometers in one astronomical unit.
83
+ * @category Distance
84
+ */
85
+ export const KM_PER_AU = AU_METERS / 1000;
86
+ /**
87
+ * Light-years per parsec.
88
+ *
89
+ * ::: info
90
+ *
91
+ * Computed as {@link METERS_PER_PC} / {@link METERS_PER_LY}.
92
+ *
93
+ * :::
94
+ *
95
+ * @category Distance
96
+ */
97
+ export const LY_PER_PC = METERS_PER_PC / METERS_PER_LY; // ≈ 3.26156…
98
+ /**
99
+ * Parsecs per light-year (reciprocal of {@link LY_PER_PC}).
100
+ * @category Distance
101
+ */
102
+ export const PC_PER_LY = 1 / LY_PER_PC;
103
+ //# sourceMappingURL=distance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distance.js","sourceRoot":"","sources":["../src/distance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AAEH,0BAA0B;AAE1B;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAoB,CAAC,CAAC,aAAa;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAwB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,GAAG,mBAAmB,CAAC,CAAC,wBAAwB;AAEnG;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,EAAE,GAAG,MAAO,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB;AAE/F,wDAAwD;AAExD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,GAAG,IAAK,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC,aAAa;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @showCategories
4
+ * @packageDocumentation
5
+ */
6
+ export * from './date';
7
+ export * from './distance';
8
+ export * from './math';
9
+ export * from './objects';
10
+ export * from './temporal';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,QAAQ,CAAC;AAEvB,cAAc,YAAY,CAAC;AAE3B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @showCategories
4
+ * @packageDocumentation
5
+ */
6
+ export * from './date';
7
+ export * from './distance';
8
+ export * from './math';
9
+ export * from './objects';
10
+ export * from './temporal';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,QAAQ,CAAC;AAEvB,cAAc,YAAY,CAAC;AAE3B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC"}
package/dist/math.d.ts ADDED
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The circle constant **τ** (tau), equal to **2π** `(≈ 6.283185307179586)`.
3
+ * Useful for full rotations, radians-per-turn calculations, angular velocity,
4
+ * and other periodic math where factors of 2 arise naturally.
5
+ *
6
+ * $$
7
+ * \tau = 2\pi
8
+ * $$
9
+ * $$
10
+ * 1\ \text{turn} = \tau\ \text{radians} = 360^\circ
11
+ * $$
12
+ * $$
13
+ * \theta_{\text{rad}} = t\,\tau \quad (\text{turn fraction } t \in [0,1))
14
+ * $$
15
+ * $$
16
+ * \theta_{\deg} = \frac{180^\circ}{\pi}\,\theta_{\text{rad}} = 360^\circ\,t
17
+ * $$
18
+ * $$
19
+ * \omega = 2\pi f = \tau f \quad\text{(angular frequency)}
20
+ * $$
21
+ * $$
22
+ * T = \frac{2\pi}{\omega} = \frac{\tau}{\omega} \quad\text{(period)}
23
+ * $$
24
+ *
25
+ * @readonly
26
+ *
27
+ * ::: info
28
+ *
29
+ * - Using **τ** often simplifies formulas that involve *full cycles* (e.g., Fourier analysis,
30
+ * rotations, oscillator phase), eliminating stray factors of 2.
31
+ * - `TWO_PI` is a runtime numeric constant; do not compare floating-point results using `===`
32
+ * when they involve trigonometric operations—prefer tolerance checks.
33
+ *
34
+ * :::
35
+ *
36
+ * @see https://en.wikipedia.org/wiki/Tau_(mathematics)
37
+ * @see https://en.wikipedia.org/wiki/Radian
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import { TWO_PI } from "./constants";
42
+ *
43
+ * // A quarter turn (π/2 radians)
44
+ * const quarterTurn = 0.25 * TWO_PI; // ≈ 1.5707963267948966
45
+ *
46
+ * // Point on the unit circle at 1/8 of a turn
47
+ * const t = 1 / 8;
48
+ * const angle = t * TWO_PI; // τ/8 = π/4
49
+ * const x = Math.cos(angle); // ≈ 0.7071
50
+ * const y = Math.sin(angle); // ≈ 0.7071
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * // Wrap any angle (radians) to [0, τ):
56
+ * function wrapTau(theta: number): number {
57
+ * const tau = TWO_PI;
58
+ * return ((theta % tau) + tau) % tau;
59
+ * }
60
+ *
61
+ * // Convert turn fraction to radians:
62
+ * const radiansFromTurns = (turns: number) => turns * TWO_PI;
63
+ *
64
+ * // Angular frequency from frequency (Hz):
65
+ * const omega = (f: number) => TWO_PI * f; // ω = τ f
66
+ * ```
67
+ * @category Math
68
+ */
69
+ export declare const TWO_PI: number;
70
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,MAAM,EAAE,MAAoB,CAAC"}
package/dist/math.js ADDED
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The circle constant **τ** (tau), equal to **2π** `(≈ 6.283185307179586)`.
3
+ * Useful for full rotations, radians-per-turn calculations, angular velocity,
4
+ * and other periodic math where factors of 2 arise naturally.
5
+ *
6
+ * $$
7
+ * \tau = 2\pi
8
+ * $$
9
+ * $$
10
+ * 1\ \text{turn} = \tau\ \text{radians} = 360^\circ
11
+ * $$
12
+ * $$
13
+ * \theta_{\text{rad}} = t\,\tau \quad (\text{turn fraction } t \in [0,1))
14
+ * $$
15
+ * $$
16
+ * \theta_{\deg} = \frac{180^\circ}{\pi}\,\theta_{\text{rad}} = 360^\circ\,t
17
+ * $$
18
+ * $$
19
+ * \omega = 2\pi f = \tau f \quad\text{(angular frequency)}
20
+ * $$
21
+ * $$
22
+ * T = \frac{2\pi}{\omega} = \frac{\tau}{\omega} \quad\text{(period)}
23
+ * $$
24
+ *
25
+ * @readonly
26
+ *
27
+ * ::: info
28
+ *
29
+ * - Using **τ** often simplifies formulas that involve *full cycles* (e.g., Fourier analysis,
30
+ * rotations, oscillator phase), eliminating stray factors of 2.
31
+ * - `TWO_PI` is a runtime numeric constant; do not compare floating-point results using `===`
32
+ * when they involve trigonometric operations—prefer tolerance checks.
33
+ *
34
+ * :::
35
+ *
36
+ * @see https://en.wikipedia.org/wiki/Tau_(mathematics)
37
+ * @see https://en.wikipedia.org/wiki/Radian
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import { TWO_PI } from "./constants";
42
+ *
43
+ * // A quarter turn (π/2 radians)
44
+ * const quarterTurn = 0.25 * TWO_PI; // ≈ 1.5707963267948966
45
+ *
46
+ * // Point on the unit circle at 1/8 of a turn
47
+ * const t = 1 / 8;
48
+ * const angle = t * TWO_PI; // τ/8 = π/4
49
+ * const x = Math.cos(angle); // ≈ 0.7071
50
+ * const y = Math.sin(angle); // ≈ 0.7071
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * // Wrap any angle (radians) to [0, τ):
56
+ * function wrapTau(theta: number): number {
57
+ * const tau = TWO_PI;
58
+ * return ((theta % tau) + tau) % tau;
59
+ * }
60
+ *
61
+ * // Convert turn fraction to radians:
62
+ * const radiansFromTurns = (turns: number) => turns * TWO_PI;
63
+ *
64
+ * // Angular frequency from frequency (Hz):
65
+ * const omega = (f: number) => TWO_PI * f; // ω = τ f
66
+ * ```
67
+ * @category Math
68
+ */
69
+ export const TWO_PI = 2 * Math.PI;
70
+ //# sourceMappingURL=math.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.js","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAW,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Solar radius constants (all values in **kilometres**).
3
+ *
4
+ * ## Conventions:
5
+ * - **Nominal radius** is an exact conversion constant (IAU 2015 B3).
6
+ * - **Photospheric/seismic** value follows Haberreiter–Schmutz–Kosovichev (2008),
7
+ * which reconciles seismic and photospheric definitions by lowering the standard radius.
8
+ * - **Limb inflection offset** quantifies how the brightness–profile "edge" overestimates
9
+ * the photospheric/seismic radius (~0.333 Mm).
10
+ * - **Transit** and **PICARD/SODISM** radii are precise observational determinations,
11
+ * with quoted 1σ uncertainties where available (bandpass-dependent for PICARD).
12
+ */
13
+ /**
14
+ * Nominal solar radius (IAU 2015 B3), exact.
15
+ * @category Objects
16
+ */
17
+ export declare const SOLAR_RADIUS_NOMINAL_KM: 695700;
18
+ /**
19
+ * Photospheric / "standard" solar radius suggested for models (HSK 2008).
20
+ * Reconciles seismic and photospheric definitions.
21
+ * @category Objects
22
+ */
23
+ export declare const SOLAR_RADIUS_PHOTOSPHERIC_KM = 695660;
24
+ /**
25
+ *
26
+ * Limb–inflection minus photospheric offset (~0.333 Mm).
27
+ /
28
+ export const SOLAR_RADIUS_LIMB_INFLECTION_MINUS_PHOTOSPHERIC_KM = 333;
29
+
30
+ // --- SOHO/MDI Mercury transits (2003, 2006) ---
31
+ /**
32
+ * Radius from SOHO/MDI Mercury transits (2003 & 2006).
33
+ * @category Objects
34
+ */
35
+ export declare const SOLAR_RADIUS_SOHO_MDI_MERCURY_TRANSIT_KM = 696342;
36
+ /**
37
+ * 1σ uncertainty for SOHO/MDI Mercury-transit radius.
38
+ * @category Objects
39
+ */
40
+ export declare const SOLAR_RADIUS_SOHO_MDI_MERCURY_TRANSIT_UNC_KM = 65;
41
+ /**
42
+ * PICARD/SODISM radius at 535.7 nm.
43
+ * @category Objects
44
+ */
45
+ export declare const SOLAR_RADIUS_PICARD_SODISM_535_7_NM_KM = 696134;
46
+ /**
47
+ * 1σ uncertainty at 535.7 nm.
48
+ * @category Objects
49
+ */
50
+ export declare const SOLAR_RADIUS_PICARD_SODISM_535_7_NM_UNC_KM = 261;
51
+ /**
52
+ * PICARD/SODISM radius at 607.1 nm.
53
+ * @category Objects
54
+ */
55
+ export declare const SOLAR_RADIUS_PICARD_SODISM_607_1_NM_KM = 696156;
56
+ /**
57
+ * 1σ uncertainty at 607.1 nm.
58
+ * @category Objects
59
+ */
60
+ export declare const SOLAR_RADIUS_PICARD_SODISM_607_1_NM_UNC_KM = 145;
61
+ /**
62
+ * PICARD/SODISM radius at 782.2 nm.
63
+ * @category Objects
64
+ */
65
+ export declare const SOLAR_RADIUS_PICARD_SODISM_782_2_NM_KM = 696192;
66
+ /**
67
+ * 1σ uncertainty at 782.2 nm.
68
+ * @category Objects
69
+ */
70
+ export declare const SOLAR_RADIUS_PICARD_SODISM_782_2_NM_UNC_KM = 247;
71
+ //# sourceMappingURL=objects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../src/objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAG,MAAgB,CAAC;AAGxD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wCAAwC,SAAU,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,4CAA4C,KAAK,CAAC;AAG/D;;;GAGG;AACH,eAAO,MAAM,sCAAsC,SAAU,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,0CAA0C,MAAM,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,sCAAsC,SAAU,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,0CAA0C,MAAM,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,sCAAsC,SAAU,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,0CAA0C,MAAM,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Solar radius constants (all values in **kilometres**).
3
+ *
4
+ * ## Conventions:
5
+ * - **Nominal radius** is an exact conversion constant (IAU 2015 B3).
6
+ * - **Photospheric/seismic** value follows Haberreiter–Schmutz–Kosovichev (2008),
7
+ * which reconciles seismic and photospheric definitions by lowering the standard radius.
8
+ * - **Limb inflection offset** quantifies how the brightness–profile "edge" overestimates
9
+ * the photospheric/seismic radius (~0.333 Mm).
10
+ * - **Transit** and **PICARD/SODISM** radii are precise observational determinations,
11
+ * with quoted 1σ uncertainties where available (bandpass-dependent for PICARD).
12
+ */
13
+ // --- IAU nominal (exact conversion constant) ---
14
+ /**
15
+ * Nominal solar radius (IAU 2015 B3), exact.
16
+ * @category Objects
17
+ */
18
+ export const SOLAR_RADIUS_NOMINAL_KM = 695700;
19
+ // --- Photospheric / seismic convention (HSK 2008) ---
20
+ /**
21
+ * Photospheric / "standard" solar radius suggested for models (HSK 2008).
22
+ * Reconciles seismic and photospheric definitions.
23
+ * @category Objects
24
+ */
25
+ export const SOLAR_RADIUS_PHOTOSPHERIC_KM = 695660;
26
+ /**
27
+ *
28
+ * Limb–inflection minus photospheric offset (~0.333 Mm).
29
+ /
30
+ export const SOLAR_RADIUS_LIMB_INFLECTION_MINUS_PHOTOSPHERIC_KM = 333;
31
+
32
+ // --- SOHO/MDI Mercury transits (2003, 2006) ---
33
+ /**
34
+ * Radius from SOHO/MDI Mercury transits (2003 & 2006).
35
+ * @category Objects
36
+ */
37
+ export const SOLAR_RADIUS_SOHO_MDI_MERCURY_TRANSIT_KM = 696342;
38
+ /**
39
+ * 1σ uncertainty for SOHO/MDI Mercury-transit radius.
40
+ * @category Objects
41
+ */
42
+ export const SOLAR_RADIUS_SOHO_MDI_MERCURY_TRANSIT_UNC_KM = 65;
43
+ // --- PICARD/SODISM (Venus transit 2012; bandpass-specific, limb-inflection definition) ---
44
+ /**
45
+ * PICARD/SODISM radius at 535.7 nm.
46
+ * @category Objects
47
+ */
48
+ export const SOLAR_RADIUS_PICARD_SODISM_535_7_NM_KM = 696134;
49
+ /**
50
+ * 1σ uncertainty at 535.7 nm.
51
+ * @category Objects
52
+ */
53
+ export const SOLAR_RADIUS_PICARD_SODISM_535_7_NM_UNC_KM = 261;
54
+ /**
55
+ * PICARD/SODISM radius at 607.1 nm.
56
+ * @category Objects
57
+ */
58
+ export const SOLAR_RADIUS_PICARD_SODISM_607_1_NM_KM = 696156;
59
+ /**
60
+ * 1σ uncertainty at 607.1 nm.
61
+ * @category Objects
62
+ */
63
+ export const SOLAR_RADIUS_PICARD_SODISM_607_1_NM_UNC_KM = 145;
64
+ /**
65
+ * PICARD/SODISM radius at 782.2 nm.
66
+ * @category Objects
67
+ */
68
+ export const SOLAR_RADIUS_PICARD_SODISM_782_2_NM_KM = 696192;
69
+ /**
70
+ * 1σ uncertainty at 782.2 nm.
71
+ * @category Objects
72
+ */
73
+ export const SOLAR_RADIUS_PICARD_SODISM_782_2_NM_UNC_KM = 247;
74
+ //# sourceMappingURL=objects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.js","sourceRoot":"","sources":["../src/objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kDAAkD;AAClD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAgB,CAAC;AAExD,uDAAuD;AACvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAO,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,MAAO,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG,EAAE,CAAC;AAE/D,4FAA4F;AAC5F;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,MAAO,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,GAAG,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,MAAO,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,GAAG,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,MAAO,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,GAAG,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Core **time constants** used across the temporal utilities.
3
+ *
4
+ * ## Conventions
5
+ * - **Base units**: seconds and milliseconds.
6
+ * - **SI day**: exactly `86 400 s`.
7
+ * - **Julian year** (astronomy): exactly `365.25 d = 31 557 600 s`.
8
+ *
9
+ * @see https://www.bipm.org/en/publications/si-brochure (SI Brochure — second & day)
10
+ * @see https://en.wikipedia.org/wiki/Julian_year_(astronomy) (Julian year definition)
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const hoursPerDay = SECONDS_PER_DAY / 3600; // 24
15
+ * const msInTwoDays = 2 * MILLISECONDS_PER_DAY; // 172_800_000
16
+ * const secondsInHalfJulianYear = JULIAN_YEAR_SECONDS / 2; // 15_778_800
17
+ * ```
18
+ */
19
+ /**
20
+ * Length of the **SI day** in seconds (exact).
21
+ * @category Temporal
22
+ */
23
+ export declare const SECONDS_PER_DAY: 86400;
24
+ /**
25
+ * Milliseconds in one second (exact).
26
+ * @category Temporal
27
+ */
28
+ export declare const MILLISECONDS_PER_SECOND: 1000;
29
+ /**
30
+ * Milliseconds in one **SI day**.
31
+ *
32
+ * ::: info
33
+ *
34
+ * Computed from {@link SECONDS_PER_DAY} × {@link MILLISECONDS_PER_SECOND}.
35
+ *
36
+ * :::
37
+ *
38
+ * @category Temporal
39
+ */
40
+ export declare const MILLISECONDS_PER_DAY: number;
41
+ /**
42
+ * Length of the **Julian year** in SI days (exactly 365.25).
43
+ * @category Temporal
44
+ */
45
+ export declare const JULIAN_YEAR_DAYS: 365.25;
46
+ /**
47
+ * Length of the **Julian year** in seconds.
48
+ *
49
+ * ::: info
50
+ *
51
+ * Computed as {@link SECONDS_PER_DAY} × {@link JULIAN_YEAR_DAYS} = **31 557 600 s**.
52
+ *
53
+ * :::
54
+ *
55
+ * @category Temporal
56
+ */
57
+ export declare const JULIAN_YEAR_SECONDS: number;
58
+ //# sourceMappingURL=temporal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temporal.d.ts","sourceRoot":"","sources":["../src/temporal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAG,KAAe,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAG,IAAc,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAI9E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAG,MAAe,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,QAAqC,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Core **time constants** used across the temporal utilities.
3
+ *
4
+ * ## Conventions
5
+ * - **Base units**: seconds and milliseconds.
6
+ * - **SI day**: exactly `86 400 s`.
7
+ * - **Julian year** (astronomy): exactly `365.25 d = 31 557 600 s`.
8
+ *
9
+ * @see https://www.bipm.org/en/publications/si-brochure (SI Brochure — second & day)
10
+ * @see https://en.wikipedia.org/wiki/Julian_year_(astronomy) (Julian year definition)
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const hoursPerDay = SECONDS_PER_DAY / 3600; // 24
15
+ * const msInTwoDays = 2 * MILLISECONDS_PER_DAY; // 172_800_000
16
+ * const secondsInHalfJulianYear = JULIAN_YEAR_SECONDS / 2; // 15_778_800
17
+ * ```
18
+ */
19
+ /**
20
+ * Length of the **SI day** in seconds (exact).
21
+ * @category Temporal
22
+ */
23
+ export const SECONDS_PER_DAY = 86400;
24
+ /**
25
+ * Milliseconds in one second (exact).
26
+ * @category Temporal
27
+ */
28
+ export const MILLISECONDS_PER_SECOND = 1000;
29
+ /**
30
+ * Milliseconds in one **SI day**.
31
+ *
32
+ * ::: info
33
+ *
34
+ * Computed from {@link SECONDS_PER_DAY} × {@link MILLISECONDS_PER_SECOND}.
35
+ *
36
+ * :::
37
+ *
38
+ * @category Temporal
39
+ */
40
+ export const MILLISECONDS_PER_DAY = SECONDS_PER_DAY * MILLISECONDS_PER_SECOND;
41
+ // Julian year (astronomy) — EXACT 365.25 d
42
+ /**
43
+ * Length of the **Julian year** in SI days (exactly 365.25).
44
+ * @category Temporal
45
+ */
46
+ export const JULIAN_YEAR_DAYS = 365.25;
47
+ /**
48
+ * Length of the **Julian year** in seconds.
49
+ *
50
+ * ::: info
51
+ *
52
+ * Computed as {@link SECONDS_PER_DAY} × {@link JULIAN_YEAR_DAYS} = **31 557 600 s**.
53
+ *
54
+ * :::
55
+ *
56
+ * @category Temporal
57
+ */
58
+ export const JULIAN_YEAR_SECONDS = SECONDS_PER_DAY * JULIAN_YEAR_DAYS; // 31_557_600
59
+ //# sourceMappingURL=temporal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temporal.js","sourceRoot":"","sources":["../src/temporal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAe,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAc,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,GAAG,uBAAuB,CAAC;AAE9E,2CAA2C;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAe,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,GAAG,gBAAgB,CAAC,CAAC,aAAa"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@interstellar-tools/constants",
3
+ "version": "0.1.1",
4
+ "description": "constants",
5
+ "keywords": [
6
+ "constants"
7
+ ],
8
+ "homepage": "https://phun-ky.net/projects/interstellar-tools",
9
+ "bugs": {
10
+ "url": "https://github.com/phun-ky/interstellar-tools/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/phun-ky/interstellar-tools.git"
15
+ },
16
+ "funding": "https://github.com/phun-ky/interstellar-tools?sponsor=1",
17
+ "license": "MIT",
18
+ "author": "Alexander Vassbotn Røyne-Helgesen <alexander@phun-ky.net>",
19
+ "type": "module",
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/index.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "sideEffects": false,
32
+ "scripts": {
33
+ "clean": "rm -rf dist tsconfig.tsbuildinfo",
34
+ "release": "release-it",
35
+ "test": "tsx --test **/__tests__/**/*.spec.ts",
36
+ "pretest:ci": "rm -rf coverage && mkdir -p coverage",
37
+ "test:ci": "glob -c \"node --import tsx --test --no-warnings --experimental-test-coverage --test-reporter=cobertura --test-reporter-destination=coverage/cobertura-coverage.xml --test-reporter=spec --test-reporter-destination=stdout\" \"**/__tests__/**/*.spec.ts\""
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^24.0.3",
41
+ "eslint": "^9.27.0",
42
+ "eslint-config-phun-ky": "^1.0.3",
43
+ "prettier": "^3.5.3",
44
+ "typescript": "^5.8.3"
45
+ },
46
+ "engines": {
47
+ "node": ">=22.9.0",
48
+ "npm": ">=11.5.1"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ }
53
+ }