@azohra/meteo.station 0.7.0 → 0.7.2
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 +5 -8
- package/dist/client/climatology.js +1 -2
- package/dist/client/history.d.ts +14 -17
- package/dist/client/history.js +2 -3
- package/dist/client/index.js +1 -1
- package/dist/client/live.d.ts +10 -12
- 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 +9 -11
- package/dist/client/stores.js +2 -3
- 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 +7 -10
- 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 +2 -3
- package/dist/elements/elements/ClimatologyRoseElement.d.ts +2 -5
- package/dist/elements/elements/ClimatologyRoseElement.js +2 -3
- 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 +2 -3
- 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 +4 -5
- package/dist/elements/elements/StationFeedElement.d.ts +2 -5
- package/dist/elements/elements/StationFeedElement.js +3 -4
- 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 +2 -3
- package/dist/elements/elements/TrendChartElement.d.ts +2 -5
- package/dist/elements/elements/TrendChartElement.js +2 -3
- 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 +4 -5
- 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 +2 -3
- package/dist/elements/index.d.ts +4 -6
- 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 +2 -3
- package/dist/elements/lib/context.js +1 -2
- package/dist/elements/lib/fragments.js +2 -3
- 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 +6 -3
- 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 -39
- package/dist/geometry.js +7 -8
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -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 +3 -4
- package/dist/react/components/DailyPattern.d.ts +2 -5
- package/dist/react/components/DailyPattern.js +2 -3
- package/dist/react/components/Dial.d.ts +2 -5
- package/dist/react/components/Dial.js +3 -4
- 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 +2 -3
- package/dist/react/components/StationCard.d.ts +6 -8
- package/dist/react/components/StationCard.js +4 -5
- package/dist/react/components/StationFeedProvider.d.ts +3 -6
- package/dist/react/components/StationFeedProvider.js +2 -3
- package/dist/react/components/StationStrip.d.ts +2 -5
- package/dist/react/components/StationStrip.js +3 -4
- package/dist/react/components/StationTable.d.ts +3 -6
- package/dist/react/components/StationTable.js +4 -5
- package/dist/react/components/TrendChart.d.ts +3 -6
- package/dist/react/components/TrendChart.js +3 -4
- 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 +4 -5
- 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 +4 -5
- package/dist/react/components/atoms.d.ts +9 -11
- package/dist/react/components/atoms.js +3 -4
- package/dist/react/hooks/useFreshness.d.ts +1 -4
- package/dist/react/hooks/useFreshness.js +2 -3
- 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 +2 -3
- 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/index.d.ts +1 -1
- package/dist/react/index.js +3 -3
- 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.d.ts +2 -2
- package/dist/scene/atoms.js +2 -3
- package/dist/scene/card.js +2 -3
- package/dist/scene/cells.d.ts +2 -2
- package/dist/scene/cells.js +2 -3
- package/dist/scene/chart.d.ts +2 -5
- package/dist/scene/chart.js +1 -2
- package/dist/scene/climatology-pattern.d.ts +2 -2
- package/dist/scene/climatology-pattern.js +2 -3
- package/dist/scene/climatology-rose.d.ts +2 -2
- package/dist/scene/climatology-rose.js +2 -3
- package/dist/scene/compass-fan.d.ts +2 -2
- package/dist/scene/compass-fan.js +2 -3
- package/dist/scene/current.d.ts +2 -2
- package/dist/scene/current.js +3 -4
- package/dist/scene/daily-pattern.d.ts +2 -2
- package/dist/scene/daily-pattern.js +2 -3
- package/dist/scene/dial-parts.js +1 -2
- package/dist/scene/dial.d.ts +2 -2
- package/dist/scene/dial.js +3 -4
- package/dist/scene/favorable-share.d.ts +2 -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.d.ts +2 -2
- package/dist/scene/recent-summaries.js +2 -3
- package/dist/scene/rose.d.ts +2 -2
- package/dist/scene/rose.js +1 -2
- package/dist/scene/sample-strip.d.ts +2 -2
- package/dist/scene/sample-strip.js +2 -3
- package/dist/scene/sparkline.js +2 -3
- package/dist/scene/strip.js +3 -4
- package/dist/scene/table.js +3 -4
- package/dist/scene/trend.d.ts +2 -2
- package/dist/scene/trend.js +1 -2
- package/dist/scene/wind-history.d.ts +2 -2
- package/dist/scene/wind-history.js +3 -4
- package/dist/scene/wind-plot.d.ts +1 -1
- package/dist/scene/wind-plot.js +2 -3
- package/dist/server/adapter.d.ts +7 -10
- package/dist/server/adapter.js +1 -2
- package/dist/server/adapters/campbell.d.ts +12 -14
- package/dist/server/adapters/campbell.js +2 -3
- package/dist/server/adapters/ecowitt.d.ts +5 -8
- package/dist/server/adapters/ecowitt.js +2 -3
- package/dist/server/adapters/tempest.d.ts +5 -8
- package/dist/server/adapters/tempest.js +2 -3
- package/dist/server/adapters/windnerd-climatology.d.ts +6 -9
- package/dist/server/adapters/windnerd-climatology.js +3 -4
- package/dist/server/adapters/windnerd-live.d.ts +3 -6
- package/dist/server/adapters/windnerd-live.js +1 -2
- package/dist/server/adapters/windnerd.d.ts +24 -27
- package/dist/server/adapters/windnerd.js +7 -8
- package/dist/server/config.d.ts +18 -20
- package/dist/server/config.js +1 -2
- package/dist/server/environment.d.ts +21 -23
- package/dist/server/environment.js +14 -15
- package/dist/server/feed.d.ts +20 -22
- package/dist/server/feed.js +3 -4
- package/dist/server/handler.d.ts +5 -8
- package/dist/server/handler.js +3 -4
- package/dist/server/hologram.d.ts +9 -12
- package/dist/server/hologram.js +1 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +9 -9
- 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 +10 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { freshness, stationFreshnessThresholds } from "../../derive.js";
|
|
2
2
|
import { requireResolved, resolveDisplay, resolveStation } from "../../display.js";
|
|
3
|
-
import { subscribeTicker } from "../../client/ticker.js";
|
|
4
3
|
import { ELEMENTS_AMBIENT_HINT, STATION_FEED_CONTEXT_KEY } from "./ambient.js";
|
|
5
4
|
import { numberAttribute, parseArcsAttribute, parseThresholdsAttribute, unitAttribute } from "./attributes.js";
|
|
6
5
|
import { requestContext } from "./context.js";
|
|
7
|
-
|
|
6
|
+
import { subscribeTicker } from "../../client/ticker.js";
|
|
7
|
+
// src/elements/lib/base.ts
|
|
8
8
|
var MeteoElement = class extends HTMLElement {
|
|
9
9
|
#cleanups = [];
|
|
10
10
|
#ambient = null;
|
|
@@ -160,5 +160,4 @@ var MeteoStationElement = class extends MeteoElement {
|
|
|
160
160
|
}, stationFreshnessThresholds(station));
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
//#endregion
|
|
164
163
|
export { MeteoElement, MeteoStationElement };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/elements/lib/context.ts
|
|
2
2
|
const CONTEXT_REQUEST_EVENT = "meteo-context-request";
|
|
3
3
|
function requestContext(from, key) {
|
|
4
4
|
let provision = null;
|
|
@@ -24,5 +24,4 @@ function provideContext(host, key, provision) {
|
|
|
24
24
|
host.addEventListener(CONTEXT_REQUEST_EVENT, handler);
|
|
25
25
|
return () => host.removeEventListener(CONTEXT_REQUEST_EVENT, handler);
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { CONTEXT_REQUEST_EVENT, provideContext, requestContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { freshnessBadgeNode, windArrowNode } from "../../scene/glyphs.js";
|
|
2
1
|
import { stationNameNode as stationNameNode$1 } from "../../scene/cells.js";
|
|
2
|
+
import { freshnessBadgeNode, windArrowNode } from "../../scene/glyphs.js";
|
|
3
3
|
import { renderScene } from "./render.js";
|
|
4
|
-
|
|
4
|
+
// src/elements/lib/fragments.ts
|
|
5
5
|
function windArrowSvg(deg, size = 12) {
|
|
6
6
|
return renderScene(windArrowNode(deg, size));
|
|
7
7
|
}
|
|
@@ -12,5 +12,4 @@ function stationNameNode(station) {
|
|
|
12
12
|
function freshnessBadgeSpan(status, words) {
|
|
13
13
|
return renderScene(freshnessBadgeNode(status, words));
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { freshnessBadgeSpan, stationNameNode, windArrowSvg };
|
package/dist/elements/lib/h.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/elements/lib/h.ts
|
|
2
2
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
3
3
|
function apply(element, attrs, children) {
|
|
4
4
|
if (attrs != null) for (const [name, value] of Object.entries(attrs)) {
|
|
@@ -31,5 +31,4 @@ function hs(tag, attrs = null, ...children) {
|
|
|
31
31
|
apply(element, attrs, children);
|
|
32
32
|
return element;
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { h, hs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { activeChartIndex, chartIndexAtClient, togglePinnedAt } from "../../scene/chart.js";
|
|
2
|
-
|
|
2
|
+
// src/elements/lib/pinned-cursor.ts
|
|
3
3
|
var PinnedCursor = class {
|
|
4
4
|
#pinnedAt = null;
|
|
5
5
|
#previewIndex = null;
|
|
@@ -44,5 +44,4 @@ var PinnedCursor = class {
|
|
|
44
44
|
return chartIndexAtClient(scene.points, scene.frame, scene.scales, clientX, svg.getBoundingClientRect());
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { PinnedCursor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SVG_ROOT_TAGS } from "../../scene/node.js";
|
|
2
2
|
import { h, hs } from "./h.js";
|
|
3
|
-
|
|
3
|
+
// src/elements/lib/render.ts
|
|
4
4
|
function renderChild(child, svg = false) {
|
|
5
5
|
if (child == null || child === false) return null;
|
|
6
6
|
if (typeof child === "string") return child;
|
|
@@ -26,5 +26,4 @@ function renderOptional(node) {
|
|
|
26
26
|
function renderChildren(children) {
|
|
27
27
|
return children.map((child) => renderChild(child)).filter((node) => node !== null);
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { renderChild, renderChildren, renderOptional, renderScene };
|
package/dist/endpoints.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
declare function
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function historyEndpoint(base: string, stationId: string, query: {
|
|
1
|
+
export declare function feedEndpoint(base: string): string;
|
|
2
|
+
export declare function currentEndpoint(base: string, stationId: string): string;
|
|
3
|
+
export declare function liveEndpoint(base: string, stationId: string): string;
|
|
4
|
+
export declare function climatologyEndpoint(base: string, stationId: string): string;
|
|
5
|
+
export declare function historyEndpoint(base: string, stationId: string, query: {
|
|
7
6
|
fromMs: number;
|
|
8
7
|
toMs: number;
|
|
9
8
|
periodMinutes: number;
|
|
10
|
-
}): string;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { climatologyEndpoint, currentEndpoint, feedEndpoint, historyEndpoint, liveEndpoint };
|
|
9
|
+
}): string;
|
package/dist/endpoints.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// src/endpoints.ts
|
|
2
|
+
function trimBase(base) {
|
|
3
|
+
let end = base.length;
|
|
4
|
+
while (end > 0 && base[end - 1] === "/") end -= 1;
|
|
5
|
+
return base.slice(0, end);
|
|
6
|
+
}
|
|
3
7
|
function feedEndpoint(base) {
|
|
4
8
|
return `${trimBase(base)}/feed`;
|
|
5
9
|
}
|
|
@@ -21,5 +25,4 @@ function historyEndpoint(base, stationId, query) {
|
|
|
21
25
|
});
|
|
22
26
|
return `${trimBase(base)}/history?${params.toString()}`;
|
|
23
27
|
}
|
|
24
|
-
//#endregion
|
|
25
28
|
export { climatologyEndpoint, currentEndpoint, feedEndpoint, historyEndpoint, liveEndpoint };
|
package/dist/fixtures.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { HistoryPoint, StationMeta } from "./contract.js";
|
|
2
2
|
import { SpeedThresholds } from "./derive.js";
|
|
3
|
-
|
|
4
|
-
declare const LAUNCH_RIDGE_META: StationMeta;
|
|
3
|
+
export declare const LAUNCH_RIDGE_META: StationMeta;
|
|
5
4
|
/** The wind grading the demo exhibits judge with. */
|
|
6
|
-
declare const EXHIBIT_THRESHOLDS: SpeedThresholds;
|
|
5
|
+
export declare const EXHIBIT_THRESHOLDS: SpeedThresholds;
|
|
7
6
|
/** Deterministic PRNG (mulberry32). */
|
|
8
|
-
declare function mulberry32(seed: number): () => number;
|
|
7
|
+
export declare function mulberry32(seed: number): () => number;
|
|
9
8
|
/** Smoothstep clamped to [0, 1]. */
|
|
10
|
-
declare const smooth: (value: number) => number;
|
|
9
|
+
export declare const smooth: (value: number) => number;
|
|
11
10
|
/** Deterministic wobble in roughly [-1, 1]. */
|
|
12
|
-
declare const wobble: (seed: number) => number;
|
|
13
|
-
interface LongHistoryOptions {
|
|
11
|
+
export declare const wobble: (seed: number) => number;
|
|
12
|
+
export interface LongHistoryOptions {
|
|
14
13
|
/** The series ends here. */
|
|
15
14
|
nowMs: number;
|
|
16
15
|
/** How many days of history to build. */
|
|
@@ -22,6 +21,4 @@ interface LongHistoryOptions {
|
|
|
22
21
|
withGaps?: boolean;
|
|
23
22
|
}
|
|
24
23
|
/** A long-range deterministic synthetic history: seasonal, diurnal, with occasional dropouts. */
|
|
25
|
-
declare function buildLongHistory({ nowMs, days, periodMinutes, seed, withGaps }: LongHistoryOptions): HistoryPoint[];
|
|
26
|
-
//#endregion
|
|
27
|
-
export { EXHIBIT_THRESHOLDS, LAUNCH_RIDGE_META, LongHistoryOptions, buildLongHistory, mulberry32, smooth, wobble };
|
|
24
|
+
export declare function buildLongHistory({ nowMs, days, periodMinutes, seed, withGaps }: LongHistoryOptions): HistoryPoint[];
|
package/dist/fixtures.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { kmhToMps } from "@azohra/meteo.core";
|
|
2
|
-
|
|
2
|
+
// src/fixtures.ts
|
|
3
3
|
const MINUTE_MS = 6e4;
|
|
4
4
|
const DAY_MS = 1440 * MINUTE_MS;
|
|
5
5
|
const LAUNCH_RIDGE_META = {
|
|
@@ -91,5 +91,4 @@ function buildLongHistory({ nowMs, days = 420, periodMinutes = 15, seed = 995373
|
|
|
91
91
|
}
|
|
92
92
|
return points;
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
export { EXHIBIT_THRESHOLDS, LAUNCH_RIDGE_META, buildLongHistory, mulberry32, smooth, wobble };
|
package/dist/format.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Station } from "./contract.js";
|
|
2
2
|
import { CompassPoint, SpeedUnit } from "./derive.js";
|
|
3
3
|
import { FormatTime, StationStrings } from "./strings.js";
|
|
4
|
-
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
type DirectionCellData = {
|
|
4
|
+
export declare function roundSpeed(mps: number, unit: SpeedUnit): number;
|
|
5
|
+
export declare function optionalSpeed(mps: number | null, unit: SpeedUnit): string;
|
|
6
|
+
export declare function temperatureValue(temperatureC: number): string;
|
|
7
|
+
export declare function temperatureText(temperatureC: number | null, words: StationStrings): string;
|
|
8
|
+
export type SpeedKind = "average" | "gust" | "lull";
|
|
9
|
+
export type DirectionCellData = {
|
|
11
10
|
kind: "calm";
|
|
12
11
|
} | {
|
|
13
12
|
kind: "dash";
|
|
@@ -17,15 +16,13 @@ type DirectionCellData = {
|
|
|
17
16
|
compass: CompassPoint;
|
|
18
17
|
rounded: number;
|
|
19
18
|
};
|
|
20
|
-
declare function directionCell(windAvgMps: number, windDirectionDeg: number | null): DirectionCellData;
|
|
21
|
-
declare function updatedAtText(ageMs: number, observedAt: string, words: StationStrings, formatTime: FormatTime): string;
|
|
22
|
-
type SummaryEntry = {
|
|
19
|
+
export declare function directionCell(windAvgMps: number, windDirectionDeg: number | null): DirectionCellData;
|
|
20
|
+
export declare function updatedAtText(ageMs: number, observedAt: string, words: StationStrings, formatTime: FormatTime): string;
|
|
21
|
+
export type SummaryEntry = {
|
|
23
22
|
label: string;
|
|
24
23
|
value: string;
|
|
25
24
|
};
|
|
26
|
-
declare function summaryEntries(station: Station, unit: SpeedUnit, words: StationStrings, formatTime: FormatTime): {
|
|
25
|
+
export declare function summaryEntries(station: Station, unit: SpeedUnit, words: StationStrings, formatTime: FormatTime): {
|
|
27
26
|
entries: SummaryEntry[];
|
|
28
27
|
periodEndedAt: string;
|
|
29
|
-
} | null;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { DirectionCellData, SpeedKind, SummaryEntry, directionCell, optionalSpeed, roundSpeed, summaryEntries, temperatureText, temperatureValue, updatedAtText };
|
|
28
|
+
} | null;
|
package/dist/format.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { anchoredAgeMs, compassDirection, isCalm, periodSummary, speedFromMps } from "./derive.js";
|
|
2
|
-
|
|
2
|
+
// src/format.ts
|
|
3
3
|
function roundSpeed(mps, unit) {
|
|
4
4
|
return Math.round(speedFromMps(mps, unit));
|
|
5
5
|
}
|
|
@@ -82,5 +82,4 @@ function summaryEntries(station, unit, words, formatTime) {
|
|
|
82
82
|
periodEndedAt: summary.periodEndedAt
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
export { UPDATED_ABSOLUTE_AFTER_MS, directionCell, optionalSpeed, readingAgeMs, relativeWords, roundSpeed, speedMpsOf, summaryEntries, temperatureText, temperatureValue, updatedAtText };
|
package/dist/geometry.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { History, HistoryPoint } from "./contract.js";
|
|
2
2
|
import { DirectionArc } from "@azohra/meteo.core";
|
|
3
|
-
|
|
4
|
-
type ChartFrame = {
|
|
3
|
+
export type ChartFrame = {
|
|
5
4
|
height: number;
|
|
6
5
|
labelRow: number;
|
|
7
6
|
left: number;
|
|
@@ -13,12 +12,12 @@ type ChartFrame = {
|
|
|
13
12
|
valueRow: number;
|
|
14
13
|
width: number;
|
|
15
14
|
};
|
|
16
|
-
declare const CHART_FALLBACK_WIDTH = 360;
|
|
17
|
-
declare function measuredChartWidth(measured: number): number;
|
|
18
|
-
type TickAnchor = "end" | "middle" | "start";
|
|
19
|
-
declare function tickAnchor(index: number, lastIndex: number): TickAnchor;
|
|
20
|
-
declare function chartFrame(width: number): ChartFrame;
|
|
21
|
-
type ChartScales = {
|
|
15
|
+
export declare const CHART_FALLBACK_WIDTH = 360;
|
|
16
|
+
export declare function measuredChartWidth(measured: number): number;
|
|
17
|
+
export type TickAnchor = "end" | "middle" | "start";
|
|
18
|
+
export declare function tickAnchor(index: number, lastIndex: number): TickAnchor;
|
|
19
|
+
export declare function chartFrame(width: number): ChartFrame;
|
|
20
|
+
export type ChartScales = {
|
|
22
21
|
startMs: number;
|
|
23
22
|
endMs: number;
|
|
24
23
|
durationMs: number;
|
|
@@ -27,37 +26,37 @@ type ChartScales = {
|
|
|
27
26
|
xAt: (observedAt: string) => number;
|
|
28
27
|
yAt: (speedMps: number) => number;
|
|
29
28
|
};
|
|
30
|
-
type ChartScaleOptions = {
|
|
29
|
+
export type ChartScaleOptions = {
|
|
31
30
|
niceStepMps?: number;
|
|
32
31
|
floorMps?: number;
|
|
33
32
|
};
|
|
34
|
-
declare function chartScales(points: ReadonlyArray<HistoryPoint>, frame: ChartFrame, options?: ChartScaleOptions): ChartScales;
|
|
35
|
-
declare function bandPoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string | null;
|
|
36
|
-
declare function averagePoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string;
|
|
37
|
-
declare function meanDirectionDeg
|
|
38
|
-
type Vane = {
|
|
33
|
+
export declare function chartScales(points: ReadonlyArray<HistoryPoint>, frame: ChartFrame, options?: ChartScaleOptions): ChartScales;
|
|
34
|
+
export declare function bandPoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string | null;
|
|
35
|
+
export declare function averagePoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string;
|
|
36
|
+
export declare function meanDirectionDeg(points: ReadonlyArray<HistoryPoint>): number | null;
|
|
37
|
+
export type Vane = {
|
|
39
38
|
windAvgMps: number;
|
|
40
39
|
windDirectionDeg: number | null;
|
|
41
40
|
endIndex: number;
|
|
42
41
|
midMs: number;
|
|
43
42
|
startIndex: number;
|
|
44
43
|
};
|
|
45
|
-
declare function thinVanes(points: ReadonlyArray<HistoryPoint>, target?: number): Vane[];
|
|
46
|
-
declare function vanePath(cx: number, cy: number, fromBearingDeg: number, { reach, spread }?: {
|
|
44
|
+
export declare function thinVanes(points: ReadonlyArray<HistoryPoint>, target?: number): Vane[];
|
|
45
|
+
export declare function vanePath(cx: number, cy: number, fromBearingDeg: number, { reach, spread }?: {
|
|
47
46
|
reach?: number;
|
|
48
47
|
spread?: number;
|
|
49
48
|
}): string;
|
|
50
|
-
type ChartTick = {
|
|
49
|
+
export type ChartTick = {
|
|
51
50
|
index: number;
|
|
52
51
|
timeMs: number;
|
|
53
52
|
x: number;
|
|
54
53
|
};
|
|
55
|
-
declare function vaneTicks(vanes: ReadonlyArray<Vane>, scales: ChartScales, labelCount?: number): ChartTick[];
|
|
56
|
-
declare function nearestIndex(points: ReadonlyArray<{
|
|
54
|
+
export declare function vaneTicks(vanes: ReadonlyArray<Vane>, scales: ChartScales, labelCount?: number): ChartTick[];
|
|
55
|
+
export declare function nearestIndex(points: ReadonlyArray<{
|
|
57
56
|
observedAt: string;
|
|
58
57
|
}>, chartX: number, frame: ChartFrame, scales: ChartScales): number | null;
|
|
59
|
-
declare function speedBand(speedMps: number, thresholdsMps: ReadonlyArray<number>): number;
|
|
60
|
-
type RoseSector = {
|
|
58
|
+
export declare function speedBand(speedMps: number, thresholdsMps: ReadonlyArray<number>): number;
|
|
59
|
+
export type RoseSector = {
|
|
61
60
|
bearingDeg: number;
|
|
62
61
|
frequency: number;
|
|
63
62
|
meanSpeedMps: number | null;
|
|
@@ -67,32 +66,32 @@ type RoseSector = {
|
|
|
67
66
|
* bandThresholdsMps — stacking is a judgment the consumer supplies. */
|
|
68
67
|
bandCounts?: number[] | undefined;
|
|
69
68
|
};
|
|
70
|
-
type WindRoseSummary = {
|
|
69
|
+
export type WindRoseSummary = {
|
|
71
70
|
sectors: RoseSector[];
|
|
72
71
|
calmFraction: number;
|
|
73
72
|
sampleCount: number;
|
|
74
73
|
};
|
|
75
|
-
declare function windRose(points: ReadonlyArray<HistoryPoint>, sectorCount?: number, options?: {
|
|
74
|
+
export declare function windRose(points: ReadonlyArray<HistoryPoint>, sectorCount?: number, options?: {
|
|
76
75
|
bandThresholdsMps?: ReadonlyArray<number>;
|
|
77
76
|
}): WindRoseSummary;
|
|
78
|
-
declare const DAILY_PATTERN_DEFAULT_SLOT_MINUTES = 180;
|
|
79
|
-
type DailyPatternSlot = {
|
|
77
|
+
export declare const DAILY_PATTERN_DEFAULT_SLOT_MINUTES = 180;
|
|
78
|
+
export type DailyPatternSlot = {
|
|
80
79
|
startMinuteOfDay: number;
|
|
81
80
|
sampleCount: number;
|
|
82
81
|
windDirectionDeg: number | null;
|
|
83
82
|
speedMps: number;
|
|
84
83
|
};
|
|
85
|
-
declare function dailyPattern(points: ReadonlyArray<HistoryPoint>, options?: {
|
|
84
|
+
export declare function dailyPattern(points: ReadonlyArray<HistoryPoint>, options?: {
|
|
86
85
|
slotMinutes?: number;
|
|
87
86
|
utcOffsetMinutes?: number;
|
|
88
87
|
}): DailyPatternSlot[];
|
|
89
|
-
declare const METEOROLOGICAL_SEASON_MONTHS: Record<"fall" | "spring" | "summer" | "winter", number[]>;
|
|
90
|
-
declare function filterByMonth(points: ReadonlyArray<HistoryPoint>, months: ReadonlyArray<number>, utcOffsetMinutes?: number): HistoryPoint[];
|
|
91
|
-
declare function filterByTimeOfDay(points: ReadonlyArray<HistoryPoint>, fromMinute: number, toMinute: number, utcOffsetMinutes?: number): HistoryPoint[];
|
|
88
|
+
export declare const METEOROLOGICAL_SEASON_MONTHS: Record<"fall" | "spring" | "summer" | "winter", number[]>;
|
|
89
|
+
export declare function filterByMonth(points: ReadonlyArray<HistoryPoint>, months: ReadonlyArray<number>, utcOffsetMinutes?: number): HistoryPoint[];
|
|
90
|
+
export declare function filterByTimeOfDay(points: ReadonlyArray<HistoryPoint>, fromMinute: number, toMinute: number, utcOffsetMinutes?: number): HistoryPoint[];
|
|
92
91
|
/** The share of non-calm history blowing from inside the consumer's arcs;
|
|
93
92
|
* null when nothing non-calm was measured. */
|
|
94
|
-
declare function favorableShare(points: ReadonlyArray<HistoryPoint>, arcs: ReadonlyArray<DirectionArc>): number | null;
|
|
95
|
-
type HistoryCoverage = {
|
|
93
|
+
export declare function favorableShare(points: ReadonlyArray<HistoryPoint>, arcs: ReadonlyArray<DirectionArc>): number | null;
|
|
94
|
+
export type HistoryCoverage = {
|
|
96
95
|
actualCount: number;
|
|
97
96
|
expectedCount: number;
|
|
98
97
|
ratio: number;
|
|
@@ -101,11 +100,9 @@ type HistoryCoverage = {
|
|
|
101
100
|
* implies for [fromMs, toMs). Expected comes from the request, never from the
|
|
102
101
|
* first-to-last point span, so leading and trailing dropouts lower the ratio
|
|
103
102
|
* instead of hiding. */
|
|
104
|
-
declare function historyCoverage(points: ReadonlyArray<HistoryPoint>, periodMinutes: number, fromMs: number, toMs: number): HistoryCoverage;
|
|
105
|
-
declare function historyGaps(history: History, toleranceFactor?: number): Array<[number, number]>;
|
|
106
|
-
type TrendSeries = "temperature" | "pressure";
|
|
107
|
-
declare function windowPoints(points: ReadonlyArray<HistoryPoint>, hours?: number): ReadonlyArray<HistoryPoint>;
|
|
108
|
-
declare function compareWindow(points: ReadonlyArray<HistoryPoint>, offsetDays: number, windowHours?: number): HistoryPoint[] | null;
|
|
109
|
-
declare function compareTracePoints(comparePoints: ReadonlyArray<HistoryPoint>, scales: ChartScales, offsetDays: number): string;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { CHART_FALLBACK_WIDTH, ChartFrame, ChartScaleOptions, ChartScales, ChartTick, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, DailyPatternSlot, HistoryCoverage, METEOROLOGICAL_SEASON_MONTHS, RoseSector, TickAnchor, TrendSeries, Vane, WindRoseSummary, averagePoints, bandPoints, chartFrame, chartScales, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, meanDirectionDeg$1 as meanDirectionDeg, measuredChartWidth, nearestIndex, speedBand, thinVanes, tickAnchor, vanePath, vaneTicks, windRose, windowPoints };
|
|
103
|
+
export declare function historyCoverage(points: ReadonlyArray<HistoryPoint>, periodMinutes: number, fromMs: number, toMs: number): HistoryCoverage;
|
|
104
|
+
export declare function historyGaps(history: History, toleranceFactor?: number): Array<[number, number]>;
|
|
105
|
+
export type TrendSeries = "temperature" | "pressure";
|
|
106
|
+
export declare function windowPoints(points: ReadonlyArray<HistoryPoint>, hours?: number): ReadonlyArray<HistoryPoint>;
|
|
107
|
+
export declare function compareWindow(points: ReadonlyArray<HistoryPoint>, offsetDays: number, windowHours?: number): HistoryPoint[] | null;
|
|
108
|
+
export declare function compareTracePoints(comparePoints: ReadonlyArray<HistoryPoint>, scales: ChartScales, offsetDays: number): string;
|
package/dist/geometry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KMH_PER_MPS, isCalm, normalizeDegrees, radians } from "./derive.js";
|
|
2
|
-
import { componentsToWind, inDirectionArcs, meanDirectionDeg, windToComponents } from "@azohra/meteo.core";
|
|
3
|
-
|
|
2
|
+
import { componentsToWind, inDirectionArcs, meanDirectionDeg as meanDirectionDeg$1, windToComponents } from "@azohra/meteo.core";
|
|
3
|
+
// src/geometry.ts
|
|
4
4
|
const CHART_FALLBACK_WIDTH = 360;
|
|
5
5
|
const CHART_AXIS_GUTTER = 46;
|
|
6
6
|
function measuredChartWidth(measured) {
|
|
@@ -53,8 +53,8 @@ function chartScales(points, frame, options = {}) {
|
|
|
53
53
|
return chartScalesOf(points, frame, (point) => point.windGustMps ?? point.windAvgMps, options);
|
|
54
54
|
}
|
|
55
55
|
function valueScale(values, frame, options) {
|
|
56
|
-
let low =
|
|
57
|
-
let high = -
|
|
56
|
+
let low = 1e400;
|
|
57
|
+
let high = -1e400;
|
|
58
58
|
for (const value of values) {
|
|
59
59
|
if (value == null) continue;
|
|
60
60
|
if (value < low) low = value;
|
|
@@ -88,9 +88,9 @@ function averagePoints(points, scales) {
|
|
|
88
88
|
}
|
|
89
89
|
function meanDirectionDegOf(points, speedOf, directionOf) {
|
|
90
90
|
const blowing = points.filter((point) => !isCalm(speedOf(point)) && directionOf(point) != null);
|
|
91
|
-
return meanDirectionDeg(blowing.map((point) => directionOf(point)));
|
|
91
|
+
return meanDirectionDeg$1(blowing.map((point) => directionOf(point)));
|
|
92
92
|
}
|
|
93
|
-
function meanDirectionDeg
|
|
93
|
+
function meanDirectionDeg(points) {
|
|
94
94
|
return meanDirectionDegOf(points, (point) => point.windAvgMps, (point) => point.windDirectionDeg);
|
|
95
95
|
}
|
|
96
96
|
function vectorMeanWind(points) {
|
|
@@ -380,5 +380,4 @@ function compareTracePoints(comparePoints, scales, offsetDays) {
|
|
|
380
380
|
const shiftMs = offsetDays * DAY_MS;
|
|
381
381
|
return comparePoints.map((point) => coordinate(scales.xAtMs(Date.parse(point.observedAt) + shiftMs), scales.yAt(point.windAvgMps))).join(" ");
|
|
382
382
|
}
|
|
383
|
-
|
|
384
|
-
export { CHART_FALLBACK_WIDTH, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, HISTORY_GAP_TOLERANCE_FACTOR, METEOROLOGICAL_SEASON_MONTHS, averagePoints, bandPoints, chartFrame, chartScales, chartScalesOf, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, isCalmHistory, meanDirectionDeg$1 as meanDirectionDeg, meanDirectionDegOf, measuredChartWidth, nearestIndex, speedBand, stretchFrame, thinVanes, thinVanesOf, tickAnchor, tracePointsOf, trendRuns, trendSeriesPad, trendValueOf, valueScale, vanePath, vaneTicks, vectorMeanWind, windRose, windowPoints };
|
|
383
|
+
export { CHART_FALLBACK_WIDTH, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, HISTORY_GAP_TOLERANCE_FACTOR, METEOROLOGICAL_SEASON_MONTHS, averagePoints, bandPoints, chartFrame, chartScales, chartScalesOf, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, isCalmHistory, meanDirectionDeg, meanDirectionDegOf, measuredChartWidth, nearestIndex, speedBand, stretchFrame, thinVanes, thinVanesOf, tickAnchor, tracePointsOf, trendRuns, trendSeriesPad, trendValueOf, valueScale, vanePath, vaneTicks, vectorMeanWind, windRose, windowPoints };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AirConditions, History, HistoryPoint, LiveSample, LiveSamples, Reading, RecentSummary, STATION_SCHEMA_VERSION, Station, StationCapabilities, StationCurrent, StationFeed, StationHistory, StationLiveFrame, StationMeta, StationTelemetry, UNAVAILABLE_REASONS, UnavailableReason, airConditionsSchema, capabilitiesSchema, declaredFavorableDirections, directionArcSchema, emptyConditions, historyPointSchema, historySchema, liveSampleSchema, liveSamplesSchema, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, readingSchema, recentSummarySchema, stationCurrentSchema, stationFeedSchema, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, telemetrySchema, unavailableStation } from "./contract.js";
|
|
2
|
-
import { ClimatologyCell, ClimatologySector, ClimatologyYear, STATION_CLIMATOLOGY_SCHEMA_VERSION, StationClimatology, climatologyCellSchema, climatologySectorSchema, climatologyYearSchema, parseStationClimatology, parseStationClimatologyJson, stationClimatologySchema } from "./contract-climatology.js";
|
|
3
|
-
import { CALM_THRESHOLD_MPS, COMPASS_POINTS, CompassPoint, FreshnessStatus, FreshnessThresholds, PeriodSummary, PressureTendency, SpeedThresholds, SpeedUnit, compassDirection, freshness, isCalm, lastNightLowC, normalizeDegrees, periodSummary, pressureDeltaHpa, pressureTendency, seaLevelPressureHpa, speedFromMps, speedToMps, speedUnitLabel, stationFreshnessThresholds, thresholdsToMps } from "./derive.js";
|
|
4
|
-
import { FormatTime, StationStringOverrides, StationStrings, defaultFormatTime, defaultStrings, localeFormatTime, mergeStringOverrides, resolveStrings } from "./strings.js";
|
|
5
|
-
import { DirectionCellData, SummaryEntry, directionCell, optionalSpeed, roundSpeed, summaryEntries, temperatureText, temperatureValue, updatedAtText } from "./format.js";
|
|
6
2
|
import { CONNECTIVITY_SERVICE_STATES, ConnectivityServiceState, ConnectivitySession, StationConnectivity, connectivitySessionSchema, parseStationConnectivity, stationConnectivitySchema } from "./connectivity.js";
|
|
7
|
-
import {
|
|
3
|
+
import { CALM_THRESHOLD_MPS, COMPASS_POINTS, CompassPoint, FreshnessStatus, FreshnessThresholds, PeriodSummary, PressureTendency, SpeedThresholds, SpeedUnit, compassDirection, freshness, isCalm, lastNightLowC, normalizeDegrees, periodSummary, pressureDeltaHpa, pressureTendency, seaLevelPressureHpa, speedFromMps, speedToMps, speedUnitLabel, stationFreshnessThresholds, thresholdsToMps } from "./derive.js";
|
|
8
4
|
import { DisplayDefaults, DisplayProps, ResolvedDisplay, requireResolved, resolveDisplay, resolveStation } from "./display.js";
|
|
9
5
|
import { climatologyEndpoint, currentEndpoint, feedEndpoint, historyEndpoint, liveEndpoint } from "./endpoints.js";
|
|
10
|
-
import {
|
|
6
|
+
import { ClimatologyCell, ClimatologySector, ClimatologyYear, STATION_CLIMATOLOGY_SCHEMA_VERSION, StationClimatology, climatologyCellSchema, climatologySectorSchema, climatologyYearSchema, parseStationClimatology, parseStationClimatologyJson, stationClimatologySchema } from "./contract-climatology.js";
|
|
11
7
|
import { ClimatologyAccumulator, ClimatologyCoverage, ClimatologyFilters, ClimatologyFoldParams, accumulatedCells, climatologyCoverage, climatologyFavorableShare, climatologyPattern, climatologyRose, coveredSlotCountByYear, createClimatologyAccumulator, foldClimatologyPoints } from "./climatology.js";
|
|
8
|
+
import { DirectionCellData, SummaryEntry, directionCell, optionalSpeed, roundSpeed, summaryEntries, temperatureText, temperatureValue, updatedAtText } from "./format.js";
|
|
9
|
+
import { CHART_FALLBACK_WIDTH, ChartFrame, ChartScaleOptions, ChartScales, ChartTick, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, DailyPatternSlot, HistoryCoverage, METEOROLOGICAL_SEASON_MONTHS, RoseSector, TickAnchor, Vane, WindRoseSummary, averagePoints, bandPoints, chartFrame, chartScales, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, meanDirectionDeg, measuredChartWidth, nearestIndex, speedBand, thinVanes, tickAnchor, vanePath, vaneTicks, windRose, windowPoints } from "./geometry.js";
|
|
10
|
+
import { DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, FavorableDirection, HistoryRun, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, bandStrips, dialNeedlePoints, dialPolar, dialScaleMaxMps, dialSpeedArcPath, historyRuns, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, sparklineScale } from "./instruments.js";
|
|
12
11
|
import { MergeResult, foldCurrent, mergeCurrent } from "./merge-current.js";
|
|
13
12
|
import { SAMPLE_GAP_TOLERANCE_FACTOR, SamplesSummary, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, thinSampleVanes } from "./samples.js";
|
|
13
|
+
import { FormatTime, StationStringOverrides, StationStrings, defaultFormatTime, defaultStrings, localeFormatTime, mergeStringOverrides, resolveStrings } from "./strings.js";
|
|
14
14
|
import { AirRow, airRows, airSummary, lastStrikeWords } from "./air.js";
|
|
15
15
|
import { normalizeWindnerdStationKey, windnerdStationUrl } from "./windnerd.js";
|
|
16
16
|
export { type AirConditions, type AirRow, CALM_THRESHOLD_MPS, CHART_FALLBACK_WIDTH, COMPASS_POINTS, CONNECTIVITY_SERVICE_STATES, type ChartFrame, type ChartScaleOptions, type ChartScales, type ChartTick, type ClimatologyAccumulator, type ClimatologyCell, type ClimatologyCoverage, type ClimatologyFilters, type ClimatologyFoldParams, type ClimatologySector, type ClimatologyYear, type CompassPoint, type ConnectivityServiceState, type ConnectivitySession, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, type DailyPatternSlot, type DirectionCellData, type DisplayDefaults, type DisplayProps, type FavorableDirection, type FormatTime, type FreshnessStatus, type FreshnessThresholds, type History, type HistoryCoverage, type HistoryPoint, type HistoryRun, type LiveSample, type LiveSamples, METEOROLOGICAL_SEASON_MONTHS, type MergeResult, type PeriodSummary, type PressureTendency, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, type Reading, type RecentSummary, type ResolvedDisplay, type RoseSector, SAMPLE_GAP_TOLERANCE_FACTOR, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, STATION_CLIMATOLOGY_SCHEMA_VERSION, STATION_SCHEMA_VERSION, type SamplesSummary, type SpeedThresholds, type SpeedUnit, type Station, type StationCapabilities, type StationClimatology, type StationConnectivity, type StationCurrent, type StationFeed, type StationHistory, type StationLiveFrame, type StationMeta, type StationStringOverrides, type StationStrings, type StationTelemetry, type SummaryEntry, type TickAnchor, UNAVAILABLE_REASONS, type UnavailableReason, type Vane, type WindRoseSummary, accumulatedCells, airConditionsSchema, airRows, airSummary, averagePoints, bandPoints, bandStrips, capabilitiesSchema, chartFrame, chartScales, climatologyCellSchema, climatologyCoverage, climatologyEndpoint, climatologyFavorableShare, climatologyPattern, climatologyRose, climatologySectorSchema, climatologyYearSchema, compareTracePoints, compareWindow, compassDirection, connectivitySessionSchema, coveredSlotCountByYear, createClimatologyAccumulator, currentEndpoint, dailyPattern, declaredFavorableDirections, defaultFormatTime, defaultStrings, dialNeedlePoints, dialPolar, dialScaleMaxMps, dialSpeedArcPath, directionArcSchema, directionCell, emptyConditions, favorableShare, feedEndpoint, filterByMonth, filterByTimeOfDay, foldClimatologyPoints, foldCurrent, freshness, historyCoverage, historyEndpoint, historyGaps, meanDirectionDeg as historyMeanDirectionDeg, historyPointSchema, historyRuns, historySchema, isCalm, lastNightLowC, lastStrikeWords, liveEndpoint, liveSampleSchema, liveSamplesSchema, localeFormatTime, measuredChartWidth, mergeCurrent, mergeStringOverrides, nearestIndex, normalizeDegrees, normalizeWindnerdStationKey, optionalSpeed, parseStationClimatology, parseStationClimatologyJson, parseStationConnectivity, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, periodSummary, pressureDeltaHpa, pressureTendency, readingSchema, recentSummarySchema, requireResolved, resolveDisplay, resolveStation, resolveStrings, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, roundSpeed, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, seaLevelPressureHpa, sparklineScale, speedBand, speedFromMps, speedToMps, speedUnitLabel, stationClimatologySchema, stationConnectivitySchema, stationCurrentSchema, stationFeedSchema, stationFreshnessThresholds, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, summaryEntries, telemetrySchema, temperatureText, temperatureValue, thinSampleVanes, thinVanes, thresholdsToMps, tickAnchor, unavailableStation, updatedAtText, vanePath, vaneTicks, windRose, windnerdStationUrl, windowPoints };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { STATION_SCHEMA_VERSION, UNAVAILABLE_REASONS, airConditionsSchema, capabilitiesSchema, declaredFavorableDirections, directionArcSchema, emptyConditions, historyPointSchema, historySchema, liveSampleSchema, liveSamplesSchema, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, readingSchema, recentSummarySchema, stationCurrentSchema, stationFeedSchema, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, telemetrySchema, unavailableStation } from "./contract.js";
|
|
2
2
|
import { CONNECTIVITY_SERVICE_STATES, connectivitySessionSchema, parseStationConnectivity, stationConnectivitySchema } from "./connectivity.js";
|
|
3
3
|
import { CALM_THRESHOLD_MPS, COMPASS_POINTS, compassDirection, freshness, isCalm, lastNightLowC, normalizeDegrees, periodSummary, pressureDeltaHpa, pressureTendency, seaLevelPressureHpa, speedFromMps, speedToMps, speedUnitLabel, stationFreshnessThresholds, thresholdsToMps } from "./derive.js";
|
|
4
|
-
import { defaultFormatTime, defaultStrings, localeFormatTime, mergeStringOverrides, resolveStrings } from "./strings.js";
|
|
5
4
|
import { requireResolved, resolveDisplay, resolveStation } from "./display.js";
|
|
6
5
|
import { climatologyEndpoint, currentEndpoint, feedEndpoint, historyEndpoint, liveEndpoint } from "./endpoints.js";
|
|
7
6
|
import { STATION_CLIMATOLOGY_SCHEMA_VERSION, climatologyCellSchema, climatologySectorSchema, climatologyYearSchema, parseStationClimatology, parseStationClimatologyJson, stationClimatologySchema } from "./contract-climatology.js";
|
|
8
|
-
import { CHART_FALLBACK_WIDTH, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, METEOROLOGICAL_SEASON_MONTHS, averagePoints, bandPoints, chartFrame, chartScales, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, meanDirectionDeg, measuredChartWidth, nearestIndex, speedBand, thinVanes, tickAnchor, vanePath, vaneTicks, windRose, windowPoints } from "./geometry.js";
|
|
9
7
|
import { accumulatedCells, climatologyCoverage, climatologyFavorableShare, climatologyPattern, climatologyRose, coveredSlotCountByYear, createClimatologyAccumulator, foldClimatologyPoints } from "./climatology.js";
|
|
10
8
|
import { directionCell, optionalSpeed, roundSpeed, summaryEntries, temperatureText, temperatureValue, updatedAtText } from "./format.js";
|
|
9
|
+
import { CHART_FALLBACK_WIDTH, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, METEOROLOGICAL_SEASON_MONTHS, averagePoints, bandPoints, chartFrame, chartScales, compareTracePoints, compareWindow, dailyPattern, favorableShare, filterByMonth, filterByTimeOfDay, historyCoverage, historyGaps, meanDirectionDeg, measuredChartWidth, nearestIndex, speedBand, thinVanes, tickAnchor, vanePath, vaneTicks, windRose, windowPoints } from "./geometry.js";
|
|
11
10
|
import { DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, bandStrips, dialNeedlePoints, dialPolar, dialScaleMaxMps, dialSpeedArcPath, historyRuns, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, sparklineScale } from "./instruments.js";
|
|
12
11
|
import { foldCurrent, mergeCurrent } from "./merge-current.js";
|
|
13
12
|
import { SAMPLE_GAP_TOLERANCE_FACTOR, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, thinSampleVanes } from "./samples.js";
|
|
13
|
+
import { defaultFormatTime, defaultStrings, localeFormatTime, mergeStringOverrides, resolveStrings } from "./strings.js";
|
|
14
14
|
import { airRows, airSummary, lastStrikeWords } from "./air.js";
|
|
15
15
|
import { normalizeWindnerdStationKey, windnerdStationUrl } from "./windnerd.js";
|
|
16
16
|
export { CALM_THRESHOLD_MPS, CHART_FALLBACK_WIDTH, COMPASS_POINTS, CONNECTIVITY_SERVICE_STATES, DAILY_PATTERN_DEFAULT_SLOT_MINUTES, DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, METEOROLOGICAL_SEASON_MONTHS, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, SAMPLE_GAP_TOLERANCE_FACTOR, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, STATION_CLIMATOLOGY_SCHEMA_VERSION, STATION_SCHEMA_VERSION, UNAVAILABLE_REASONS, accumulatedCells, airConditionsSchema, airRows, airSummary, averagePoints, bandPoints, bandStrips, capabilitiesSchema, chartFrame, chartScales, climatologyCellSchema, climatologyCoverage, climatologyEndpoint, climatologyFavorableShare, climatologyPattern, climatologyRose, climatologySectorSchema, climatologyYearSchema, compareTracePoints, compareWindow, compassDirection, connectivitySessionSchema, coveredSlotCountByYear, createClimatologyAccumulator, currentEndpoint, dailyPattern, declaredFavorableDirections, defaultFormatTime, defaultStrings, dialNeedlePoints, dialPolar, dialScaleMaxMps, dialSpeedArcPath, directionArcSchema, directionCell, emptyConditions, favorableShare, feedEndpoint, filterByMonth, filterByTimeOfDay, foldClimatologyPoints, foldCurrent, freshness, historyCoverage, historyEndpoint, historyGaps, meanDirectionDeg as historyMeanDirectionDeg, historyPointSchema, historyRuns, historySchema, isCalm, lastNightLowC, lastStrikeWords, liveEndpoint, liveSampleSchema, liveSamplesSchema, localeFormatTime, measuredChartWidth, mergeCurrent, mergeStringOverrides, nearestIndex, normalizeDegrees, normalizeWindnerdStationKey, optionalSpeed, parseStationClimatology, parseStationClimatologyJson, parseStationConnectivity, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, periodSummary, pressureDeltaHpa, pressureTendency, readingSchema, recentSummarySchema, requireResolved, resolveDisplay, resolveStation, resolveStrings, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, roundSpeed, sampleMeanDirectionDeg, samplePoints, sampleRuns, sampleScales, samplesSummary, seaLevelPressureHpa, sparklineScale, speedBand, speedFromMps, speedToMps, speedUnitLabel, stationClimatologySchema, stationConnectivitySchema, stationCurrentSchema, stationFeedSchema, stationFreshnessThresholds, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, summaryEntries, telemetrySchema, temperatureText, temperatureValue, thinSampleVanes, thinVanes, thresholdsToMps, tickAnchor, unavailableStation, updatedAtText, vanePath, vaneTicks, windRose, windnerdStationUrl, windowPoints };
|
package/dist/instruments.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { HistoryPoint } from "./contract.js";
|
|
2
2
|
import { SpeedUnit } from "./derive.js";
|
|
3
3
|
import { DirectionArc } from "@azohra/meteo.core";
|
|
4
|
-
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare
|
|
15
|
-
declare function
|
|
16
|
-
declare function
|
|
17
|
-
declare function
|
|
18
|
-
declare
|
|
19
|
-
declare const DIAL_CARDINALS: readonly [{
|
|
4
|
+
export declare const DIAL_SIZE = 160;
|
|
5
|
+
export declare const DIAL_CENTRE: number;
|
|
6
|
+
export declare const DIAL_RING_RADIUS = 70;
|
|
7
|
+
export declare const DIAL_TICK_INNER = 64;
|
|
8
|
+
export declare const DIAL_CARDINAL_TICK_INNER = 58;
|
|
9
|
+
export declare const DIAL_LETTER_RADIUS = 46;
|
|
10
|
+
export declare const DIAL_HUB_RADIUS = 36;
|
|
11
|
+
export declare const DIAL_COUNTERWEIGHT_RADIUS = 4.5;
|
|
12
|
+
export declare const DIAL_COUNTERWEIGHT_REACH = 46;
|
|
13
|
+
export declare const DIAL_MIN_MAX_MPS: number;
|
|
14
|
+
export declare function dialPolar(bearingDeg: number, radius: number): readonly [number, number];
|
|
15
|
+
export declare function dialNeedlePoints(fromDeg: number): string;
|
|
16
|
+
export declare function dialSpeedArcPath(fraction: number): string;
|
|
17
|
+
export declare function dialScaleMaxMps(windAvgMps: number | null, windGustMps: number | null, unit: SpeedUnit): number;
|
|
18
|
+
export declare const DIAL_CARDINALS: readonly [{
|
|
20
19
|
readonly bearing: 0;
|
|
21
20
|
readonly letter: "N";
|
|
22
21
|
}, {
|
|
@@ -29,24 +28,24 @@ declare const DIAL_CARDINALS: readonly [{
|
|
|
29
28
|
readonly bearing: 270;
|
|
30
29
|
readonly letter: "W";
|
|
31
30
|
}];
|
|
32
|
-
declare const ROSE_SIZE = 190;
|
|
33
|
-
declare const ROSE_CENTRE: number;
|
|
34
|
-
declare const ROSE_MAX_RADIUS = 70;
|
|
35
|
-
declare const ROSE_FAVORABLE_RING_RADIUS = 75;
|
|
36
|
-
declare const ROSE_HUB_RADIUS = 16;
|
|
37
|
-
declare const ROSE_HUB_DOT_RADIUS = 3;
|
|
38
|
-
declare const ROSE_LETTER_RADIUS = 82;
|
|
39
|
-
declare const ROSE_TICK_REACH = 4;
|
|
40
|
-
declare const ROSE_PETAL_FILL = 0.82;
|
|
41
|
-
declare function rosePolar(bearingDeg: number, radius: number): readonly [number, number];
|
|
42
|
-
declare function rosePetalPath(bearingDeg: number, radius: number, halfWidthDeg: number): string;
|
|
31
|
+
export declare const ROSE_SIZE = 190;
|
|
32
|
+
export declare const ROSE_CENTRE: number;
|
|
33
|
+
export declare const ROSE_MAX_RADIUS = 70;
|
|
34
|
+
export declare const ROSE_FAVORABLE_RING_RADIUS = 75;
|
|
35
|
+
export declare const ROSE_HUB_RADIUS = 16;
|
|
36
|
+
export declare const ROSE_HUB_DOT_RADIUS = 3;
|
|
37
|
+
export declare const ROSE_LETTER_RADIUS = 82;
|
|
38
|
+
export declare const ROSE_TICK_REACH = 4;
|
|
39
|
+
export declare const ROSE_PETAL_FILL = 0.82;
|
|
40
|
+
export declare function rosePolar(bearingDeg: number, radius: number): readonly [number, number];
|
|
41
|
+
export declare function rosePetalPath(bearingDeg: number, radius: number, halfWidthDeg: number): string;
|
|
43
42
|
/** One radial slice of a petal — a stacked wedge's band segment; the petal
|
|
44
43
|
* itself is the slice from the hub out. */
|
|
45
|
-
declare function roseBandPath(bearingDeg: number, innerRadius: number, outerRadius: number, halfWidthDeg: number): string;
|
|
44
|
+
export declare function roseBandPath(bearingDeg: number, innerRadius: number, outerRadius: number, halfWidthDeg: number): string;
|
|
46
45
|
/** The rose ring's arc input; the shape is core's `DirectionArc`. */
|
|
47
|
-
type FavorableDirection = DirectionArc;
|
|
48
|
-
declare function roseRingArcPath(sector: FavorableDirection): string;
|
|
49
|
-
declare const ROSE_CARDINAL_LETTERS: readonly [{
|
|
46
|
+
export type FavorableDirection = DirectionArc;
|
|
47
|
+
export declare function roseRingArcPath(sector: FavorableDirection): string;
|
|
48
|
+
export declare const ROSE_CARDINAL_LETTERS: readonly [{
|
|
50
49
|
readonly bearing: 0;
|
|
51
50
|
readonly letter: "N";
|
|
52
51
|
}, {
|
|
@@ -59,19 +58,17 @@ declare const ROSE_CARDINAL_LETTERS: readonly [{
|
|
|
59
58
|
readonly bearing: 270;
|
|
60
59
|
readonly letter: "W";
|
|
61
60
|
}];
|
|
62
|
-
declare const ROSE_INTERCARDINAL_BEARINGS: readonly [45, 135, 225, 315];
|
|
63
|
-
declare const SPARKLINE_EDGE_INSET = 1;
|
|
64
|
-
declare const SPARKLINE_MAX_PADDING = 1.1;
|
|
65
|
-
declare function sparklineScale(points: ReadonlyArray<HistoryPoint>, width: number, height: number): {
|
|
61
|
+
export declare const ROSE_INTERCARDINAL_BEARINGS: readonly [45, 135, 225, 315];
|
|
62
|
+
export declare const SPARKLINE_EDGE_INSET = 1;
|
|
63
|
+
export declare const SPARKLINE_MAX_PADDING = 1.1;
|
|
64
|
+
export declare function sparklineScale(points: ReadonlyArray<HistoryPoint>, width: number, height: number): {
|
|
66
65
|
scaleMax: number;
|
|
67
66
|
xAt(ms: number): number;
|
|
68
67
|
yAt(speedMps: number): number;
|
|
69
68
|
};
|
|
70
|
-
type HistoryRun = {
|
|
69
|
+
export type HistoryRun = {
|
|
71
70
|
startedAt: string;
|
|
72
71
|
points: HistoryPoint[];
|
|
73
72
|
};
|
|
74
|
-
declare function historyRuns(points: ReadonlyArray<HistoryPoint>, periodMinutes: number): HistoryRun[];
|
|
75
|
-
declare function bandStrips(runs: ReadonlyArray<HistoryRun>): HistoryRun[];
|
|
76
|
-
//#endregion
|
|
77
|
-
export { DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, FavorableDirection, HistoryRun, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, bandStrips, dialNeedlePoints, dialPolar, dialScaleMaxMps, dialSpeedArcPath, historyRuns, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, sparklineScale };
|
|
73
|
+
export declare function historyRuns(points: ReadonlyArray<HistoryPoint>, periodMinutes: number): HistoryRun[];
|
|
74
|
+
export declare function bandStrips(runs: ReadonlyArray<HistoryRun>): HistoryRun[];
|
package/dist/instruments.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COMPASS_POINTS, KMH_PER_MPS, normalizeDegrees, radians, speedToMps } from "./derive.js";
|
|
2
2
|
import { HISTORY_GAP_TOLERANCE_FACTOR } from "./geometry.js";
|
|
3
|
-
|
|
3
|
+
// src/instruments.ts
|
|
4
4
|
const DIAL_SIZE = 160;
|
|
5
5
|
const DIAL_CENTRE = 80;
|
|
6
6
|
const DIAL_RING_RADIUS = 70;
|
|
@@ -182,5 +182,4 @@ function bandStrips(runs) {
|
|
|
182
182
|
}
|
|
183
183
|
return strips;
|
|
184
184
|
}
|
|
185
|
-
//#endregion
|
|
186
185
|
export { DIAL_CARDINALS, DIAL_CARDINAL_TICK_INNER, DIAL_CENTRE, DIAL_COUNTERWEIGHT_RADIUS, DIAL_COUNTERWEIGHT_REACH, DIAL_HUB_RADIUS, DIAL_LETTER_RADIUS, DIAL_MIN_MAX_MPS, DIAL_RING_RADIUS, DIAL_SIZE, DIAL_TICK_INNER, ROSE_CARDINAL_LETTERS, ROSE_CENTRE, ROSE_FAVORABLE_RING_RADIUS, ROSE_HUB_DOT_RADIUS, ROSE_HUB_RADIUS, ROSE_INTERCARDINAL_BEARINGS, ROSE_LETTER_RADIUS, ROSE_MAX_RADIUS, ROSE_PETAL_FILL, ROSE_SIZE, ROSE_TICK_REACH, SPARKLINE_EDGE_INSET, SPARKLINE_MAX_PADDING, bandStrips, dialNeedlePoints, dialPolar, dialRingArcPath, dialScaleMaxMps, dialSpeedArcPath, historyRuns, roseBandPath, rosePetalPath, rosePolar, roseRingArcPath, sparklineScale };
|