@azohra/meteo.station 0.3.1 → 0.5.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/dist/client/climatology.d.ts +27 -0
- package/dist/client/climatology.js +83 -0
- package/dist/client/history.d.ts +47 -0
- package/dist/client/history.js +112 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +3 -1
- package/dist/client/live.js +15 -0
- package/dist/climatology.d.ts +66 -0
- package/dist/climatology.js +230 -0
- package/dist/contract-climatology.d.ts +73 -0
- package/dist/contract-climatology.js +52 -0
- package/dist/contract.d.ts +234 -1
- package/dist/contract.js +52 -4
- package/dist/derive.d.ts +23 -1
- package/dist/derive.js +43 -4
- package/dist/display.d.ts +4 -0
- package/dist/display.js +2 -1
- package/dist/elements/elements/AirExtremesElement.d.ts +8 -0
- package/dist/elements/elements/AirExtremesElement.js +33 -0
- package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +15 -0
- package/dist/elements/elements/ClimatologyDailyPatternElement.js +84 -0
- package/dist/elements/elements/ClimatologyRoseElement.d.ts +14 -0
- package/dist/elements/elements/ClimatologyRoseElement.js +51 -0
- package/dist/elements/elements/CompassFanElement.d.ts +14 -0
- package/dist/elements/elements/CompassFanElement.js +92 -0
- package/dist/elements/elements/DailyPatternElement.d.ts +1 -0
- package/dist/elements/elements/DailyPatternElement.js +24 -16
- package/dist/elements/elements/DialElement.js +14 -3
- package/dist/elements/elements/FavorableShareElement.d.ts +14 -0
- package/dist/elements/elements/FavorableShareElement.js +47 -0
- package/dist/elements/elements/RecentSummariesElement.d.ts +14 -0
- package/dist/elements/elements/RecentSummariesElement.js +54 -0
- package/dist/elements/elements/StationFeedElement.d.ts +3 -0
- package/dist/elements/elements/StationFeedElement.js +13 -2
- package/dist/elements/elements/WindHistoryChartElement.js +20 -7
- package/dist/elements/elements/WindRoseElement.d.ts +1 -3
- package/dist/elements/elements/WindRoseElement.js +60 -62
- package/dist/elements/elements/atoms.js +3 -3
- package/dist/elements/index.d.ts +13 -1
- package/dist/elements/index.js +15 -3
- package/dist/elements/lib/ambient.d.ts +2 -0
- package/dist/elements/lib/attributes.js +24 -1
- package/dist/elements/lib/base.d.ts +3 -0
- package/dist/elements/lib/base.js +14 -2
- package/dist/endpoints.d.ts +7 -1
- package/dist/endpoints.js +13 -1
- package/dist/geometry.d.ts +23 -4
- package/dist/geometry.js +44 -13
- package/dist/index.d.ts +8 -6
- package/dist/index.js +8 -6
- package/dist/instruments.d.ts +7 -5
- package/dist/instruments.js +20 -7
- package/dist/merge-current.js +2 -1
- package/dist/react/components/AirExtremes.d.ts +16 -0
- package/dist/react/components/AirExtremes.js +38 -0
- package/dist/react/components/ClimatologyDailyPattern.d.ts +20 -0
- package/dist/react/components/ClimatologyDailyPattern.js +59 -0
- package/dist/react/components/ClimatologyRose.d.ts +18 -0
- package/dist/react/components/ClimatologyRose.js +45 -0
- package/dist/react/components/CompassFan.d.ts +17 -0
- package/dist/react/components/CompassFan.js +93 -0
- package/dist/react/components/DailyPattern.d.ts +4 -1
- package/dist/react/components/DailyPattern.js +15 -8
- package/dist/react/components/Dial.d.ts +3 -1
- package/dist/react/components/Dial.js +13 -2
- package/dist/react/components/FavorableShare.d.ts +14 -0
- package/dist/react/components/FavorableShare.js +43 -0
- package/dist/react/components/RecentSummaries.d.ts +18 -0
- package/dist/react/components/RecentSummaries.js +64 -0
- package/dist/react/components/StationFeedProvider.d.ts +4 -1
- package/dist/react/components/StationFeedProvider.js +5 -3
- package/dist/react/components/WindHistoryChart.d.ts +6 -1
- package/dist/react/components/WindHistoryChart.js +20 -5
- package/dist/react/components/WindRose.d.ts +4 -2
- package/dist/react/components/WindRose.js +80 -71
- package/dist/react/components/WindSampleStrip.d.ts +3 -1
- package/dist/react/components/WindSampleStrip.js +8 -5
- package/dist/react/components/atoms.d.ts +4 -1
- package/dist/react/components/atoms.js +6 -3
- package/dist/react/hooks/useStationClimatology.d.ts +18 -0
- package/dist/react/hooks/useStationClimatology.js +25 -0
- package/dist/react/index.d.ts +10 -3
- package/dist/react/index.js +9 -2
- package/dist/scene/air-extremes.d.ts +2 -0
- package/dist/scene/air-extremes.js +42 -0
- package/dist/scene/atoms.d.ts +2 -1
- package/dist/scene/atoms.js +6 -4
- package/dist/scene/climatology-pattern.d.ts +6 -0
- package/dist/scene/climatology-pattern.js +35 -0
- package/dist/scene/climatology-rose.d.ts +5 -0
- package/dist/scene/climatology-rose.js +49 -0
- package/dist/scene/compass-fan.d.ts +3 -0
- package/dist/scene/compass-fan.js +115 -0
- package/dist/scene/daily-pattern.d.ts +1 -0
- package/dist/scene/daily-pattern.js +21 -7
- package/dist/scene/dial.d.ts +1 -0
- package/dist/scene/dial.js +16 -3
- package/dist/scene/favorable-share.d.ts +3 -0
- package/dist/scene/favorable-share.js +41 -0
- package/dist/scene/index.d.ts +9 -3
- package/dist/scene/recent-summaries.d.ts +4 -0
- package/dist/scene/recent-summaries.js +75 -0
- package/dist/scene/rose.d.ts +2 -1
- package/dist/scene/rose.js +18 -3
- package/dist/scene/sample-strip.d.ts +1 -0
- package/dist/scene/sample-strip.js +1 -1
- package/dist/scene/trend.js +2 -7
- package/dist/scene/wind-history.d.ts +1 -0
- package/dist/scene/wind-history.js +4 -3
- package/dist/scene/wind-plot.d.ts +1 -0
- package/dist/scene/wind-plot.js +44 -9
- package/dist/server/adapter.d.ts +2 -1
- package/dist/server/adapter.js +2 -1
- package/dist/server/adapters/windnerd-climatology.d.ts +30 -0
- package/dist/server/adapters/windnerd-climatology.js +82 -0
- package/dist/server/adapters/windnerd-live.d.ts +5 -8
- package/dist/server/adapters/windnerd-live.js +26 -21
- package/dist/server/adapters/windnerd.d.ts +31 -4
- package/dist/server/adapters/windnerd.js +196 -19
- package/dist/server/environment.d.ts +4 -10
- package/dist/server/environment.js +4 -10
- package/dist/server/feed.d.ts +44 -2
- package/dist/server/feed.js +63 -2
- package/dist/server/handler.d.ts +11 -1
- package/dist/server/handler.js +83 -2
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +4 -3
- package/dist/strings.d.ts +13 -1
- package/dist/strings.js +13 -1
- package/package.json +2 -2
- package/schema/example-climatology.json +86 -0
- package/schema/example-history.json +38 -0
- package/schema/stationclimatology.schema.json +221 -0
- package/schema/stationcurrent.schema.json +173 -0
- package/schema/stationfeed.schema.json +173 -0
- package/schema/stationhistory.schema.json +186 -0
- package/schema/stationlive.schema.json +202 -0
- package/styles.css +232 -19
|
@@ -8,13 +8,14 @@ import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
|
|
|
8
8
|
import { useId, useRef, useState } from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/react/components/WindHistoryChart.tsx
|
|
11
|
-
function WindHistoryChart({ station: stationProp, stationId, thresholds: thresholdsProp, unit: unitProp, plotHeight, windowHours, compareOffsetDays, strings: stringsProp, formatTime: formatTimeProp }) {
|
|
11
|
+
function WindHistoryChart({ station: stationProp, stationId, thresholds: thresholdsProp, favorableDirections: favorableDirectionsProp, unit: unitProp, plotHeight, windowHours, compareOffsetDays, nightShading = false, strings: stringsProp, formatTime: formatTimeProp }) {
|
|
12
12
|
const context = useStationFeedContext();
|
|
13
13
|
const station = requireResolved("WindHistoryChart", "station", stationProp ?? resolveStation(context, stationId));
|
|
14
|
-
const { formatTime, thresholds, unit, words } = resolveDisplay(context, {
|
|
14
|
+
const { favorableDirections, formatTime, thresholds, unit, words } = resolveDisplay(context, {
|
|
15
15
|
formatTime: formatTimeProp,
|
|
16
16
|
strings: stringsProp,
|
|
17
17
|
thresholds: thresholdsProp,
|
|
18
|
+
favorableDirections: favorableDirectionsProp,
|
|
18
19
|
unit: unitProp
|
|
19
20
|
});
|
|
20
21
|
const wrapRef = useRef(null);
|
|
@@ -31,8 +32,13 @@ function WindHistoryChart({ station: stationProp, stationId, thresholds: thresho
|
|
|
31
32
|
ref: wrapRef,
|
|
32
33
|
children: width != null && /* @__PURE__ */ jsx(MeasuredChart, {
|
|
33
34
|
compareOffsetDays,
|
|
35
|
+
favorableDirections,
|
|
34
36
|
formatTime,
|
|
35
37
|
history: gate.history,
|
|
38
|
+
night: nightShading ? {
|
|
39
|
+
latitude: station.latitude,
|
|
40
|
+
longitude: station.longitude
|
|
41
|
+
} : null,
|
|
36
42
|
plotHeight,
|
|
37
43
|
stationName: station.name,
|
|
38
44
|
thresholds,
|
|
@@ -43,15 +49,17 @@ function WindHistoryChart({ station: stationProp, stationId, thresholds: thresho
|
|
|
43
49
|
})
|
|
44
50
|
});
|
|
45
51
|
}
|
|
46
|
-
function MeasuredChart({ compareOffsetDays, formatTime, history, plotHeight, stationName, thresholds, unit, width, windowHours, words }) {
|
|
52
|
+
function MeasuredChart({ compareOffsetDays, favorableDirections, formatTime, history, night, plotHeight, stationName, thresholds, unit, width, windowHours, words }) {
|
|
47
53
|
const hatchId = `meteo-hatch-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
48
54
|
const [pinnedAt, setPinnedAt] = useState(null);
|
|
49
55
|
const [previewIndex, setPreviewIndex] = useState(null);
|
|
50
56
|
const scene = windChartScene({
|
|
51
57
|
compareOffsetDays,
|
|
58
|
+
favorableDirections,
|
|
52
59
|
formatTime,
|
|
53
60
|
hatchId,
|
|
54
61
|
history,
|
|
62
|
+
night,
|
|
55
63
|
plotHeight,
|
|
56
64
|
stationName,
|
|
57
65
|
thresholds,
|
|
@@ -122,6 +130,13 @@ function MeasuredChart({ compareOffsetDays, formatTime, history, plotHeight, sta
|
|
|
122
130
|
x: zone.x,
|
|
123
131
|
y: zone.y
|
|
124
132
|
}, zone.key)),
|
|
133
|
+
scene.nightRects.map((rect) => /* @__PURE__ */ jsx("rect", {
|
|
134
|
+
className: rect.className,
|
|
135
|
+
height: rect.height,
|
|
136
|
+
width: rect.width,
|
|
137
|
+
x: rect.x,
|
|
138
|
+
y: rect.y
|
|
139
|
+
}, rect.key)),
|
|
125
140
|
scene.grid.map(({ key, line, label }) => /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
|
|
126
141
|
className: line.className,
|
|
127
142
|
x1: line.x1,
|
|
@@ -206,7 +221,7 @@ function MeasuredChart({ compareOffsetDays, formatTime, history, plotHeight, sta
|
|
|
206
221
|
className: vane.mark.className,
|
|
207
222
|
d: vane.mark.d
|
|
208
223
|
}, vane.key)),
|
|
209
|
-
scene.vanes.map((vane) => /* @__PURE__ */ jsx("text", {
|
|
224
|
+
scene.vanes.map((vane) => vane.label && /* @__PURE__ */ jsx("text", {
|
|
210
225
|
className: vane.label.className,
|
|
211
226
|
textAnchor: vane.label.anchor,
|
|
212
227
|
x: vane.label.x,
|
|
@@ -220,7 +235,7 @@ function MeasuredChart({ compareOffsetDays, formatTime, history, plotHeight, sta
|
|
|
220
235
|
y: scene.rowLabels.avg.y,
|
|
221
236
|
children: scene.rowLabels.avg.text
|
|
222
237
|
}),
|
|
223
|
-
scene.vanes.map((vane) => /* @__PURE__ */ jsx("text", {
|
|
238
|
+
scene.vanes.map((vane) => vane.value && /* @__PURE__ */ jsx("text", {
|
|
224
239
|
className: vane.value.className,
|
|
225
240
|
textAnchor: vane.value.anchor,
|
|
226
241
|
x: vane.value.x,
|
|
@@ -3,14 +3,16 @@ import { SpeedThresholds } from "../../derive.js";
|
|
|
3
3
|
import { StationStringOverrides } from "../../strings.js";
|
|
4
4
|
import { FavorableDirection } from "../../instruments.js";
|
|
5
5
|
import "../../index.js";
|
|
6
|
+
import "../../scene/index.js";
|
|
7
|
+
import { ReactNode } from "react";
|
|
6
8
|
//#region src/react/components/WindRose.d.ts
|
|
7
|
-
declare function WindRose({ station: stationProp, stationId, points, sectorCount, thresholds: thresholdsProp, favorableDirections, strings: stringsProp }: {
|
|
9
|
+
declare function WindRose({ station: stationProp, stationId, points, sectorCount, thresholds: thresholdsProp, favorableDirections: favorableDirectionsProp, strings: stringsProp }: {
|
|
8
10
|
station?: Station;
|
|
9
11
|
stationId?: string;
|
|
10
12
|
points?: HistoryPoint[];
|
|
11
13
|
sectorCount?: number;
|
|
12
14
|
thresholds?: SpeedThresholds | null;
|
|
13
|
-
favorableDirections?: FavorableDirection[];
|
|
15
|
+
favorableDirections?: FavorableDirection[] | null;
|
|
14
16
|
strings?: StationStringOverrides;
|
|
15
17
|
}): import("react").JSX.Element;
|
|
16
18
|
//#endregion
|
|
@@ -4,12 +4,13 @@ import { windRoseGate, windRoseScene, windRoseSource } from "../../scene/rose.js
|
|
|
4
4
|
import { resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/components/WindRose.tsx
|
|
7
|
-
function WindRose({ station: stationProp, stationId, points, sectorCount = 16, thresholds: thresholdsProp, favorableDirections, strings: stringsProp }) {
|
|
7
|
+
function WindRose({ station: stationProp, stationId, points, sectorCount = 16, thresholds: thresholdsProp, favorableDirections: favorableDirectionsProp, strings: stringsProp }) {
|
|
8
8
|
const context = useStationFeedContext();
|
|
9
9
|
const station = stationProp ?? (points == null ? resolveStation(context, stationId) ?? void 0 : void 0);
|
|
10
|
-
const { thresholds, words } = resolveDisplay(context, {
|
|
10
|
+
const { favorableDirections, thresholds, words } = resolveDisplay(context, {
|
|
11
11
|
strings: stringsProp,
|
|
12
|
-
thresholds: thresholdsProp
|
|
12
|
+
thresholds: thresholdsProp,
|
|
13
|
+
favorableDirections: favorableDirectionsProp
|
|
13
14
|
});
|
|
14
15
|
const source = windRoseSource(points, station);
|
|
15
16
|
const gate = windRoseGate(source, words);
|
|
@@ -18,82 +19,90 @@ function WindRose({ station: stationProp, stationId, points, sectorCount = 16, t
|
|
|
18
19
|
role: "note",
|
|
19
20
|
children: gate.text
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
+
return /* @__PURE__ */ jsx(WindRoseSceneView, { scene: windRoseScene({
|
|
22
23
|
favorableDirections,
|
|
23
24
|
sectorCount,
|
|
24
25
|
source,
|
|
25
26
|
stationName: station?.name,
|
|
26
27
|
thresholds,
|
|
27
28
|
words
|
|
28
|
-
});
|
|
29
|
+
}) });
|
|
30
|
+
}
|
|
31
|
+
/** One scene, one drawing — shared by the history-fed rose above and the
|
|
32
|
+
* climatology-fed twin, which appends its caption row as children. */
|
|
33
|
+
function WindRoseSceneView({ scene, children }) {
|
|
29
34
|
return /* @__PURE__ */ jsxs("div", {
|
|
30
35
|
className: scene.className,
|
|
31
|
-
children: [
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("svg", {
|
|
38
|
+
"aria-label": scene.svg.ariaLabel,
|
|
39
|
+
className: scene.svg.className,
|
|
40
|
+
height: scene.svg.height,
|
|
41
|
+
role: "img",
|
|
42
|
+
viewBox: scene.svg.viewBox,
|
|
43
|
+
width: scene.svg.width,
|
|
44
|
+
children: [
|
|
45
|
+
scene.gridCircles.map((circle) => /* @__PURE__ */ jsx("circle", {
|
|
46
|
+
className: circle.className,
|
|
47
|
+
cx: circle.cx,
|
|
48
|
+
cy: circle.cy,
|
|
49
|
+
r: circle.r
|
|
50
|
+
}, circle.key)),
|
|
51
|
+
scene.ring && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
52
|
+
className: scene.ring.unfavorable.className,
|
|
53
|
+
cx: scene.ring.unfavorable.cx,
|
|
54
|
+
cy: scene.ring.unfavorable.cy,
|
|
55
|
+
r: scene.ring.unfavorable.r
|
|
56
|
+
}), scene.ring.favorable.map((arc) => /* @__PURE__ */ jsx("path", {
|
|
57
|
+
className: arc.className,
|
|
58
|
+
d: arc.d
|
|
59
|
+
}, arc.key))] }),
|
|
60
|
+
scene.ticks.map((tick) => /* @__PURE__ */ jsx("line", {
|
|
61
|
+
className: tick.className,
|
|
62
|
+
x1: tick.x1,
|
|
63
|
+
x2: tick.x2,
|
|
64
|
+
y1: tick.y1,
|
|
65
|
+
y2: tick.y2
|
|
66
|
+
}, tick.key)),
|
|
67
|
+
scene.letters.map((letter) => /* @__PURE__ */ jsx("text", {
|
|
68
|
+
className: letter.className,
|
|
69
|
+
textAnchor: letter.anchor,
|
|
70
|
+
x: letter.x,
|
|
71
|
+
y: letter.y,
|
|
72
|
+
children: letter.text
|
|
73
|
+
}, letter.key)),
|
|
74
|
+
scene.petals.map((petal) => /* @__PURE__ */ jsx("path", {
|
|
75
|
+
className: petal.className,
|
|
76
|
+
d: petal.d
|
|
77
|
+
}, petal.key)),
|
|
78
|
+
scene.ringLabel && /* @__PURE__ */ jsx("text", {
|
|
79
|
+
className: scene.ringLabel.className,
|
|
80
|
+
textAnchor: scene.ringLabel.anchor,
|
|
81
|
+
x: scene.ringLabel.x,
|
|
82
|
+
y: scene.ringLabel.y,
|
|
83
|
+
children: scene.ringLabel.text
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx("circle", {
|
|
86
|
+
className: scene.hub.className,
|
|
87
|
+
cx: scene.hub.cx,
|
|
88
|
+
cy: scene.hub.cy,
|
|
89
|
+
r: scene.hub.r
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsx("circle", {
|
|
92
|
+
className: scene.dot.className,
|
|
93
|
+
cx: scene.dot.cx,
|
|
94
|
+
cy: scene.dot.cy,
|
|
95
|
+
r: scene.dot.r
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
scene.calmCaption && /* @__PURE__ */ jsx("p", {
|
|
100
|
+
className: scene.calmCaption.className,
|
|
101
|
+
children: scene.calmCaption.text
|
|
102
|
+
}),
|
|
103
|
+
children
|
|
104
|
+
]
|
|
96
105
|
});
|
|
97
106
|
}
|
|
98
107
|
//#endregion
|
|
99
|
-
export { WindRose };
|
|
108
|
+
export { WindRose, WindRoseSceneView };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { LiveSamples } from "../../contract.js";
|
|
2
2
|
import { SpeedUnit } from "../../derive.js";
|
|
3
3
|
import { FormatTime, StationStringOverrides } from "../../strings.js";
|
|
4
|
+
import { FavorableDirection } from "../../instruments.js";
|
|
4
5
|
import "../../index.js";
|
|
5
6
|
//#region src/react/components/WindSampleStrip.d.ts
|
|
6
|
-
declare function WindSampleStrip({ samples, stationName, unit: unitProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
7
|
+
declare function WindSampleStrip({ samples, stationName, unit: unitProp, favorableDirections: favorableDirectionsProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
7
8
|
samples: LiveSamples | null | undefined;
|
|
8
9
|
stationName: string;
|
|
9
10
|
unit?: SpeedUnit;
|
|
11
|
+
favorableDirections?: FavorableDirection[] | null;
|
|
10
12
|
plotHeight?: number;
|
|
11
13
|
strings?: StationStringOverrides;
|
|
12
14
|
formatTime?: FormatTime;
|
|
@@ -8,10 +8,11 @@ import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
|
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/react/components/WindSampleStrip.tsx
|
|
11
|
-
function WindSampleStrip({ samples, stationName, unit: unitProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }) {
|
|
12
|
-
const { formatTime, unit, words } = resolveDisplay(useStationFeedContext(), {
|
|
11
|
+
function WindSampleStrip({ samples, stationName, unit: unitProp, favorableDirections: favorableDirectionsProp, plotHeight, strings: stringsProp, formatTime: formatTimeProp }) {
|
|
12
|
+
const { favorableDirections, formatTime, unit, words } = resolveDisplay(useStationFeedContext(), {
|
|
13
13
|
formatTime: formatTimeProp,
|
|
14
14
|
strings: stringsProp,
|
|
15
|
+
favorableDirections: favorableDirectionsProp,
|
|
15
16
|
unit: unitProp
|
|
16
17
|
});
|
|
17
18
|
const wrapRef = useRef(null);
|
|
@@ -26,6 +27,7 @@ function WindSampleStrip({ samples, stationName, unit: unitProp, plotHeight, str
|
|
|
26
27
|
className: SAMPLE_STRIP_CLASS,
|
|
27
28
|
ref: wrapRef,
|
|
28
29
|
children: width != null && /* @__PURE__ */ jsx(MeasuredStrip, {
|
|
30
|
+
favorableDirections,
|
|
29
31
|
formatTime,
|
|
30
32
|
plotHeight,
|
|
31
33
|
samples: gate.samples,
|
|
@@ -36,10 +38,11 @@ function WindSampleStrip({ samples, stationName, unit: unitProp, plotHeight, str
|
|
|
36
38
|
})
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
|
-
function MeasuredStrip({ formatTime, plotHeight, samples, stationName, unit, width, words }) {
|
|
41
|
+
function MeasuredStrip({ favorableDirections, formatTime, plotHeight, samples, stationName, unit, width, words }) {
|
|
40
42
|
const [pinnedAt, setPinnedAt] = useState(null);
|
|
41
43
|
const [previewIndex, setPreviewIndex] = useState(null);
|
|
42
44
|
const scene = sampleStripScene({
|
|
45
|
+
favorableDirections,
|
|
43
46
|
formatTime,
|
|
44
47
|
plotHeight,
|
|
45
48
|
samples,
|
|
@@ -134,7 +137,7 @@ function MeasuredStrip({ formatTime, plotHeight, samples, stationName, unit, wid
|
|
|
134
137
|
className: vane.mark.className,
|
|
135
138
|
d: vane.mark.d
|
|
136
139
|
}, vane.key)),
|
|
137
|
-
scene.vanes.map((vane) => /* @__PURE__ */ jsx("text", {
|
|
140
|
+
scene.vanes.map((vane) => vane.label && /* @__PURE__ */ jsx("text", {
|
|
138
141
|
className: vane.label.className,
|
|
139
142
|
textAnchor: vane.label.anchor,
|
|
140
143
|
x: vane.label.x,
|
|
@@ -148,7 +151,7 @@ function MeasuredStrip({ formatTime, plotHeight, samples, stationName, unit, wid
|
|
|
148
151
|
y: scene.rowLabels.avg.y,
|
|
149
152
|
children: scene.rowLabels.avg.text
|
|
150
153
|
}),
|
|
151
|
-
scene.vanes.map((vane) => /* @__PURE__ */ jsx("text", {
|
|
154
|
+
scene.vanes.map((vane) => vane.value && /* @__PURE__ */ jsx("text", {
|
|
152
155
|
className: vane.value.className,
|
|
153
156
|
textAnchor: vane.value.anchor,
|
|
154
157
|
x: vane.value.x,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Station } from "../../contract.js";
|
|
2
2
|
import { SpeedThresholds, SpeedUnit } from "../../derive.js";
|
|
3
3
|
import { FormatTime, StationStringOverrides } from "../../strings.js";
|
|
4
|
+
import { FavorableDirection } from "../../instruments.js";
|
|
4
5
|
import "../../index.js";
|
|
5
6
|
//#region src/react/components/atoms.d.ts
|
|
6
7
|
type AtomProps = {
|
|
@@ -16,7 +17,9 @@ declare function Gust(props: SpeedAtomProps): import("react").JSX.Element;
|
|
|
16
17
|
declare function Lull(props: SpeedAtomProps): import("react").JSX.Element;
|
|
17
18
|
declare function Temperature({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").JSX.Element;
|
|
18
19
|
declare function Pressure({ station: stationProp, stationId, strings: stringsProp }: AtomProps): import("react").JSX.Element;
|
|
19
|
-
declare function Direction({ station: stationProp, stationId, strings: stringsProp }: AtomProps
|
|
20
|
+
declare function Direction({ station: stationProp, stationId, strings: stringsProp, favorableDirections: favorableDirectionsProp }: AtomProps & {
|
|
21
|
+
favorableDirections?: FavorableDirection[] | null;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
20
23
|
declare function UpdatedAt({ station: stationProp, stationId, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, strings: stringsProp, formatTime: formatTimeProp }: {
|
|
21
24
|
station?: Station;
|
|
22
25
|
stationId?: string;
|
|
@@ -63,10 +63,13 @@ function Pressure({ station: stationProp, stationId, strings: stringsProp }) {
|
|
|
63
63
|
const { words } = resolveDisplay(context, { strings: stringsProp });
|
|
64
64
|
return /* @__PURE__ */ jsx(ValueAtom, { scene: pressureAtomScene(station, words) });
|
|
65
65
|
}
|
|
66
|
-
function Direction({ station: stationProp, stationId, strings: stringsProp }) {
|
|
66
|
+
function Direction({ station: stationProp, stationId, strings: stringsProp, favorableDirections: favorableDirectionsProp }) {
|
|
67
67
|
const { context, station } = useResolvedStation("Direction", stationProp, stationId);
|
|
68
|
-
const { words } = resolveDisplay(context, {
|
|
69
|
-
|
|
68
|
+
const { favorableDirections, words } = resolveDisplay(context, {
|
|
69
|
+
strings: stringsProp,
|
|
70
|
+
favorableDirections: favorableDirectionsProp
|
|
71
|
+
});
|
|
72
|
+
const scene = directionAtomScene(station, words, favorableDirections);
|
|
70
73
|
if (scene.cell == null) return /* @__PURE__ */ jsx("span", {
|
|
71
74
|
className: scene.className,
|
|
72
75
|
children: scene.dashText
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PollError } from "../../client/poll.js";
|
|
2
|
+
import { StationClimatology } from "../../contract-climatology.js";
|
|
3
|
+
import "../../client/index.js";
|
|
4
|
+
import "../../index.js";
|
|
5
|
+
//#region src/react/hooks/useStationClimatology.d.ts
|
|
6
|
+
/** Fetches the station's climatology document once and holds it — near-
|
|
7
|
+
* immutable history needs no poller; filters re-aggregate client-side. */
|
|
8
|
+
declare function useStationClimatology(base: string, stationId: string, options?: {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
fetchInit?: RequestInit;
|
|
11
|
+
}): {
|
|
12
|
+
document: StationClimatology | null;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
error: PollError | null;
|
|
15
|
+
refresh: () => void;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { useStationClimatology };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { climatologyEndpoint } from "../../endpoints.js";
|
|
3
|
+
import { createStationClimatologyStore } from "../../client/climatology.js";
|
|
4
|
+
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
|
+
//#region src/react/hooks/useStationClimatology.ts
|
|
6
|
+
/** Fetches the station's climatology document once and holds it — near-
|
|
7
|
+
* immutable history needs no poller; filters re-aggregate client-side. */
|
|
8
|
+
function useStationClimatology(base, stationId, options = {}) {
|
|
9
|
+
const { enabled = true, fetchInit } = options;
|
|
10
|
+
const fetchInitRef = useRef(fetchInit);
|
|
11
|
+
fetchInitRef.current = fetchInit;
|
|
12
|
+
const store = useMemo(() => createStationClimatologyStore(climatologyEndpoint(base, stationId), { fetchInit: fetchInitRef.current }), [base, stationId]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (enabled) store.load();
|
|
15
|
+
}, [store, enabled]);
|
|
16
|
+
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
17
|
+
return {
|
|
18
|
+
document: snapshot.document,
|
|
19
|
+
loading: snapshot.loading,
|
|
20
|
+
error: snapshot.error,
|
|
21
|
+
refresh: () => void store.refresh()
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { useStationClimatology };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { ReadoutPart } from "../scene/chart.js";
|
|
2
|
+
import "../scene/index.js";
|
|
1
3
|
import { AirMatrix } from "./components/AirMatrix.js";
|
|
2
4
|
import { BandChip, Direction, Gust, Lull, Pressure, Speed, Temperature, UpdatedAt } from "./components/atoms.js";
|
|
3
5
|
import { CurrentConditions } from "./components/CurrentConditions.js";
|
|
4
6
|
import { Dial } from "./components/Dial.js";
|
|
7
|
+
import { FavorableShare } from "./components/FavorableShare.js";
|
|
5
8
|
import { FreshnessBadge } from "./components/FreshnessBadge.js";
|
|
6
9
|
import { Sparkline } from "./components/Sparkline.js";
|
|
7
10
|
import { StationMetaRenderer, StationTable } from "./components/StationTable.js";
|
|
@@ -9,9 +12,12 @@ import { StationFeedContextValue, StationFeedProvider, useStationFeedContext } f
|
|
|
9
12
|
import { StationStrip } from "./components/StationStrip.js";
|
|
10
13
|
import { TrendChart } from "./components/TrendChart.js";
|
|
11
14
|
import { WindArrow } from "./components/WindArrow.js";
|
|
15
|
+
import { AirExtremes } from "./components/AirExtremes.js";
|
|
16
|
+
import { ClimatologyDailyPattern } from "./components/ClimatologyDailyPattern.js";
|
|
17
|
+
import { CompassFan } from "./components/CompassFan.js";
|
|
18
|
+
import { RecentSummaries } from "./components/RecentSummaries.js";
|
|
19
|
+
import { ClimatologyRose } from "./components/ClimatologyRose.js";
|
|
12
20
|
import { DailyPattern } from "./components/DailyPattern.js";
|
|
13
|
-
import { ReadoutPart } from "../scene/chart.js";
|
|
14
|
-
import "../scene/index.js";
|
|
15
21
|
import { Readout } from "./components/Readout.js";
|
|
16
22
|
import { WindHistoryChart } from "./components/WindHistoryChart.js";
|
|
17
23
|
import { WindRose } from "./components/WindRose.js";
|
|
@@ -20,7 +26,8 @@ import { StationCard, StationCardChart, StationCardHeader, StationCardInstrument
|
|
|
20
26
|
import { useFreshness } from "./hooks/useFreshness.js";
|
|
21
27
|
import { useMeasuredChartWidth } from "./hooks/useMeasuredChartWidth.js";
|
|
22
28
|
import { useStation } from "./hooks/useStation.js";
|
|
29
|
+
import { useStationClimatology } from "./hooks/useStationClimatology.js";
|
|
23
30
|
import { useStationCurrent } from "./hooks/useStationCurrent.js";
|
|
24
31
|
import { useStationFeed } from "./hooks/useStationFeed.js";
|
|
25
32
|
import { useStationLive } from "./hooks/useStationLive.js";
|
|
26
|
-
export { AirMatrix, BandChip, CurrentConditions, DailyPattern, Dial, Direction, FreshnessBadge, Gust, Lull, Pressure, Readout, type ReadoutPart, Sparkline, Speed, StationCard, StationCardChart, StationCardHeader, StationCardInstrument, StationCardSummary, type StationFeedContextValue, StationFeedProvider, type StationMetaRenderer, StationStrip, StationTable, Temperature, TrendChart, UpdatedAt, WindArrow, WindHistoryChart, WindRose, WindSampleStrip, useFreshness, useMeasuredChartWidth, useStation, useStationCurrent, useStationFeed, useStationFeedContext, useStationLive };
|
|
33
|
+
export { AirExtremes, AirMatrix, BandChip, ClimatologyDailyPattern, ClimatologyRose, CompassFan, CurrentConditions, DailyPattern, Dial, Direction, FavorableShare, FreshnessBadge, Gust, Lull, Pressure, Readout, type ReadoutPart, RecentSummaries, Sparkline, Speed, StationCard, StationCardChart, StationCardHeader, StationCardInstrument, StationCardSummary, type StationFeedContextValue, StationFeedProvider, type StationMetaRenderer, StationStrip, StationTable, Temperature, TrendChart, UpdatedAt, WindArrow, WindHistoryChart, WindRose, WindSampleStrip, useFreshness, useMeasuredChartWidth, useStation, useStationClimatology, useStationCurrent, useStationFeed, useStationFeedContext, useStationLive };
|
package/dist/react/index.js
CHANGED
|
@@ -7,19 +7,26 @@ import { useFreshness } from "./hooks/useFreshness.js";
|
|
|
7
7
|
import { Dial } from "./components/Dial.js";
|
|
8
8
|
import { FreshnessBadge } from "./components/FreshnessBadge.js";
|
|
9
9
|
import { CurrentConditions } from "./components/CurrentConditions.js";
|
|
10
|
+
import { FavorableShare } from "./components/FavorableShare.js";
|
|
10
11
|
import { Sparkline } from "./components/Sparkline.js";
|
|
11
12
|
import { StationTable } from "./components/StationTable.js";
|
|
12
13
|
import { StationStrip } from "./components/StationStrip.js";
|
|
13
14
|
import { TrendChart } from "./components/TrendChart.js";
|
|
15
|
+
import { AirExtremes } from "./components/AirExtremes.js";
|
|
14
16
|
import { DailyPattern } from "./components/DailyPattern.js";
|
|
17
|
+
import { ClimatologyDailyPattern } from "./components/ClimatologyDailyPattern.js";
|
|
18
|
+
import { CompassFan } from "./components/CompassFan.js";
|
|
19
|
+
import { RecentSummaries } from "./components/RecentSummaries.js";
|
|
20
|
+
import { WindRose } from "./components/WindRose.js";
|
|
21
|
+
import { ClimatologyRose } from "./components/ClimatologyRose.js";
|
|
15
22
|
import { Readout } from "./components/Readout.js";
|
|
16
23
|
import { useMeasuredChartWidth } from "./hooks/useMeasuredChartWidth.js";
|
|
17
24
|
import { WindHistoryChart } from "./components/WindHistoryChart.js";
|
|
18
|
-
import { WindRose } from "./components/WindRose.js";
|
|
19
25
|
import { WindSampleStrip } from "./components/WindSampleStrip.js";
|
|
20
26
|
import { StationCard, StationCardChart, StationCardHeader, StationCardInstrument, StationCardSummary } from "./components/StationCard.js";
|
|
21
27
|
import { useStationCurrent } from "./hooks/useStationCurrent.js";
|
|
22
28
|
import { useStationFeed } from "./hooks/useStationFeed.js";
|
|
23
29
|
import { useStationLive } from "./hooks/useStationLive.js";
|
|
24
30
|
import { useStation } from "./hooks/useStation.js";
|
|
25
|
-
|
|
31
|
+
import { useStationClimatology } from "./hooks/useStationClimatology.js";
|
|
32
|
+
export { AirExtremes, AirMatrix, BandChip, ClimatologyDailyPattern, ClimatologyRose, CompassFan, CurrentConditions, DailyPattern, Dial, Direction, FavorableShare, FreshnessBadge, Gust, Lull, Pressure, Readout, RecentSummaries, Sparkline, Speed, StationCard, StationCardChart, StationCardHeader, StationCardInstrument, StationCardSummary, StationFeedProvider, StationStrip, StationTable, Temperature, TrendChart, UpdatedAt, WindArrow, WindHistoryChart, WindRose, WindSampleStrip, useFreshness, useMeasuredChartWidth, useStation, useStationClimatology, useStationCurrent, useStationFeed, useStationFeedContext, useStationLive };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { lastNightLowC, pressureDeltaHpa } from "../derive.js";
|
|
2
|
+
import { temperatureValue } from "../format.js";
|
|
3
|
+
//#region src/scene/air-extremes.ts
|
|
4
|
+
const AIR_EXTREMES_CLASS = "meteo-air-extremes";
|
|
5
|
+
const PRESSURE_DELTA_WINDOW_HOURS = 3;
|
|
6
|
+
/** hidden without served history — the tiles are functions of it; each tile
|
|
7
|
+
* additionally stays absent when its own inputs are (no coordinates, no
|
|
8
|
+
* night; no carried pressure, no delta). */
|
|
9
|
+
function airExtremesGate(station) {
|
|
10
|
+
if (station == null || station.status !== "ok" || station.history == null) return { kind: "hidden" };
|
|
11
|
+
return {
|
|
12
|
+
kind: "draw",
|
|
13
|
+
station
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function airExtremesScene(input) {
|
|
17
|
+
const { nowMs, station, words } = input;
|
|
18
|
+
const points = station.history?.points ?? [];
|
|
19
|
+
const tiles = [];
|
|
20
|
+
const night = lastNightLowC(points, station.latitude, station.longitude, nowMs);
|
|
21
|
+
if (night != null) tiles.push({
|
|
22
|
+
key: "last-night-low",
|
|
23
|
+
className: "meteo-air-extremes-tile",
|
|
24
|
+
label: words.lastNightLowLabel,
|
|
25
|
+
value: `${temperatureValue(night.lowC)} ${words.degC}`
|
|
26
|
+
});
|
|
27
|
+
const delta = pressureDeltaHpa(points, { windowHours: PRESSURE_DELTA_WINDOW_HOURS });
|
|
28
|
+
if (delta != null) tiles.push({
|
|
29
|
+
key: "pressure-delta",
|
|
30
|
+
className: "meteo-air-extremes-tile",
|
|
31
|
+
label: words.pressureDeltaLabel(PRESSURE_DELTA_WINDOW_HOURS),
|
|
32
|
+
value: `${delta >= 0 ? "+" : "−"}${Math.abs(delta).toFixed(1)} ${words.air.unitHpa}`
|
|
33
|
+
});
|
|
34
|
+
if (tiles.length === 0) return null;
|
|
35
|
+
return {
|
|
36
|
+
className: AIR_EXTREMES_CLASS,
|
|
37
|
+
ariaLabel: words.aria.airExtremes(station.name),
|
|
38
|
+
tiles
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { AIR_EXTREMES_CLASS, airExtremesGate, airExtremesScene };
|
package/dist/scene/atoms.d.ts
CHANGED
package/dist/scene/atoms.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { compassDirection, isCalm, thresholdsToMps } from "../derive.js";
|
|
2
|
-
import { readingAgeMs, roundSpeed, speedMpsOf, temperatureValue, updatedAtText } from "../format.js";
|
|
3
2
|
import { speedBand } from "../geometry.js";
|
|
3
|
+
import { readingAgeMs, roundSpeed, speedMpsOf, temperatureValue, updatedAtText } from "../format.js";
|
|
4
|
+
import { inDirectionArcs } from "@azohra/meteo.core";
|
|
4
5
|
//#region src/scene/atoms.ts
|
|
5
6
|
const valueContent = (value, shown, unitWord) => value == null ? {
|
|
6
7
|
kind: "dash",
|
|
@@ -37,7 +38,7 @@ function pressureAtomScene(station, words) {
|
|
|
37
38
|
content: valueContent(hpa, (value) => value.toFixed(1), words.air.unitHpa)
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
function directionAtomScene(station, words) {
|
|
41
|
+
function directionAtomScene(station, words, favorableDirections) {
|
|
41
42
|
const reading = station.status === "ok" ? station.reading : null;
|
|
42
43
|
if (reading == null) return {
|
|
43
44
|
className: "meteo-direction",
|
|
@@ -47,9 +48,10 @@ function directionAtomScene(station, words) {
|
|
|
47
48
|
};
|
|
48
49
|
const bearingDeg = isCalm(reading.windAvgMps) ? null : reading.windDirectionDeg;
|
|
49
50
|
const point = bearingDeg == null ? null : compassDirection(bearingDeg);
|
|
51
|
+
const verdict = bearingDeg == null || favorableDirections == null || favorableDirections.length === 0 ? null : inDirectionArcs(bearingDeg, favorableDirections);
|
|
50
52
|
return {
|
|
51
|
-
className: "meteo-direction",
|
|
52
|
-
ariaLabel: point == null || bearingDeg == null ? void 0 : words.aria.direction(words.compassSpoken[point], Math.round(bearingDeg)),
|
|
53
|
+
className: verdict == null ? "meteo-direction" : verdict ? "meteo-direction meteo-direction-favorable" : "meteo-direction meteo-direction-unfavorable",
|
|
54
|
+
ariaLabel: point == null || bearingDeg == null ? void 0 : verdict == null ? words.aria.direction(words.compassSpoken[point], Math.round(bearingDeg)) : `${words.aria.direction(words.compassSpoken[point], Math.round(bearingDeg))} ${verdict ? words.aria.favorable : words.aria.unfavorable}`,
|
|
53
55
|
cell: {
|
|
54
56
|
windAvgMps: reading.windAvgMps,
|
|
55
57
|
windDirectionDeg: reading.windDirectionDeg
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { climatologyCoverage, climatologyPattern } from "../climatology.js";
|
|
2
|
+
import { dailyPatternSlotsScene } from "./daily-pattern.js";
|
|
3
|
+
//#region src/scene/climatology-pattern.ts
|
|
4
|
+
const CLIMATOLOGY_PATTERN_CLASS = "meteo-climatology-daily-pattern";
|
|
5
|
+
function climatologyPatternGate(document, words) {
|
|
6
|
+
if (document == null || document.cells.length === 0) return {
|
|
7
|
+
kind: "note",
|
|
8
|
+
className: `${CLIMATOLOGY_PATTERN_CLASS} meteo-climatology-daily-pattern-na`,
|
|
9
|
+
text: words.noClimatology
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
kind: "draw",
|
|
13
|
+
document
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** The cube's typical day through the daily-pattern drawing. The coverage
|
|
17
|
+
* percentage rides only the unfiltered view — the ledger cannot vouch for a
|
|
18
|
+
* filtered slice, which captions a plain sample count instead. */
|
|
19
|
+
function climatologyPatternScene(input) {
|
|
20
|
+
const { document, filters, ...rest } = input;
|
|
21
|
+
const slots = climatologyPattern(document, filters);
|
|
22
|
+
const totalSamples = slots.reduce((sum, slot) => sum + slot.sampleCount, 0);
|
|
23
|
+
const coverage = filters?.months == null ? climatologyCoverage(document) : null;
|
|
24
|
+
return dailyPatternSlotsScene({
|
|
25
|
+
...rest,
|
|
26
|
+
slotMinutes: document.slotMinutes,
|
|
27
|
+
slots,
|
|
28
|
+
coverage: {
|
|
29
|
+
totalSamples,
|
|
30
|
+
percent: coverage != null && coverage.ratio != null ? Math.round(coverage.ratio * 100) : null
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { CLIMATOLOGY_PATTERN_CLASS, climatologyPatternGate, climatologyPatternScene };
|