@azohra/meteo.station 0.7.0 → 0.7.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/dist/air.d.ts +4 -7
- package/dist/air.js +1 -2
- package/dist/client/climatology.d.ts +4 -7
- package/dist/client/climatology.js +1 -2
- package/dist/client/history.d.ts +14 -17
- package/dist/client/history.js +1 -2
- package/dist/client/live.d.ts +9 -11
- package/dist/client/live.js +1 -2
- package/dist/client/poll.d.ts +9 -12
- package/dist/client/poll.js +1 -2
- package/dist/client/stores.d.ts +8 -10
- package/dist/client/stores.js +1 -2
- package/dist/client/ticker.d.ts +1 -4
- package/dist/client/ticker.js +1 -2
- package/dist/climatology.d.ts +13 -15
- package/dist/climatology.js +1 -2
- package/dist/connectivity.d.ts +7 -10
- package/dist/connectivity.js +1 -2
- package/dist/contract-climatology.d.ts +11 -14
- package/dist/contract-climatology.js +1 -2
- package/dist/contract.d.ts +45 -48
- package/dist/contract.js +1 -2
- package/dist/derive.d.ts +24 -26
- package/dist/derive.js +1 -2
- package/dist/display.d.ts +6 -9
- package/dist/display.js +1 -2
- package/dist/elements/elements/AirExtremesElement.d.ts +2 -5
- package/dist/elements/elements/AirExtremesElement.js +1 -2
- package/dist/elements/elements/AirMatrixElement.d.ts +2 -5
- package/dist/elements/elements/AirMatrixElement.js +1 -2
- package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +2 -5
- package/dist/elements/elements/ClimatologyDailyPatternElement.js +1 -2
- package/dist/elements/elements/ClimatologyRoseElement.d.ts +2 -5
- package/dist/elements/elements/ClimatologyRoseElement.js +1 -2
- package/dist/elements/elements/CompassFanElement.d.ts +2 -5
- package/dist/elements/elements/CompassFanElement.js +1 -2
- package/dist/elements/elements/CurrentConditionsElement.d.ts +2 -5
- package/dist/elements/elements/CurrentConditionsElement.js +1 -2
- package/dist/elements/elements/DailyPatternElement.d.ts +2 -5
- package/dist/elements/elements/DailyPatternElement.js +1 -2
- package/dist/elements/elements/DialElement.d.ts +2 -5
- package/dist/elements/elements/DialElement.js +1 -2
- package/dist/elements/elements/FavorableShareElement.d.ts +2 -5
- package/dist/elements/elements/FavorableShareElement.js +1 -2
- package/dist/elements/elements/FreshnessBadgeElement.d.ts +2 -5
- package/dist/elements/elements/FreshnessBadgeElement.js +1 -2
- package/dist/elements/elements/RecentSummariesElement.d.ts +2 -5
- package/dist/elements/elements/RecentSummariesElement.js +1 -2
- package/dist/elements/elements/SparklineElement.d.ts +2 -5
- package/dist/elements/elements/SparklineElement.js +1 -2
- package/dist/elements/elements/StationCardElement.d.ts +6 -8
- package/dist/elements/elements/StationCardElement.js +1 -2
- package/dist/elements/elements/StationFeedElement.d.ts +2 -5
- package/dist/elements/elements/StationFeedElement.js +1 -2
- package/dist/elements/elements/StationStripElement.d.ts +2 -5
- package/dist/elements/elements/StationStripElement.js +1 -2
- package/dist/elements/elements/StationTableElement.d.ts +3 -6
- package/dist/elements/elements/StationTableElement.js +1 -2
- package/dist/elements/elements/TrendChartElement.d.ts +2 -5
- package/dist/elements/elements/TrendChartElement.js +1 -2
- package/dist/elements/elements/WindArrowElement.d.ts +2 -5
- package/dist/elements/elements/WindArrowElement.js +1 -2
- package/dist/elements/elements/WindHistoryChartElement.d.ts +2 -5
- package/dist/elements/elements/WindHistoryChartElement.js +1 -2
- package/dist/elements/elements/WindRoseElement.d.ts +2 -5
- package/dist/elements/elements/WindRoseElement.js +1 -2
- package/dist/elements/elements/atoms.d.ts +9 -11
- package/dist/elements/elements/atoms.js +1 -2
- package/dist/elements/index.d.ts +3 -5
- package/dist/elements/index.js +1 -2
- package/dist/elements/lib/ambient.d.ts +2 -5
- package/dist/elements/lib/ambient.js +1 -2
- package/dist/elements/lib/attributes.js +1 -2
- package/dist/elements/lib/base.d.ts +3 -6
- package/dist/elements/lib/base.js +1 -2
- package/dist/elements/lib/context.js +1 -2
- package/dist/elements/lib/fragments.js +1 -2
- package/dist/elements/lib/h.js +1 -2
- package/dist/elements/lib/pinned-cursor.js +1 -2
- package/dist/elements/lib/render.js +1 -2
- package/dist/elements/register.js +1 -2
- package/dist/endpoints.d.ts +6 -9
- package/dist/endpoints.js +1 -2
- package/dist/fixtures.d.ts +7 -10
- package/dist/fixtures.js +1 -2
- package/dist/format.d.ts +11 -14
- package/dist/format.js +1 -2
- package/dist/geometry.d.ts +36 -38
- package/dist/geometry.js +1 -2
- package/dist/instruments.d.ts +37 -40
- package/dist/instruments.js +1 -2
- package/dist/merge-current.d.ts +4 -7
- package/dist/merge-current.js +1 -2
- package/dist/react/components/AirExtremes.d.ts +2 -5
- package/dist/react/components/AirExtremes.js +1 -2
- package/dist/react/components/AirMatrix.d.ts +2 -5
- package/dist/react/components/AirMatrix.js +1 -2
- package/dist/react/components/ClimatologyDailyPattern.d.ts +2 -5
- package/dist/react/components/ClimatologyDailyPattern.js +1 -2
- package/dist/react/components/ClimatologyRose.d.ts +2 -5
- package/dist/react/components/ClimatologyRose.js +1 -2
- package/dist/react/components/CompassFan.d.ts +2 -5
- package/dist/react/components/CompassFan.js +1 -2
- package/dist/react/components/CurrentConditions.d.ts +2 -5
- package/dist/react/components/CurrentConditions.js +1 -2
- package/dist/react/components/DailyPattern.d.ts +2 -5
- package/dist/react/components/DailyPattern.js +1 -2
- package/dist/react/components/Dial.d.ts +2 -5
- package/dist/react/components/Dial.js +1 -2
- package/dist/react/components/FavorableShare.d.ts +2 -5
- package/dist/react/components/FavorableShare.js +1 -2
- package/dist/react/components/FreshnessBadge.d.ts +2 -5
- package/dist/react/components/FreshnessBadge.js +1 -2
- package/dist/react/components/Readout.d.ts +2 -5
- package/dist/react/components/Readout.js +1 -2
- package/dist/react/components/RecentSummaries.d.ts +2 -5
- package/dist/react/components/RecentSummaries.js +1 -2
- package/dist/react/components/SceneTree.js +1 -2
- package/dist/react/components/Sparkline.d.ts +2 -5
- package/dist/react/components/Sparkline.js +1 -2
- package/dist/react/components/StationCard.d.ts +6 -8
- package/dist/react/components/StationCard.js +1 -2
- package/dist/react/components/StationFeedProvider.d.ts +3 -6
- package/dist/react/components/StationFeedProvider.js +1 -2
- package/dist/react/components/StationStrip.d.ts +2 -5
- package/dist/react/components/StationStrip.js +1 -2
- package/dist/react/components/StationTable.d.ts +3 -6
- package/dist/react/components/StationTable.js +1 -2
- package/dist/react/components/TrendChart.d.ts +2 -5
- package/dist/react/components/TrendChart.js +1 -2
- package/dist/react/components/WindArrow.d.ts +2 -5
- package/dist/react/components/WindArrow.js +1 -2
- package/dist/react/components/WindHistoryChart.d.ts +2 -5
- package/dist/react/components/WindHistoryChart.js +1 -2
- package/dist/react/components/WindRose.d.ts +2 -5
- package/dist/react/components/WindRose.js +1 -2
- package/dist/react/components/WindSampleStrip.d.ts +2 -5
- package/dist/react/components/WindSampleStrip.js +1 -2
- package/dist/react/components/atoms.d.ts +9 -11
- package/dist/react/components/atoms.js +1 -2
- package/dist/react/hooks/useFreshness.d.ts +1 -4
- package/dist/react/hooks/useFreshness.js +1 -2
- package/dist/react/hooks/useMeasuredChartWidth.d.ts +2 -5
- package/dist/react/hooks/useMeasuredChartWidth.js +1 -2
- package/dist/react/hooks/usePolledJson.js +1 -2
- package/dist/react/hooks/useStation.d.ts +2 -5
- package/dist/react/hooks/useStation.js +1 -2
- package/dist/react/hooks/useStationClimatology.d.ts +2 -5
- package/dist/react/hooks/useStationClimatology.js +1 -2
- package/dist/react/hooks/useStationCurrent.d.ts +2 -5
- package/dist/react/hooks/useStationCurrent.js +1 -2
- package/dist/react/hooks/useStationFeed.d.ts +2 -5
- package/dist/react/hooks/useStationFeed.js +1 -2
- package/dist/react/hooks/useStationLive.d.ts +2 -5
- package/dist/react/hooks/useStationLive.js +1 -2
- package/dist/react/lib/cells.js +1 -2
- package/dist/react/lib/use-pinned-cursor.js +1 -2
- package/dist/samples.d.ts +8 -11
- package/dist/samples.js +1 -2
- package/dist/scene/air-extremes.js +1 -2
- package/dist/scene/air-matrix.js +1 -2
- package/dist/scene/atoms.js +1 -2
- package/dist/scene/card.js +1 -2
- package/dist/scene/cells.js +1 -2
- package/dist/scene/chart.d.ts +2 -5
- package/dist/scene/chart.js +1 -2
- package/dist/scene/climatology-pattern.js +1 -2
- package/dist/scene/climatology-rose.js +1 -2
- package/dist/scene/compass-fan.js +1 -2
- package/dist/scene/current.js +1 -2
- package/dist/scene/daily-pattern.js +1 -2
- package/dist/scene/dial-parts.js +1 -2
- package/dist/scene/dial.js +1 -2
- package/dist/scene/favorable-share.js +1 -2
- package/dist/scene/glyphs.js +1 -2
- package/dist/scene/node.js +1 -2
- package/dist/scene/recent-summaries.js +1 -2
- package/dist/scene/rose.js +1 -2
- package/dist/scene/sample-strip.js +1 -2
- package/dist/scene/sparkline.js +1 -2
- package/dist/scene/strip.js +1 -2
- package/dist/scene/table.js +1 -2
- package/dist/scene/trend.js +1 -2
- package/dist/scene/wind-history.js +1 -2
- package/dist/scene/wind-plot.js +1 -2
- package/dist/server/adapter.d.ts +7 -10
- package/dist/server/adapter.js +1 -2
- package/dist/server/adapters/campbell.d.ts +11 -13
- package/dist/server/adapters/campbell.js +1 -2
- package/dist/server/adapters/ecowitt.d.ts +4 -7
- package/dist/server/adapters/ecowitt.js +1 -2
- package/dist/server/adapters/tempest.d.ts +4 -7
- package/dist/server/adapters/tempest.js +1 -2
- package/dist/server/adapters/windnerd-climatology.d.ts +5 -8
- package/dist/server/adapters/windnerd-climatology.js +1 -2
- package/dist/server/adapters/windnerd-live.d.ts +2 -5
- package/dist/server/adapters/windnerd-live.js +1 -2
- package/dist/server/adapters/windnerd.d.ts +22 -25
- package/dist/server/adapters/windnerd.js +1 -2
- package/dist/server/config.d.ts +18 -20
- package/dist/server/config.js +1 -2
- package/dist/server/environment.d.ts +20 -22
- package/dist/server/environment.js +1 -2
- package/dist/server/feed.d.ts +19 -21
- package/dist/server/feed.js +1 -2
- package/dist/server/handler.d.ts +4 -7
- package/dist/server/handler.js +1 -2
- package/dist/server/hologram.d.ts +9 -12
- package/dist/server/hologram.js +1 -2
- package/dist/server/live.d.ts +2 -5
- package/dist/server/live.js +1 -2
- package/dist/sse.js +1 -2
- package/dist/strings.d.ts +8 -11
- package/dist/strings.js +1 -2
- package/dist/windnerd.d.ts +4 -7
- package/dist/windnerd.js +1 -2
- package/package.json +9 -9
|
@@ -3,8 +3,7 @@ import { SpeedUnit } from "../../derive.js";
|
|
|
3
3
|
import { FormatTime, StationStringOverrides } from "../../strings.js";
|
|
4
4
|
import { FavorableDirection } from "../../instruments.js";
|
|
5
5
|
import "../../index.js";
|
|
6
|
-
|
|
7
|
-
declare function WindSampleStrip({ samples, stationName, unit: unitProp, favorableDirections: favorableDirectionsProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
6
|
+
export declare function WindSampleStrip({ samples, stationName, unit: unitProp, favorableDirections: favorableDirectionsProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
8
7
|
samples: LiveSamples | null | undefined;
|
|
9
8
|
stationName: string;
|
|
10
9
|
unit?: SpeedUnit;
|
|
@@ -12,6 +11,4 @@ declare function WindSampleStrip({ samples, stationName, unit: unitProp, favorab
|
|
|
12
11
|
plotHeight?: number;
|
|
13
12
|
strings?: StationStringOverrides;
|
|
14
13
|
formatTime?: FormatTime;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { WindSampleStrip };
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ import { Readout } from "./Readout.js";
|
|
|
9
9
|
import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
|
|
10
10
|
import { useRef } from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// src/react/components/WindSampleStrip.tsx
|
|
13
13
|
function WindSampleStrip({ samples, stationName, unit: unitProp, favorableDirections: favorableDirectionsProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }) {
|
|
14
14
|
const context = useStationFeedContext();
|
|
15
15
|
const { favorableDirections, formatTime, unit, words } = resolveDisplay(context, {
|
|
@@ -66,5 +66,4 @@ function MeasuredStrip({ favorableDirections, formatTime, plotHeight, samples, s
|
|
|
66
66
|
onPointerMove: pinned.handlePointerMove
|
|
67
67
|
}))] });
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { WindSampleStrip };
|
|
@@ -3,7 +3,6 @@ import { SpeedThresholds, SpeedUnit } from "../../derive.js";
|
|
|
3
3
|
import { FormatTime, StationStringOverrides } from "../../strings.js";
|
|
4
4
|
import { FavorableDirection } from "../../instruments.js";
|
|
5
5
|
import "../../index.js";
|
|
6
|
-
//#region src/react/components/atoms.d.ts
|
|
7
6
|
type AtomProps = {
|
|
8
7
|
station?: Station;
|
|
9
8
|
stationId?: string;
|
|
@@ -12,15 +11,15 @@ type AtomProps = {
|
|
|
12
11
|
type SpeedAtomProps = AtomProps & {
|
|
13
12
|
unit?: SpeedUnit;
|
|
14
13
|
};
|
|
15
|
-
declare function Speed(props: SpeedAtomProps): import("react").JSX.Element;
|
|
16
|
-
declare function Gust(props: SpeedAtomProps): import("react").JSX.Element;
|
|
17
|
-
declare function Lull(props: SpeedAtomProps): import("react").JSX.Element;
|
|
18
|
-
declare function Temperature({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").ReactNode;
|
|
19
|
-
declare function Pressure({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").ReactNode;
|
|
20
|
-
declare function Direction({ station: stationProp, stationId, strings: stringsProp, favorableDirections: favorableDirectionsProp }: AtomProps & {
|
|
14
|
+
export declare function Speed(props: SpeedAtomProps): import("react").JSX.Element;
|
|
15
|
+
export declare function Gust(props: SpeedAtomProps): import("react").JSX.Element;
|
|
16
|
+
export declare function Lull(props: SpeedAtomProps): import("react").JSX.Element;
|
|
17
|
+
export declare function Temperature({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").ReactNode;
|
|
18
|
+
export declare function Pressure({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").ReactNode;
|
|
19
|
+
export declare function Direction({ station: stationProp, stationId, strings: stringsProp, favorableDirections: favorableDirectionsProp }: AtomProps & {
|
|
21
20
|
favorableDirections?: FavorableDirection[] | null;
|
|
22
21
|
}): import("react").ReactNode;
|
|
23
|
-
declare function UpdatedAt({ station: stationProp, stationId, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
22
|
+
export declare function UpdatedAt({ station: stationProp, stationId, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
24
23
|
station?: Station;
|
|
25
24
|
stationId?: string;
|
|
26
25
|
servedAt?: string | null;
|
|
@@ -28,9 +27,8 @@ declare function UpdatedAt({ station: stationProp, stationId, servedAt: servedAt
|
|
|
28
27
|
strings?: StationStringOverrides;
|
|
29
28
|
formatTime?: FormatTime;
|
|
30
29
|
}): import("react").ReactNode;
|
|
31
|
-
declare function BandChip({ station: stationProp, stationId, thresholds: thresholdsProp, labels, unit: unitProp, strings: stringsProp }: SpeedAtomProps & {
|
|
30
|
+
export declare function BandChip({ station: stationProp, stationId, thresholds: thresholdsProp, labels, unit: unitProp, strings: stringsProp }: SpeedAtomProps & {
|
|
32
31
|
thresholds?: SpeedThresholds | null;
|
|
33
32
|
labels?: readonly string[];
|
|
34
33
|
}): import("react").ReactNode;
|
|
35
|
-
|
|
36
|
-
export { BandChip, Direction, Gust, Lull, Pressure, Speed, Temperature, UpdatedAt };
|
|
34
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { renderScene } from "./SceneTree.js";
|
|
|
7
7
|
import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/react/components/atoms.tsx
|
|
11
11
|
function useResolvedStation(component, stationProp, stationId) {
|
|
12
12
|
const context = useStationFeedContext();
|
|
13
13
|
return {
|
|
@@ -99,5 +99,4 @@ function BandChip({ station: stationProp, stationId, thresholds: thresholdsProp,
|
|
|
99
99
|
words
|
|
100
100
|
}));
|
|
101
101
|
}
|
|
102
|
-
//#endregion
|
|
103
102
|
export { BandChip, Direction, Gust, Lull, Pressure, Speed, Temperature, UpdatedAt };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { FreshnessStatus, FreshnessThresholds } from "../../derive.js";
|
|
2
2
|
import "../../index.js";
|
|
3
|
-
|
|
4
|
-
declare function useFreshness(observedAt: string | null | undefined, servedAt: string | null | undefined, receivedAtMs: number | null | undefined, thresholds?: FreshnessThresholds): FreshnessStatus | null;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { useFreshness };
|
|
3
|
+
export declare function useFreshness(observedAt: string | null | undefined, servedAt: string | null | undefined, receivedAtMs: number | null | undefined, thresholds?: FreshnessThresholds): FreshnessStatus | null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { freshness } from "../../derive.js";
|
|
3
3
|
import { subscribeTicker } from "../../client/ticker.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
|
|
5
|
+
// src/react/hooks/useFreshness.ts
|
|
6
6
|
function useFreshness(observedAt, servedAt, receivedAtMs, thresholds) {
|
|
7
7
|
const [nowMs, setNowMs] = useState(() => receivedAtMs ?? Date.now());
|
|
8
8
|
useEffect(() => {
|
|
@@ -17,5 +17,4 @@ function useFreshness(observedAt, servedAt, receivedAtMs, thresholds) {
|
|
|
17
17
|
nowMs
|
|
18
18
|
}, thresholds);
|
|
19
19
|
}
|
|
20
|
-
//#endregion
|
|
21
20
|
export { useFreshness };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
declare function useMeasuredChartWidth(ref: {
|
|
1
|
+
export declare function useMeasuredChartWidth(ref: {
|
|
3
2
|
readonly current: Element | null;
|
|
4
3
|
}, { enabled }?: {
|
|
5
4
|
enabled?: boolean;
|
|
6
|
-
}): number | null;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { useMeasuredChartWidth };
|
|
5
|
+
}): number | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { measuredChartWidth } from "../../geometry.js";
|
|
3
3
|
import { useEffect, useLayoutEffect, useState } from "react";
|
|
4
|
-
|
|
4
|
+
// src/react/hooks/useMeasuredChartWidth.ts
|
|
5
5
|
const useMeasureEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
6
6
|
function useMeasuredChartWidth(ref, { enabled = true } = {}) {
|
|
7
7
|
const [width, setWidth] = useState(null);
|
|
@@ -22,5 +22,4 @@ function useMeasuredChartWidth(ref, { enabled = true } = {}) {
|
|
|
22
22
|
}, [ref, enabled]);
|
|
23
23
|
return width;
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { useMeasuredChartWidth };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useSyncExternalStore } from "react";
|
|
3
|
-
|
|
3
|
+
// src/react/hooks/usePolledJson.ts
|
|
4
4
|
function usePoller(poller, enabled) {
|
|
5
5
|
const snapshot = useSyncExternalStore(poller.subscribe, poller.getSnapshot, poller.getSnapshot);
|
|
6
6
|
useEffect(() => {
|
|
@@ -13,5 +13,4 @@ function usePoller(poller, enabled) {
|
|
|
13
13
|
refresh: useCallback(() => poller.refresh(), [poller])
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { usePoller };
|
|
@@ -2,8 +2,7 @@ import { PollError } from "../../client/poll.js";
|
|
|
2
2
|
import { Station, StationFeed } from "../../contract.js";
|
|
3
3
|
import "../../client/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
|
|
6
|
-
declare function useStation(url: string, stationId: string, options?: {
|
|
5
|
+
export declare function useStation(url: string, stationId: string, options?: {
|
|
7
6
|
pollSeconds?: number;
|
|
8
7
|
currentPollSeconds?: number;
|
|
9
8
|
enabled?: boolean;
|
|
@@ -19,6 +18,4 @@ declare function useStation(url: string, stationId: string, options?: {
|
|
|
19
18
|
receivedAtMs: number | null;
|
|
20
19
|
error: PollError | null;
|
|
21
20
|
refresh: () => void;
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
export { useStation };
|
|
21
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createStationStore } from "../../client/stores.js";
|
|
3
3
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
4
|
-
|
|
4
|
+
// src/react/hooks/useStation.ts
|
|
5
5
|
function useStation(url, stationId, options = {}) {
|
|
6
6
|
const { pollSeconds, currentPollSeconds, enabled = true, fetchInit, initialData } = options;
|
|
7
7
|
const live = options.live === true;
|
|
@@ -36,5 +36,4 @@ function useStation(url, stationId, options = {}) {
|
|
|
36
36
|
refresh: () => store.refresh()
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { useStation };
|
|
@@ -2,10 +2,9 @@ import { PollError } from "../../client/poll.js";
|
|
|
2
2
|
import { StationClimatology } from "../../contract-climatology.js";
|
|
3
3
|
import "../../client/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
//#region src/react/hooks/useStationClimatology.d.ts
|
|
6
5
|
/** Fetches the station's climatology document once and holds it — near-
|
|
7
6
|
* immutable history needs no poller; filters re-aggregate client-side. */
|
|
8
|
-
declare function useStationClimatology(base: string, stationId: string, options?: {
|
|
7
|
+
export declare function useStationClimatology(base: string, stationId: string, options?: {
|
|
9
8
|
enabled?: boolean;
|
|
10
9
|
fetchInit?: RequestInit;
|
|
11
10
|
}): {
|
|
@@ -13,6 +12,4 @@ declare function useStationClimatology(base: string, stationId: string, options?
|
|
|
13
12
|
loading: boolean;
|
|
14
13
|
error: PollError | null;
|
|
15
14
|
refresh: () => void;
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { useStationClimatology };
|
|
15
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { climatologyEndpoint } from "../../endpoints.js";
|
|
3
3
|
import { createStationClimatologyStore } from "../../client/climatology.js";
|
|
4
4
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
|
-
|
|
5
|
+
// src/react/hooks/useStationClimatology.ts
|
|
6
6
|
/** Fetches the station's climatology document once and holds it — near-
|
|
7
7
|
* immutable history needs no poller; filters re-aggregate client-side. */
|
|
8
8
|
function useStationClimatology(base, stationId, options = {}) {
|
|
@@ -21,5 +21,4 @@ function useStationClimatology(base, stationId, options = {}) {
|
|
|
21
21
|
refresh: () => void store.refresh()
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { useStationClimatology };
|
|
@@ -2,8 +2,7 @@ import { PollError } from "../../client/poll.js";
|
|
|
2
2
|
import { Station, StationCurrent } from "../../contract.js";
|
|
3
3
|
import "../../client/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
|
|
6
|
-
declare function useStationCurrent(url: string, stationId: string, options?: {
|
|
5
|
+
export declare function useStationCurrent(url: string, stationId: string, options?: {
|
|
7
6
|
pollSeconds?: number;
|
|
8
7
|
enabled?: boolean;
|
|
9
8
|
fetchInit?: RequestInit;
|
|
@@ -18,6 +17,4 @@ declare function useStationCurrent(url: string, stationId: string, options?: {
|
|
|
18
17
|
error: PollError | null;
|
|
19
18
|
receivedAtMs: number | null;
|
|
20
19
|
refresh: () => void;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { useStationCurrent };
|
|
20
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createStationCurrentStore } from "../../client/stores.js";
|
|
3
3
|
import { usePoller } from "./usePolledJson.js";
|
|
4
4
|
import { useMemo, useRef } from "react";
|
|
5
|
-
|
|
5
|
+
// src/react/hooks/useStationCurrent.ts
|
|
6
6
|
function useStationCurrent(url, stationId, options = {}) {
|
|
7
7
|
const { pollSeconds, enabled = true, fetchInit, initialData } = options;
|
|
8
8
|
const fetchInitRef = useRef(fetchInit);
|
|
@@ -29,5 +29,4 @@ function useStationCurrent(url, stationId, options = {}) {
|
|
|
29
29
|
refresh
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { useStationCurrent };
|
|
@@ -2,8 +2,7 @@ import { PollError } from "../../client/poll.js";
|
|
|
2
2
|
import { StationFeed } from "../../contract.js";
|
|
3
3
|
import "../../client/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
|
|
6
|
-
declare function useStationFeed(url: string, options?: {
|
|
5
|
+
export declare function useStationFeed(url: string, options?: {
|
|
7
6
|
pollSeconds?: number;
|
|
8
7
|
enabled?: boolean;
|
|
9
8
|
fetchInit?: RequestInit;
|
|
@@ -16,6 +15,4 @@ declare function useStationFeed(url: string, options?: {
|
|
|
16
15
|
error: PollError | null;
|
|
17
16
|
receivedAtMs: number | null;
|
|
18
17
|
refresh: () => void;
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { useStationFeed };
|
|
18
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createStationFeedStore } from "../../client/stores.js";
|
|
3
3
|
import { usePoller } from "./usePolledJson.js";
|
|
4
4
|
import { useMemo, useRef } from "react";
|
|
5
|
-
|
|
5
|
+
// src/react/hooks/useStationFeed.ts
|
|
6
6
|
function useStationFeed(url, options = {}) {
|
|
7
7
|
const { pollSeconds, enabled = true, fetchInit, initialData } = options;
|
|
8
8
|
const fetchInitRef = useRef(fetchInit);
|
|
@@ -25,5 +25,4 @@ function useStationFeed(url, options = {}) {
|
|
|
25
25
|
refresh
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { useStationFeed };
|
|
@@ -3,8 +3,7 @@ import { LiveSample, Station } from "../../contract.js";
|
|
|
3
3
|
import { LiveStatus } from "../../client/live.js";
|
|
4
4
|
import "../../client/index.js";
|
|
5
5
|
import "../../index.js";
|
|
6
|
-
|
|
7
|
-
declare function useStationLive(url: string, stationId: string, options?: {
|
|
6
|
+
export declare function useStationLive(url: string, stationId: string, options?: {
|
|
8
7
|
enabled?: boolean;
|
|
9
8
|
fetchInit?: RequestInit;
|
|
10
9
|
windowSeconds?: number;
|
|
@@ -15,6 +14,4 @@ declare function useStationLive(url: string, stationId: string, options?: {
|
|
|
15
14
|
servedAt: string | null;
|
|
16
15
|
receivedAtMs: number | null;
|
|
17
16
|
error: PollError | null;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { useStationLive };
|
|
17
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createStationLiveStore } from "../../client/live.js";
|
|
3
3
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
4
|
-
|
|
4
|
+
// src/react/hooks/useStationLive.ts
|
|
5
5
|
function useStationLive(url, stationId, options = {}) {
|
|
6
6
|
const { enabled = true, fetchInit, windowSeconds } = options;
|
|
7
7
|
const fetchInitRef = useRef(fetchInit);
|
|
@@ -29,5 +29,4 @@ function useStationLive(url, stationId, options = {}) {
|
|
|
29
29
|
error: snapshot.error
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { useStationLive };
|
package/dist/react/lib/cells.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { stationNameNode } from "../../scene/cells.js";
|
|
3
3
|
import { renderChild } from "../components/SceneTree.js";
|
|
4
|
-
|
|
4
|
+
// src/react/lib/cells.tsx
|
|
5
5
|
function StationNameLink({ station }) {
|
|
6
6
|
return renderChild(stationNameNode(station), 0);
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { StationNameLink };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { activeChartIndex, chartIndexAtClient, togglePinnedAt } from "../../scene/chart.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
|
|
4
|
+
// src/react/lib/use-pinned-cursor.ts
|
|
5
5
|
function usePinnedCursor(scene) {
|
|
6
6
|
const [pinnedAt, setPinnedAt] = useState(null);
|
|
7
7
|
const [previewIndex, setPreviewIndex] = useState(null);
|
|
@@ -28,5 +28,4 @@ function usePinnedCursor(scene) {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { usePinnedCursor };
|
package/dist/samples.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { LiveSample, LiveSamples } from "./contract.js";
|
|
2
2
|
import { ChartFrame, ChartScaleOptions, ChartScales, Vane } from "./geometry.js";
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
|
|
10
|
-
type SamplesSummary = {
|
|
3
|
+
export declare const SAMPLE_GAP_TOLERANCE_FACTOR = 2.5;
|
|
4
|
+
export declare function sampleRuns(samples: LiveSamples, toleranceFactor?: number): LiveSample[][];
|
|
5
|
+
export declare function sampleScales(samples: LiveSamples, frame: ChartFrame, options?: ChartScaleOptions): ChartScales;
|
|
6
|
+
export declare function samplePoints(run: ReadonlyArray<LiveSample>, scales: ChartScales): string;
|
|
7
|
+
export declare function sampleMeanDirectionDeg(samples: ReadonlyArray<LiveSample>): number | null;
|
|
8
|
+
export declare function thinSampleVanes(samples: ReadonlyArray<LiveSample>, target?: number): Vane[];
|
|
9
|
+
export type SamplesSummary = {
|
|
11
10
|
latest: LiveSample;
|
|
12
11
|
peakMps: number;
|
|
13
12
|
peakAt: string;
|
|
@@ -15,6 +14,4 @@ type SamplesSummary = {
|
|
|
15
14
|
meanDirectionDeg: number | null;
|
|
16
15
|
spanSeconds: number;
|
|
17
16
|
};
|
|
18
|
-
declare function samplesSummary(samples: LiveSamples): SamplesSummary | null;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { SAMPLE_GAP_TOLERANCE_FACTOR, SamplesSummary, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, thinSampleVanes };
|
|
17
|
+
export declare function samplesSummary(samples: LiveSamples): SamplesSummary | null;
|
package/dist/samples.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HISTORY_GAP_TOLERANCE_FACTOR, chartScalesOf, meanDirectionDegOf, thinVanesOf, tracePointsOf } from "./geometry.js";
|
|
2
|
-
|
|
2
|
+
// src/samples.ts
|
|
3
3
|
const speedOf = (sample) => sample.windMps;
|
|
4
4
|
const directionOf = (sample) => sample.windDirectionDeg;
|
|
5
5
|
const SAMPLE_GAP_TOLERANCE_FACTOR = HISTORY_GAP_TOLERANCE_FACTOR;
|
|
@@ -48,5 +48,4 @@ function samplesSummary(samples) {
|
|
|
48
48
|
spanSeconds: (Date.parse(latest.observedAt) - Date.parse(first.observedAt)) / 1e3
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { SAMPLE_GAP_TOLERANCE_FACTOR, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, thinSampleVanes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lastNightLowC, pressureDeltaHpa } from "../derive.js";
|
|
2
2
|
import { temperatureValue } from "../format.js";
|
|
3
3
|
import { el, keyed } from "./node.js";
|
|
4
|
-
|
|
4
|
+
// src/scene/air-extremes.ts
|
|
5
5
|
const AIR_EXTREMES_CLASS = "meteo-air-extremes";
|
|
6
6
|
const PRESSURE_DELTA_WINDOW_HOURS = 3;
|
|
7
7
|
/** Null without served history — the tiles are functions of it; each tile
|
|
@@ -23,5 +23,4 @@ function airExtremesScene(input) {
|
|
|
23
23
|
class: AIR_EXTREMES_CLASS
|
|
24
24
|
}, tiles);
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { AIR_EXTREMES_CLASS, airExtremesScene };
|
package/dist/scene/air-matrix.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { airRows, airSummary, lastStrikeWords } from "../air.js";
|
|
2
2
|
import { el, keyed } from "./node.js";
|
|
3
|
-
|
|
3
|
+
// src/scene/air-matrix.ts
|
|
4
4
|
/** The disclosure's own words, plus the panel it opens. The shell stays
|
|
5
5
|
* with each binding: the trigger owns expansion state and its handler. */
|
|
6
6
|
function airMatrixScene(input) {
|
|
@@ -54,5 +54,4 @@ function airMatrixScene(input) {
|
|
|
54
54
|
panel
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { airMatrixScene };
|
package/dist/scene/atoms.js
CHANGED
|
@@ -2,7 +2,7 @@ import { compassDirection, isCalm, thresholdsToMps } from "../derive.js";
|
|
|
2
2
|
import { speedBand } from "../geometry.js";
|
|
3
3
|
import { readingAgeMs, roundSpeed, speedMpsOf, temperatureValue, updatedAtText } from "../format.js";
|
|
4
4
|
import { inDirectionArcs } from "@azohra/meteo.core";
|
|
5
|
-
|
|
5
|
+
// src/scene/atoms.ts
|
|
6
6
|
const valueContent = (value, shown, unitWord) => value == null ? {
|
|
7
7
|
kind: "dash",
|
|
8
8
|
text: "—"
|
|
@@ -100,5 +100,4 @@ function bandChipScene(input) {
|
|
|
100
100
|
text: labels?.[band] ?? `${roundSpeed(reading.windAvgMps, unit)} ${words.speedUnits[unit]}`
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
//#endregion
|
|
104
103
|
export { bandChipScene, directionAtomScene, pressureAtomScene, speedAtomScene, temperatureAtomScene, updatedAtScene };
|
package/dist/scene/card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { summaryEntries } from "../format.js";
|
|
2
2
|
import { el, keyed } from "./node.js";
|
|
3
3
|
import { freshnessBadgeNode } from "./glyphs.js";
|
|
4
|
-
|
|
4
|
+
// src/scene/card.ts
|
|
5
5
|
const STATION_CARD_CLASS = "meteo-station-card";
|
|
6
6
|
function cardPartThresholds(own, card) {
|
|
7
7
|
return (own === void 0 ? card : own ?? void 0) ?? null;
|
|
@@ -24,5 +24,4 @@ function summaryNode(station, unit, words, formatTime) {
|
|
|
24
24
|
class: "meteo-summary"
|
|
25
25
|
}, summary.entries.map((entry) => keyed(entry.label, "div", { class: "meteo-summary-item" }, el("dt", { class: "meteo-microlabel" }, entry.label), el("dd", void 0, entry.value))));
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { STATION_CARD_CLASS, cardHeaderNode, cardPartThresholds, cardPartWiringError, summaryNode };
|
package/dist/scene/cells.js
CHANGED
|
@@ -2,7 +2,7 @@ import { directionCell } from "../format.js";
|
|
|
2
2
|
import { el } from "./node.js";
|
|
3
3
|
import { bandChipScene, directionAtomScene, updatedAtScene } from "./atoms.js";
|
|
4
4
|
import { windArrowNode } from "./glyphs.js";
|
|
5
|
-
|
|
5
|
+
// src/scene/cells.ts
|
|
6
6
|
/** The direction reading: an arrow plus its compass point, or the word for
|
|
7
7
|
* calm, or a dash — one spelling for both display bindings. */
|
|
8
8
|
function directionCellNodes(windAvgMps, windDirectionDeg, words) {
|
|
@@ -47,5 +47,4 @@ function bandChipNode(input) {
|
|
|
47
47
|
"data-band": scene.band
|
|
48
48
|
}, scene.text);
|
|
49
49
|
}
|
|
50
|
-
//#endregion
|
|
51
50
|
export { bandChipNode, directionAtomNode, directionCellNodes, stationNameNode, updatedAtNode, valueAtomNode };
|
package/dist/scene/chart.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { TickAnchor, measuredChartWidth, tickAnchor } from "../geometry.js";
|
|
2
|
-
|
|
3
|
-
type ReadoutPart = {
|
|
2
|
+
export type ReadoutPart = {
|
|
4
3
|
kind: "text";
|
|
5
4
|
text: string;
|
|
6
5
|
} | {
|
|
7
6
|
kind: "arrow";
|
|
8
7
|
deg: number;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { ReadoutPart };
|
|
8
|
+
};
|
package/dist/scene/chart.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { measuredChartWidth, nearestIndex, tickAnchor } from "../geometry.js";
|
|
2
|
-
|
|
2
|
+
// src/scene/chart.ts
|
|
3
3
|
function pinnedIndexOf(points, pinnedAt) {
|
|
4
4
|
if (pinnedAt == null) return null;
|
|
5
5
|
const found = points.findIndex((point) => point.observedAt === pinnedAt);
|
|
@@ -19,5 +19,4 @@ function togglePinnedAt(current, observedAt) {
|
|
|
19
19
|
function readoutAriaLive(previewIndex) {
|
|
20
20
|
return previewIndex == null ? "polite" : "off";
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
export { activeChartIndex, chartIndexAtClient, measuredChartWidth, pinnedIndexOf, readoutAriaLive, tickAnchor, togglePinnedAt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { climatologyCoverage, climatologyPattern } from "../climatology.js";
|
|
2
2
|
import { el } from "./node.js";
|
|
3
3
|
import { dailyPatternSlotsScene } from "./daily-pattern.js";
|
|
4
|
-
|
|
4
|
+
// src/scene/climatology-pattern.ts
|
|
5
5
|
const CLIMATOLOGY_PATTERN_CLASS = "meteo-climatology-daily-pattern";
|
|
6
6
|
/** Whether the cube has anything to draw — the bindings consult it to
|
|
7
7
|
* decide whether to keep a width observer alive. */
|
|
@@ -30,5 +30,4 @@ function climatologyPatternScene(input) {
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { CLIMATOLOGY_PATTERN_CLASS, climatologyPatternScene, hasClimatology };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { climatologyCoverage, climatologyFavorableShare, climatologyRose } from "../climatology.js";
|
|
2
2
|
import { el, keyed } from "./node.js";
|
|
3
3
|
import { windRoseScene } from "./rose.js";
|
|
4
|
-
|
|
4
|
+
// src/scene/climatology-rose.ts
|
|
5
5
|
const CLIMATOLOGY_ROSE_CLASS = "meteo-climatology-rose";
|
|
6
6
|
function climatologyRoseScene(input) {
|
|
7
7
|
const { document, favorableDirections, filters, stationName, words } = input;
|
|
@@ -26,5 +26,4 @@ function climatologyRoseScene(input) {
|
|
|
26
26
|
words
|
|
27
27
|
}, captions));
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { CLIMATOLOGY_ROSE_CLASS, climatologyRoseScene };
|
|
@@ -3,7 +3,7 @@ import { vanePath } from "../geometry.js";
|
|
|
3
3
|
import { dialPolar } from "../instruments.js";
|
|
4
4
|
import { el, keyed } from "./node.js";
|
|
5
5
|
import { dialHub, dialLetters, dialNeedle, dialRing, dialTicks, dialVerdictRing } from "./dial-parts.js";
|
|
6
|
-
|
|
6
|
+
// src/scene/compass-fan.ts
|
|
7
7
|
const FAN_RADIUS = 58;
|
|
8
8
|
const FAN_GHOST_STEPS = 10;
|
|
9
9
|
function compassFanSource(samples, station) {
|
|
@@ -39,5 +39,4 @@ function compassFanScene(input) {
|
|
|
39
39
|
})];
|
|
40
40
|
}), newestBlowing && newest.windDirectionDeg != null ? dialNeedle(newest.windDirectionDeg) : null, dialHub());
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { compassFanScene, compassFanSource };
|
package/dist/scene/current.js
CHANGED
|
@@ -4,7 +4,7 @@ import "../instruments.js";
|
|
|
4
4
|
import { el } from "./node.js";
|
|
5
5
|
import { freshnessBadgeNode, windArrowNode } from "./glyphs.js";
|
|
6
6
|
import { dialScene } from "./dial.js";
|
|
7
|
-
|
|
7
|
+
// src/scene/current.ts
|
|
8
8
|
function currentConditionsScene(input) {
|
|
9
9
|
const { bezelId, favorableDirections, formatTime, freshness, station, thresholds, unit, words } = input;
|
|
10
10
|
const reading = station.status === "ok" ? station.reading : null;
|
|
@@ -35,5 +35,4 @@ function currentConditionsScene(input) {
|
|
|
35
35
|
words
|
|
36
36
|
}), station.capabilities.gustLull ? flank({ class: "meteo-current-flank meteo-current-flank-gust" }, words.gustLabel, reading?.windGustMps) : null), el("p", { class: "meteo-current-direction" }, directionChildren), station.capabilities.temperature ? el("p", { class: "meteo-current-temp" }, temperatureText(reading?.temperatureC ?? null, words), reading?.windChillC != null ? el("span", { class: "meteo-current-chill" }, ` · ${words.feelsLikeLabel} ${temperatureValue(reading.windChillC)} ${words.degC}`) : null) : null, el("p", { class: "meteo-current-footer" }, freshness != null ? freshnessBadgeNode(freshness, words) : null, el("span", { class: "meteo-current-observed" }, reading == null ? "—" : formatTime(new Date(reading.observedAt)))));
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { currentConditionsScene };
|
|
@@ -3,7 +3,7 @@ import { dailyPattern, thinVanes } from "../geometry.js";
|
|
|
3
3
|
import { roundSpeed } from "../format.js";
|
|
4
4
|
import { el } from "./node.js";
|
|
5
5
|
import { calmNoteText, displaySpeedScales, gapHatchPattern, gapHatchRect, gradedMeanTrace, speedGridLines, stretchedChartFrame, vaneCells, vaneGuideLines, vaneTickTexts, windRowLabels, windThresholdGuides, windZoneRects } from "./wind-plot.js";
|
|
6
|
-
|
|
6
|
+
// src/scene/daily-pattern.ts
|
|
7
7
|
const DAILY_PATTERN_CLASS = "meteo-daily-pattern";
|
|
8
8
|
const SYNTHETIC_EPOCH_MS = Date.parse("2000-01-01T00:00:00Z");
|
|
9
9
|
function dailyPatternSource(points, station) {
|
|
@@ -84,5 +84,4 @@ function dailyPatternSlotsScene(input) {
|
|
|
84
84
|
key: String(vane.key)
|
|
85
85
|
}]), vaneTickTexts(vanes, frame, scales, (timeMs) => formatMinuteOfDay((timeMs - SYNTHETIC_EPOCH_MS) / 6e4)))];
|
|
86
86
|
}
|
|
87
|
-
//#endregion
|
|
88
87
|
export { DAILY_PATTERN_CLASS, dailyPatternGate, dailyPatternScene, dailyPatternSlotsScene, dailyPatternSource };
|
package/dist/scene/dial-parts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DIAL_CARDINALS, DIAL_COUNTERWEIGHT_RADIUS, dialNeedlePoints, dialPolar, dialRingArcPath } from "../instruments.js";
|
|
2
2
|
import { el, keyed } from "./node.js";
|
|
3
|
-
|
|
3
|
+
// src/scene/dial-parts.ts
|
|
4
4
|
function dialRing() {
|
|
5
5
|
return el("circle", {
|
|
6
6
|
class: "meteo-wind-dial-ring",
|
|
@@ -66,5 +66,4 @@ function dialHub() {
|
|
|
66
66
|
r: 36
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { dialHub, dialLetters, dialNeedle, dialRing, dialTicks, dialVerdictRing };
|
package/dist/scene/dial.js
CHANGED
|
@@ -4,7 +4,7 @@ import { roundSpeed } from "../format.js";
|
|
|
4
4
|
import { dialScaleMaxMps, dialSpeedArcPath } from "../instruments.js";
|
|
5
5
|
import { el, keyed } from "./node.js";
|
|
6
6
|
import { dialHub, dialLetters, dialNeedle, dialRing, dialTicks, dialVerdictRing } from "./dial-parts.js";
|
|
7
|
-
|
|
7
|
+
// src/scene/dial.ts
|
|
8
8
|
function dialScene(input) {
|
|
9
9
|
const { bezelId, calmWord, favorableDirections, size, station, thresholds, unit, words } = input;
|
|
10
10
|
const shown = (windAvgMps) => roundSpeed(windAvgMps, unit);
|
|
@@ -62,5 +62,4 @@ function dialScene(input) {
|
|
|
62
62
|
d: dialSpeedArcPath(arcFraction)
|
|
63
63
|
}) : null, dialTicks(), dialLetters(), blowing && reading.windDirectionDeg != null ? dialNeedle(reading.windDirectionDeg) : null, dialHub(), centre);
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
export { dialScene };
|