@angelrove/forecast-utils 1.1.6 → 1.1.8

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 CHANGED
@@ -517,11 +517,6 @@ SVG arrow indicating wind direction.
517
517
  | Param | Type | Description |
518
518
  | --- | --- | --- |
519
519
  | props | <code>Object</code> | Component props. |
520
-
521
- **Properties**
522
-
523
- | Name | Type | Description |
524
- | --- | --- | --- |
525
520
  | props.deg | <code>number</code> | Wind direction in degrees (0 = North, 90 = East, etc.). |
526
521
  | [props.size] | <code>string</code> | Tailwind CSS size class (e.g., 'size-10') |
527
522
  | [props.strokeWidth] | <code>number</code> | Stroke width of the arrow (range: 1–6). |
@@ -4,4 +4,4 @@
4
4
  * @param {number} code - WMO Weather interpretation code.
5
5
  * @returns {WeatherCodeEntry | undefined}
6
6
  */
7
- export function getWeatherCodeEntry(code: number): any | undefined;
7
+ export function getWeatherCodeEntry(code: number): WeatherCodeEntry | undefined;
@@ -8,7 +8,7 @@
8
8
  * @returns {{ icon: string, description: string }}
9
9
  * @memberof module:OpenMeteo
10
10
  */
11
- export function weatherSymbol(code: any, precipitation?: number | undefined, night?: boolean, dark?: boolean): {
11
+ export function weatherSymbol(code: any, precipitation?: number, night?: boolean, dark?: boolean): {
12
12
  icon: string;
13
13
  description: string;
14
14
  };
@@ -21,7 +21,7 @@ declare namespace MoonCalc {
21
21
  * @returns {MoonData}
22
22
  * @memberof module:Astronomy/MoonCalc
23
23
  */
24
- declare function data(latitude: number, longitude: number, date?: Date | undefined, language?: string | undefined): MoonData;
24
+ declare function data(latitude: number, longitude: number, date?: Date, language?: string): MoonData;
25
25
  /**
26
26
  * Información de la luna para una fecha y hora dadas.
27
27
  * La fecha y hora se devolverán en la zona horaria local.
@@ -33,7 +33,7 @@ declare function data(latitude: number, longitude: number, date?: Date | undefin
33
33
  * @returns {{ date: string, time: string, illumination: string, phase: string, phaseId: string, emoji: string, parallacticAngle: number, angle: number, position: AstroPosition, next: object }}
34
34
  * @memberof module:Astronomy/MoonCalc
35
35
  */
36
- declare function dataExt(latitude: number, longitude: number, date?: Date | undefined, language?: string | undefined): {
36
+ declare function dataExt(latitude: number, longitude: number, date?: Date, language?: string): {
37
37
  date: string;
38
38
  time: string;
39
39
  illumination: string;
@@ -65,7 +65,7 @@ declare function times(latitude: number, longitude: number, timezoneId: string,
65
65
  * @returns {string} - Emoji of the moon phase
66
66
  * @memberof module:Astronomy/MoonCalc
67
67
  */
68
- declare function emoji(latitude: number, longitude: number, date?: Date | undefined): string;
68
+ declare function emoji(latitude: number, longitude: number, date?: Date): string;
69
69
  /**
70
70
  * @param {number} altitude
71
71
  * @param {Date} highest
@@ -6,4 +6,4 @@
6
6
  * @param {string} language
7
7
  * @returns {MoonData}
8
8
  */
9
- export function parseBasicData(data: any, language: string): any;
9
+ export function parseBasicData(data: any, language: string): MoonData;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,10 @@
1
- type AstroPosition = {
1
+ export type AstroPosition = {
2
2
  altitude: number;
3
3
  azimuth: number;
4
4
  direction: string;
5
5
  direction_full: string;
6
6
  };
7
- type LocalTimeData = {
7
+ export type LocalTimeData = {
8
8
  /**
9
9
  * - The local time.
10
10
  */
@@ -12,7 +12,7 @@ declare namespace TimeDateStr {
12
12
  * @returns {string} La fecha formateada.
13
13
  * @memberof module:Utils/TimeDateStr
14
14
  */
15
- declare function dateFormat(date?: Date | undefined): string;
15
+ declare function dateFormat(date?: Date): string;
16
16
  /**
17
17
  * Returns a now time as a formated string.
18
18
  *
@@ -29,7 +29,7 @@ declare function nowString(sec?: boolean): string;
29
29
  * @returns {string} La fecha formateada.
30
30
  * @memberof module:Utils/TimeDateStr
31
31
  */
32
- declare function timeString(date?: Date | undefined, sec?: boolean | undefined): string;
32
+ declare function timeString(date?: Date, sec?: boolean): string;
33
33
  /**
34
34
  * Return the local time string from a given timezone.
35
35
  *
@@ -38,4 +38,4 @@ declare function timeString(date?: Date | undefined, sec?: boolean | undefined):
38
38
  * @returns {string} - The formatted local time string.
39
39
  * @memberof module:Utils/TimeDateStr
40
40
  */
41
- declare function getLocalTimeFromTz(timeZone: string, date?: number | Date | undefined): string;
41
+ declare function getLocalTimeFromTz(timeZone: string, date?: Date | number): string;
@@ -1,15 +1,17 @@
1
- /**
2
- * Wind direction arrow component (svg image).
3
- */
4
1
  /**
5
2
  * SVG arrow indicating wind direction.
6
3
  *
7
4
  * @component JSX
8
5
  * @param {Object} props - Component props.
9
- * @prop {number} props.deg - Wind direction in degrees (0 = North, 90 = East, etc.).
10
- * @prop {string} [props.size] - Tailwind CSS size class (e.g., 'size-10')
11
- * @prop {number} [props.strokeWidth] - Stroke width of the arrow (range: 1–6).
12
- * @prop {string} [props.className] - Additional CSS classes.
6
+ * @param {number} props.deg - Wind direction in degrees (0 = North, 90 = East, etc.).
7
+ * @param {string} [props.size] - Tailwind CSS size class (e.g., 'size-10')
8
+ * @param {number} [props.strokeWidth] - Stroke width of the arrow (range: 1–6).
9
+ * @param {string} [props.className] - Additional CSS classes.
13
10
  * @memberof module:Utils
14
11
  */
15
- export function WindArrow({ deg, size, strokeWidth, className, }: Object): any;
12
+ export function WindArrow({ deg, size, strokeWidth, className, }: {
13
+ deg: number;
14
+ size?: string | undefined;
15
+ strokeWidth?: number | undefined;
16
+ className?: string | undefined;
17
+ }): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Jose Angel Romero Vegas",
3
3
  "name": "@angelrove/forecast-utils",
4
- "version": "1.1.6",
4
+ "version": "1.1.8",
5
5
  "description": "Utilities for obtaining weather and astronomy forecast data.",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
@@ -39,7 +39,9 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@biomejs/biome": "1.9.4",
42
- "jsdoc-to-markdown": "^9.1.1"
42
+ "jsdoc-to-markdown": "^9.1.1",
43
+ "@types/react": "^19.1.5",
44
+ "@types/react-dom": "^19.1.5"
43
45
  },
44
46
  "dependencies": {}
45
47
  }
@@ -1,26 +1,12 @@
1
- // @ts-nocheck
2
- /**
3
- * Wind direction arrow component (svg image).
4
- */
5
-
6
- // /**
7
- // * @typedef {Object} WindArrowProps
8
- // * @property {number} props.deg - Wind direction in degrees
9
- // * @property {string} [props.size] - Size of the arrow (Tailwind CSS size: 'size-10')
10
- // * @property {number} [props.strokeWidth] - Stroke width of the arrow (1 to 6)
11
- // * @property {string} [props.className]
12
- // * @memberof module:Utils
13
- // */
14
-
15
1
  /**
16
2
  * SVG arrow indicating wind direction.
17
3
  *
18
4
  * @component JSX
19
5
  * @param {Object} props - Component props.
20
- * @prop {number} props.deg - Wind direction in degrees (0 = North, 90 = East, etc.).
21
- * @prop {string} [props.size] - Tailwind CSS size class (e.g., 'size-10')
22
- * @prop {number} [props.strokeWidth] - Stroke width of the arrow (range: 1–6).
23
- * @prop {string} [props.className] - Additional CSS classes.
6
+ * @param {number} props.deg - Wind direction in degrees (0 = North, 90 = East, etc.).
7
+ * @param {string} [props.size] - Tailwind CSS size class (e.g., 'size-10')
8
+ * @param {number} [props.strokeWidth] - Stroke width of the arrow (range: 1–6).
9
+ * @param {string} [props.className] - Additional CSS classes.
24
10
  * @memberof module:Utils
25
11
  */
26
12
  export function WindArrow({