@azohra/meteo.station 0.7.1 → 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.
Files changed (92) hide show
  1. package/dist/client/climatology.d.ts +1 -1
  2. package/dist/client/history.js +1 -1
  3. package/dist/client/index.js +1 -1
  4. package/dist/client/live.d.ts +1 -1
  5. package/dist/client/stores.d.ts +1 -1
  6. package/dist/client/stores.js +1 -1
  7. package/dist/display.d.ts +1 -1
  8. package/dist/elements/elements/ClimatologyDailyPatternElement.js +1 -1
  9. package/dist/elements/elements/ClimatologyRoseElement.js +1 -1
  10. package/dist/elements/elements/DailyPatternElement.js +1 -1
  11. package/dist/elements/elements/StationCardElement.js +3 -3
  12. package/dist/elements/elements/StationFeedElement.js +2 -2
  13. package/dist/elements/elements/StationTableElement.js +1 -1
  14. package/dist/elements/elements/TrendChartElement.js +1 -1
  15. package/dist/elements/elements/WindHistoryChartElement.js +3 -3
  16. package/dist/elements/elements/atoms.js +1 -1
  17. package/dist/elements/index.d.ts +1 -1
  18. package/dist/elements/lib/base.js +1 -1
  19. package/dist/elements/lib/fragments.js +1 -1
  20. package/dist/endpoints.js +5 -1
  21. package/dist/geometry.d.ts +2 -3
  22. package/dist/geometry.js +6 -6
  23. package/dist/index.d.ts +6 -6
  24. package/dist/index.js +2 -2
  25. package/dist/react/components/CurrentConditions.js +2 -2
  26. package/dist/react/components/DailyPattern.js +1 -1
  27. package/dist/react/components/Dial.js +2 -2
  28. package/dist/react/components/Sparkline.js +1 -1
  29. package/dist/react/components/StationCard.js +3 -3
  30. package/dist/react/components/StationFeedProvider.js +1 -1
  31. package/dist/react/components/StationStrip.js +2 -2
  32. package/dist/react/components/StationTable.js +3 -3
  33. package/dist/react/components/TrendChart.d.ts +1 -1
  34. package/dist/react/components/TrendChart.js +2 -2
  35. package/dist/react/components/WindHistoryChart.js +3 -3
  36. package/dist/react/components/WindSampleStrip.js +3 -3
  37. package/dist/react/components/atoms.js +2 -2
  38. package/dist/react/hooks/useFreshness.js +1 -1
  39. package/dist/react/hooks/useStationClimatology.js +1 -1
  40. package/dist/react/index.d.ts +1 -1
  41. package/dist/react/index.js +3 -3
  42. package/dist/scene/atoms.d.ts +2 -2
  43. package/dist/scene/atoms.js +1 -1
  44. package/dist/scene/card.js +1 -1
  45. package/dist/scene/cells.d.ts +2 -2
  46. package/dist/scene/cells.js +1 -1
  47. package/dist/scene/climatology-pattern.d.ts +2 -2
  48. package/dist/scene/climatology-pattern.js +1 -1
  49. package/dist/scene/climatology-rose.d.ts +2 -2
  50. package/dist/scene/climatology-rose.js +1 -1
  51. package/dist/scene/compass-fan.d.ts +2 -2
  52. package/dist/scene/compass-fan.js +1 -1
  53. package/dist/scene/current.d.ts +2 -2
  54. package/dist/scene/current.js +2 -2
  55. package/dist/scene/daily-pattern.d.ts +2 -2
  56. package/dist/scene/daily-pattern.js +1 -1
  57. package/dist/scene/dial.d.ts +2 -2
  58. package/dist/scene/dial.js +2 -2
  59. package/dist/scene/favorable-share.d.ts +2 -2
  60. package/dist/scene/recent-summaries.d.ts +2 -2
  61. package/dist/scene/recent-summaries.js +1 -1
  62. package/dist/scene/rose.d.ts +2 -2
  63. package/dist/scene/sample-strip.d.ts +2 -2
  64. package/dist/scene/sample-strip.js +1 -1
  65. package/dist/scene/sparkline.js +1 -1
  66. package/dist/scene/strip.js +2 -2
  67. package/dist/scene/table.js +2 -2
  68. package/dist/scene/trend.d.ts +2 -2
  69. package/dist/scene/wind-history.d.ts +2 -2
  70. package/dist/scene/wind-history.js +2 -2
  71. package/dist/scene/wind-plot.d.ts +1 -1
  72. package/dist/scene/wind-plot.js +1 -1
  73. package/dist/server/adapters/campbell.d.ts +1 -1
  74. package/dist/server/adapters/campbell.js +1 -1
  75. package/dist/server/adapters/ecowitt.d.ts +1 -1
  76. package/dist/server/adapters/ecowitt.js +1 -1
  77. package/dist/server/adapters/tempest.d.ts +1 -1
  78. package/dist/server/adapters/tempest.js +1 -1
  79. package/dist/server/adapters/windnerd-climatology.d.ts +1 -1
  80. package/dist/server/adapters/windnerd-climatology.js +2 -2
  81. package/dist/server/adapters/windnerd-live.d.ts +1 -1
  82. package/dist/server/adapters/windnerd.d.ts +2 -2
  83. package/dist/server/adapters/windnerd.js +6 -6
  84. package/dist/server/environment.d.ts +2 -2
  85. package/dist/server/environment.js +13 -13
  86. package/dist/server/feed.d.ts +1 -1
  87. package/dist/server/feed.js +2 -2
  88. package/dist/server/handler.d.ts +1 -1
  89. package/dist/server/handler.js +2 -2
  90. package/dist/server/index.d.ts +1 -1
  91. package/dist/server/index.js +9 -9
  92. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { PollError } from "./poll.js";
2
1
  import { StationClimatology } from "../contract-climatology.js";
2
+ import { PollError } from "./poll.js";
3
3
  export type StationClimatologySnapshot = {
4
4
  document: StationClimatology | null;
5
5
  receivedAtMs: number | null;
@@ -1,5 +1,5 @@
1
- import { parseStationHistoryJson } from "../contract.js";
2
1
  import { historyEndpoint } from "../endpoints.js";
2
+ import { parseStationHistoryJson } from "../contract.js";
3
3
  import { WINDNERD_RECORD_PERIODS_MINUTES } from "../windnerd.js";
4
4
  import { REQUEST_TIMEOUT_MS } from "./poll.js";
5
5
  // src/client/history.ts
@@ -1,6 +1,6 @@
1
1
  import { FRESHNESS_REEVALUATE_MS, REQUEST_TIMEOUT_MS, createJsonPoller } from "./poll.js";
2
- import { LIVE_BACKOFF_MAX_MS, LIVE_BACKOFF_MIN_MS, LIVE_IDLE_RECONNECT_MS, createStationLiveStore, liveSnapshotToCurrent } from "./live.js";
3
2
  import { createStationCurrentStore, createStationFeedStore, createStationStore, parseCurrentText, parseFeedText } from "./stores.js";
3
+ import { LIVE_BACKOFF_MAX_MS, LIVE_BACKOFF_MIN_MS, LIVE_IDLE_RECONNECT_MS, createStationLiveStore, liveSnapshotToCurrent } from "./live.js";
4
4
  import { createStationClimatologyStore } from "./climatology.js";
5
5
  import { ARCHIVE_DEFAULT_PERIODS_MINUTES, ARCHIVE_TARGET_POINTS, HISTORY_STORE_DEFAULT_MAX_WINDOWS, archiveDayStep, archiveDayValue, archiveDayWindow, archivePeriodFor, archiveTrailingWindow, createStationHistoryStore, stationHistoryFetcher } from "./history.js";
6
6
  import { subscribeTicker } from "./ticker.js";
@@ -1,5 +1,5 @@
1
- import { PollError } from "./poll.js";
2
1
  import { LiveSample, Station, StationCurrent } from "../contract.js";
2
+ import { PollError } from "./poll.js";
3
3
  export declare const LIVE_BACKOFF_MIN_MS = 1000;
4
4
  export declare const LIVE_BACKOFF_MAX_MS = 30000;
5
5
  export declare const LIVE_IDLE_RECONNECT_MS = 60000;
@@ -1,5 +1,5 @@
1
- import { JsonPoller, ParseOutcome, PollError } from "./poll.js";
2
1
  import { Station, StationCurrent, StationFeed } from "../contract.js";
2
+ import { JsonPoller, ParseOutcome, PollError } from "./poll.js";
3
3
  export declare function parseFeedText(text: string): ParseOutcome<StationFeed>;
4
4
  export declare function parseCurrentText(text: string): ParseOutcome<StationCurrent>;
5
5
  type FetchInitOption = RequestInit | (() => RequestInit | undefined);
@@ -1,8 +1,8 @@
1
1
  import { stationCurrentSchema, stationFeedSchema } from "../contract.js";
2
2
  import { currentEndpoint, feedEndpoint } from "../endpoints.js";
3
3
  import { foldCurrent } from "../merge-current.js";
4
- import { createJsonPoller } from "./poll.js";
5
4
  import { createStationLiveStore, liveSnapshotToCurrent } from "./live.js";
5
+ import { createJsonPoller } from "./poll.js";
6
6
  // src/client/stores.ts
7
7
  const FEED_DEFAULT_POLL_SECONDS = 60;
8
8
  const CURRENT_DEFAULT_POLL_SECONDS = 15;
package/dist/display.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Station, StationFeed } from "./contract.js";
2
2
  import { SpeedThresholds, SpeedUnit } from "./derive.js";
3
- import { FormatTime, StationStringOverrides, StationStrings } from "./strings.js";
4
3
  import { FavorableDirection } from "./instruments.js";
4
+ import { FormatTime, StationStringOverrides, StationStrings } from "./strings.js";
5
5
  export type DisplayDefaults = {
6
6
  strings?: StationStringOverrides | undefined;
7
7
  unit?: SpeedUnit | undefined;
@@ -1,9 +1,9 @@
1
1
  import { measuredChartWidth } from "../../geometry.js";
2
2
  import { CLIMATOLOGY_PATTERN_CLASS, climatologyPatternScene, hasClimatology } from "../../scene/climatology-pattern.js";
3
- import { numberAttribute, parseMonthsAttribute } from "../lib/attributes.js";
4
3
  import { MeteoStationElement } from "../lib/base.js";
5
4
  import { h } from "../lib/h.js";
6
5
  import { renderChildren } from "../lib/render.js";
6
+ import { numberAttribute, parseMonthsAttribute } from "../lib/attributes.js";
7
7
  // src/elements/elements/ClimatologyDailyPatternElement.ts
8
8
  let hatchCounter = 0;
9
9
  var ClimatologyDailyPatternElement = class extends MeteoStationElement {
@@ -1,6 +1,6 @@
1
1
  import { climatologyRoseScene } from "../../scene/climatology-rose.js";
2
- import { parseMonthsAttribute, parseSlotsAttribute } from "../lib/attributes.js";
3
2
  import { MeteoStationElement } from "../lib/base.js";
3
+ import { parseMonthsAttribute, parseSlotsAttribute } from "../lib/attributes.js";
4
4
  import { renderScene } from "../lib/render.js";
5
5
  // src/elements/elements/ClimatologyRoseElement.ts
6
6
  var ClimatologyRoseElement = class extends MeteoStationElement {
@@ -1,5 +1,5 @@
1
- import { resolveStation } from "../../display.js";
2
1
  import { measuredChartWidth } from "../../geometry.js";
2
+ import { resolveStation } from "../../display.js";
3
3
  import { DAILY_PATTERN_CLASS, dailyPatternGate, dailyPatternScene, dailyPatternSource } from "../../scene/daily-pattern.js";
4
4
  import { numberAttribute } from "../lib/attributes.js";
5
5
  import { MeteoStationElement } from "../lib/base.js";
@@ -1,13 +1,13 @@
1
1
  import { freshness, stationFreshnessThresholds } from "../../derive.js";
2
2
  import { mergeStringOverrides, resolveStrings } from "../../strings.js";
3
3
  import { resolveDisplay } from "../../display.js";
4
- import { subscribeTicker } from "../../client/ticker.js";
5
4
  import { STATION_CARD_CLASS, cardHeaderNode, cardPartThresholds, cardPartWiringError, summaryNode } from "../../scene/card.js";
6
- import { numberAttribute } from "../lib/attributes.js";
7
- import { provideContext, requestContext } from "../lib/context.js";
8
5
  import { MeteoElement, MeteoStationElement } from "../lib/base.js";
6
+ import { provideContext, requestContext } from "../lib/context.js";
9
7
  import { h } from "../lib/h.js";
10
8
  import { renderOptional, renderScene } from "../lib/render.js";
9
+ import { numberAttribute } from "../lib/attributes.js";
10
+ import { subscribeTicker } from "../../client/ticker.js";
11
11
  // src/elements/elements/StationCardElement.ts
12
12
  const STATION_CARD_CONTEXT_KEY = "meteo-station-card";
13
13
  var StationCardElement = class extends MeteoStationElement {
@@ -1,9 +1,9 @@
1
- import { localeFormatTime } from "../../strings.js";
2
1
  import { createStationFeedStore, createStationStore } from "../../client/stores.js";
2
+ import { localeFormatTime } from "../../strings.js";
3
3
  import { STATION_FEED_CONTEXT_KEY } from "../lib/ambient.js";
4
4
  import { numberAttribute, parseArcsAttribute, parseThresholdsAttribute, unitAttribute } from "../lib/attributes.js";
5
- import { provideContext } from "../lib/context.js";
6
5
  import { MeteoElement } from "../lib/base.js";
6
+ import { provideContext } from "../lib/context.js";
7
7
  // src/elements/elements/StationFeedElement.ts
8
8
  var StationFeedElement = class extends MeteoElement {
9
9
  static observedAttributes = [
@@ -2,9 +2,9 @@ import { requireResolved } from "../../display.js";
2
2
  import { TABLE_BODY_CLASS, TABLE_ROW_CLASS, TABLE_STATION_CELL_CLASS, stationTableHeadNode, stationTableRootAttrs, stationTableRowCells } from "../../scene/table.js";
3
3
  import { ELEMENTS_AMBIENT_HINT } from "../lib/ambient.js";
4
4
  import { MeteoStationElement } from "../lib/base.js";
5
+ import { stationNameNode } from "../lib/fragments.js";
5
6
  import { h } from "../lib/h.js";
6
7
  import { renderScene } from "../lib/render.js";
7
- import { stationNameNode } from "../lib/fragments.js";
8
8
  // src/elements/elements/StationTableElement.ts
9
9
  var StationTableElement = class extends MeteoStationElement {
10
10
  static observedAttributes = [
@@ -1,7 +1,7 @@
1
1
  import { requireResolved } from "../../display.js";
2
2
  import { measuredChartWidth } from "../../geometry.js";
3
- import { readoutAriaLive } from "../../scene/chart.js";
4
3
  import { TREND_CLASS, trendGate, trendScene } from "../../scene/trend.js";
4
+ import { readoutAriaLive } from "../../scene/chart.js";
5
5
  import { ELEMENTS_AMBIENT_HINT } from "../lib/ambient.js";
6
6
  import { MeteoStationElement } from "../lib/base.js";
7
7
  import { h } from "../lib/h.js";
@@ -1,12 +1,12 @@
1
1
  import { measuredChartWidth } from "../../geometry.js";
2
- import { readoutAriaLive } from "../../scene/chart.js";
3
2
  import { WIND_CHART_CLASS, windChartGate, windChartScene } from "../../scene/wind-history.js";
3
+ import { readoutAriaLive } from "../../scene/chart.js";
4
4
  import { numberAttribute } from "../lib/attributes.js";
5
5
  import { MeteoStationElement } from "../lib/base.js";
6
- import { h } from "../lib/h.js";
7
- import { renderChildren, renderScene } from "../lib/render.js";
8
6
  import { windArrowSvg } from "../lib/fragments.js";
9
7
  import { PinnedCursor } from "../lib/pinned-cursor.js";
8
+ import { h } from "../lib/h.js";
9
+ import { renderChildren, renderScene } from "../lib/render.js";
10
10
  // src/elements/elements/WindHistoryChartElement.ts
11
11
  let hatchCounter = 0;
12
12
  function readoutSpan(parts) {
@@ -1,5 +1,5 @@
1
- import { pressureAtomScene, speedAtomScene, temperatureAtomScene } from "../../scene/atoms.js";
2
1
  import { bandChipNode, directionAtomNode, updatedAtNode, valueAtomNode } from "../../scene/cells.js";
2
+ import { pressureAtomScene, speedAtomScene, temperatureAtomScene } from "../../scene/atoms.js";
3
3
  import { MeteoStationElement } from "../lib/base.js";
4
4
  import { renderScene } from "../lib/render.js";
5
5
  // src/elements/elements/atoms.ts
@@ -1,4 +1,3 @@
1
- import { AmbientStationFeed } from "./lib/ambient.js";
2
1
  import { BandChipElement, DirectionElement, GustElement, LullElement, PressureElement, SpeedElement, TemperatureElement, UpdatedAtElement } from "./elements/atoms.js";
3
2
  import { AirExtremesElement } from "./elements/AirExtremesElement.js";
4
3
  import { AirMatrixElement } from "./elements/AirMatrixElement.js";
@@ -20,6 +19,7 @@ import { WindArrowElement } from "./elements/WindArrowElement.js";
20
19
  import { WindHistoryChartElement } from "./elements/WindHistoryChartElement.js";
21
20
  import { WindRoseElement } from "./elements/WindRoseElement.js";
22
21
  import { StationCardChartElement, StationCardElement, StationCardHeaderElement, StationCardInstrumentElement, StationCardSummaryElement } from "./elements/StationCardElement.js";
22
+ import { AmbientStationFeed } from "./lib/ambient.js";
23
23
  export declare const meteoElementTags: {
24
24
  readonly "meteo-station-feed": typeof StationFeedElement;
25
25
  readonly "meteo-station-card": typeof StationCardElement;
@@ -1,9 +1,9 @@
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";
6
+ import { subscribeTicker } from "../../client/ticker.js";
7
7
  // src/elements/lib/base.ts
8
8
  var MeteoElement = class extends HTMLElement {
9
9
  #cleanups = [];
@@ -1,5 +1,5 @@
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) {
package/dist/endpoints.js CHANGED
@@ -1,5 +1,9 @@
1
1
  // src/endpoints.ts
2
- const trimBase = (base) => base.replace(/\/+$/, "");
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
  }
@@ -33,7 +33,7 @@ export type ChartScaleOptions = {
33
33
  export declare function chartScales(points: ReadonlyArray<HistoryPoint>, frame: ChartFrame, options?: ChartScaleOptions): ChartScales;
34
34
  export declare function bandPoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string | null;
35
35
  export declare function averagePoints(points: ReadonlyArray<HistoryPoint>, scales: ChartScales): string;
36
- declare function meanDirectionDeg$1(points: ReadonlyArray<HistoryPoint>): number | null;
36
+ export declare function meanDirectionDeg(points: ReadonlyArray<HistoryPoint>): number | null;
37
37
  export type Vane = {
38
38
  windAvgMps: number;
39
39
  windDirectionDeg: number | null;
@@ -105,5 +105,4 @@ export declare function historyGaps(history: History, toleranceFactor?: number):
105
105
  export type TrendSeries = "temperature" | "pressure";
106
106
  export declare function windowPoints(points: ReadonlyArray<HistoryPoint>, hours?: number): ReadonlyArray<HistoryPoint>;
107
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;
109
- export { meanDirectionDeg$1 as meanDirectionDeg };
108
+ export declare function compareTracePoints(comparePoints: ReadonlyArray<HistoryPoint>, scales: ChartScales, offsetDays: number): string;
package/dist/geometry.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { KMH_PER_MPS, isCalm, normalizeDegrees, radians } from "./derive.js";
2
- import { componentsToWind, inDirectionArcs, meanDirectionDeg, windToComponents } from "@azohra/meteo.core";
2
+ import { componentsToWind, inDirectionArcs, meanDirectionDeg as meanDirectionDeg$1, windToComponents } from "@azohra/meteo.core";
3
3
  // src/geometry.ts
4
4
  const CHART_FALLBACK_WIDTH = 360;
5
5
  const CHART_AXIS_GUTTER = 46;
@@ -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 = Infinity;
57
- let high = -Infinity;
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$1(points) {
93
+ function meanDirectionDeg(points) {
94
94
  return meanDirectionDegOf(points, (point) => point.windAvgMps, (point) => point.windDirectionDeg);
95
95
  }
96
96
  function vectorMeanWind(points) {
@@ -380,4 +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
- 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 { 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";
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 { 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";
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 };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { stationFreshnessThresholds } from "../../derive.js";
3
2
  import { resolveDisplay } from "../../display.js";
3
+ import { stationFreshnessThresholds } from "../../derive.js";
4
4
  import { currentConditionsScene } from "../../scene/current.js";
5
+ import { useFreshness } from "../hooks/useFreshness.js";
5
6
  import { renderScene } from "./SceneTree.js";
6
7
  import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
7
- import { useFreshness } from "../hooks/useFreshness.js";
8
8
  import { useId } from "react";
9
9
  // src/react/components/CurrentConditions.tsx
10
10
  function CurrentConditions({ station: stationProp, stationId, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, thresholds: thresholdsProp, unit: unitProp, strings: stringsProp, formatTime: formatTimeProp }) {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { resolveDisplay } from "../../display.js";
3
2
  import { measuredChartWidth } from "../../geometry.js";
3
+ import { resolveDisplay } from "../../display.js";
4
4
  import { DAILY_PATTERN_CLASS, dailyPatternGate, dailyPatternScene, dailyPatternSource } from "../../scene/daily-pattern.js";
5
5
  import { renderChildren } from "./SceneTree.js";
6
6
  import { resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { resolveDisplay } from "../../display.js";
3
2
  import "../../instruments.js";
3
+ import { resolveDisplay } from "../../display.js";
4
4
  import { dialScene } from "../../scene/dial.js";
5
- import { renderScene } from "./SceneTree.js";
6
5
  import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
6
+ import { renderScene } from "./SceneTree.js";
7
7
  import { useId } from "react";
8
8
  // src/react/components/Dial.tsx
9
9
  function Dial({ station: stationProp, stationId, thresholds: thresholdsProp, favorableDirections: favorableDirectionsProp, unit: unitProp, size = 160, calmWord = true, strings: stringsProp }) {
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { resolveDisplay } from "../../display.js";
3
3
  import { sparklineScene } from "../../scene/sparkline.js";
4
- import { renderScene } from "./SceneTree.js";
5
4
  import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
5
+ import { renderScene } from "./SceneTree.js";
6
6
  // src/react/components/Sparkline.tsx
7
7
  function Sparkline({ station: stationProp, stationId, width = 120, height = 32, showBand = true, thresholds: thresholdsProp, strings: stringsProp }) {
8
8
  const context = useStationFeedContext();
@@ -1,12 +1,12 @@
1
1
  "use client";
2
+ import { resolveDisplay } from "../../display.js";
2
3
  import { stationFreshnessThresholds } from "../../derive.js";
3
4
  import { mergeStringOverrides } from "../../strings.js";
4
- import { resolveDisplay } from "../../display.js";
5
5
  import { STATION_CARD_CLASS, cardHeaderNode, cardPartThresholds, cardPartWiringError, summaryNode } from "../../scene/card.js";
6
- import { renderOptional, renderScene } from "./SceneTree.js";
7
- import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
8
6
  import { useFreshness } from "../hooks/useFreshness.js";
9
7
  import { CurrentConditions } from "./CurrentConditions.js";
8
+ import { renderOptional, renderScene } from "./SceneTree.js";
9
+ import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
10
10
  import { WindHistoryChart } from "./WindHistoryChart.js";
11
11
  import { createContext, useContext } from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { localeFormatTime } from "../../strings.js";
3
2
  import { requireResolved as requireResolved$1, resolveStation as resolveStation$1 } from "../../display.js";
3
+ import { localeFormatTime } from "../../strings.js";
4
4
  import { createContext, useContext, useMemo } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  // src/react/components/StationFeedProvider.tsx
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { stationFreshnessThresholds } from "../../derive.js";
3
2
  import { resolveDisplay } from "../../display.js";
3
+ import { stationFreshnessThresholds } from "../../derive.js";
4
4
  import { stationStripScene } from "../../scene/strip.js";
5
+ import { useFreshness } from "../hooks/useFreshness.js";
5
6
  import { renderScene } from "./SceneTree.js";
6
7
  import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
7
- import { useFreshness } from "../hooks/useFreshness.js";
8
8
  // src/react/components/StationStrip.tsx
9
9
  function StationStrip({ station: stationProp, stationId, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, unit: unitProp, strings: stringsProp, formatTime: formatTimeProp }) {
10
10
  const context = useStationFeedContext();
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { stationFreshnessThresholds } from "../../derive.js";
3
2
  import { resolveDisplay } from "../../display.js";
3
+ import { stationFreshnessThresholds } from "../../derive.js";
4
4
  import { TABLE_BODY_CLASS, TABLE_ROW_CLASS, TABLE_STATION_CELL_CLASS, stationTableHeadNode, stationTableRootAttrs, stationTableRowCells } from "../../scene/table.js";
5
- import { renderChildren, renderScene } from "./SceneTree.js";
6
- import { requireResolved, useStationFeedContext } from "./StationFeedProvider.js";
7
5
  import { useFreshness } from "../hooks/useFreshness.js";
8
6
  import { StationNameLink } from "../lib/cells.js";
7
+ import { renderChildren, renderScene } from "./SceneTree.js";
8
+ import { requireResolved, useStationFeedContext } from "./StationFeedProvider.js";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  // src/react/components/StationTable.tsx
11
11
  function StationTable({ stations: stationsProp, servedAt: servedAtProp, receivedAtMs: receivedAtMsProp, unit: unitProp, strings: stringsProp, formatTime: formatTimeProp, stationMeta }) {
@@ -1,7 +1,7 @@
1
1
  import { Station } from "../../contract.js";
2
2
  import { FormatTime, StationStringOverrides } from "../../strings.js";
3
- import { TrendSeries } from "../../geometry.js";
4
3
  import "../../index.js";
4
+ import { TrendSeries } from "../../geometry.js";
5
5
  export declare function TrendChart({ station: stationProp, stationId, series, strings: stringsProp, formatTime: formatTimeProp }: {
6
6
  station?: Station;
7
7
  stationId?: string;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { resolveDisplay } from "../../display.js";
3
3
  import { measuredChartWidth } from "../../geometry.js";
4
- import { readoutAriaLive } from "../../scene/chart.js";
5
4
  import { TREND_CLASS, trendGate, trendScene } from "../../scene/trend.js";
5
+ import { readoutAriaLive } from "../../scene/chart.js";
6
6
  import { renderScene } from "./SceneTree.js";
7
- import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
8
7
  import { usePinnedCursor } from "../lib/use-pinned-cursor.js";
8
+ import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
9
9
  import { useEffect, useRef, useState } from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  // src/react/components/TrendChart.tsx
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { resolveDisplay } from "../../display.js";
3
- import { readoutAriaLive } from "../../scene/chart.js";
4
3
  import { WIND_CHART_CLASS, windChartGate, windChartScene } from "../../scene/wind-history.js";
4
+ import { readoutAriaLive } from "../../scene/chart.js";
5
5
  import { renderScene } from "./SceneTree.js";
6
- import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
6
+ import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
7
7
  import { usePinnedCursor } from "../lib/use-pinned-cursor.js";
8
8
  import { Readout } from "./Readout.js";
9
- import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
9
+ import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
10
10
  import { useId, useRef } from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  // src/react/components/WindHistoryChart.tsx
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { resolveDisplay } from "../../display.js";
3
- import { readoutAriaLive } from "../../scene/chart.js";
4
3
  import { SAMPLE_STRIP_CLASS, sampleStripGate, sampleStripScene } from "../../scene/sample-strip.js";
4
+ import { readoutAriaLive } from "../../scene/chart.js";
5
5
  import { renderScene } from "./SceneTree.js";
6
- import { useStationFeedContext } from "./StationFeedProvider.js";
6
+ import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
7
7
  import { usePinnedCursor } from "../lib/use-pinned-cursor.js";
8
8
  import { Readout } from "./Readout.js";
9
- import { useMeasuredChartWidth } from "../hooks/useMeasuredChartWidth.js";
9
+ import { useStationFeedContext } from "./StationFeedProvider.js";
10
10
  import { useRef } from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  // src/react/components/WindSampleStrip.tsx
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { resolveDisplay } from "../../display.js";
3
2
  import { subscribeTicker } from "../../client/ticker.js";
4
- import { pressureAtomScene, speedAtomScene, temperatureAtomScene } from "../../scene/atoms.js";
3
+ import { resolveDisplay } from "../../display.js";
5
4
  import { bandChipNode, directionAtomNode, updatedAtNode, valueAtomNode } from "../../scene/cells.js";
5
+ import { pressureAtomScene, speedAtomScene, temperatureAtomScene } from "../../scene/atoms.js";
6
6
  import { renderScene } from "./SceneTree.js";
7
7
  import { requireResolved, resolveStation, useStationFeedContext } from "./StationFeedProvider.js";
8
8
  import { useEffect, useState } from "react";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { freshness } from "../../derive.js";
3
2
  import { subscribeTicker } from "../../client/ticker.js";
3
+ import { freshness } from "../../derive.js";
4
4
  import { useEffect, useState } from "react";
5
5
  // src/react/hooks/useFreshness.ts
6
6
  function useFreshness(observedAt, servedAt, receivedAtMs, thresholds) {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { climatologyEndpoint } from "../../endpoints.js";
3
2
  import { createStationClimatologyStore } from "../../client/climatology.js";
3
+ import { climatologyEndpoint } from "../../endpoints.js";
4
4
  import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
5
5
  // src/react/hooks/useStationClimatology.ts
6
6
  /** Fetches the station's climatology document once and holds it — near-
@@ -17,8 +17,8 @@ import { RecentSummaries } from "./components/RecentSummaries.js";
17
17
  import { ClimatologyRose } from "./components/ClimatologyRose.js";
18
18
  import { DailyPattern } from "./components/DailyPattern.js";
19
19
  import { ReadoutPart } from "../scene/chart.js";
20
- import "../scene/index.js";
21
20
  import { Readout } from "./components/Readout.js";
21
+ import "../scene/index.js";
22
22
  import { WindHistoryChart } from "./components/WindHistoryChart.js";
23
23
  import { WindRose } from "./components/WindRose.js";
24
24
  import { WindSampleStrip } from "./components/WindSampleStrip.js";
@@ -1,14 +1,13 @@
1
1
  "use client";
2
- import { StationFeedProvider, useStationFeedContext } from "./components/StationFeedProvider.js";
3
2
  import { AirMatrix } from "./components/AirMatrix.js";
4
3
  import { BandChip, Direction, Gust, Lull, Pressure, Speed, Temperature, UpdatedAt } from "./components/atoms.js";
5
- import { useFreshness } from "./hooks/useFreshness.js";
6
4
  import { CurrentConditions } from "./components/CurrentConditions.js";
7
5
  import { Dial } from "./components/Dial.js";
8
6
  import { FavorableShare } from "./components/FavorableShare.js";
9
7
  import { FreshnessBadge } from "./components/FreshnessBadge.js";
10
8
  import { Sparkline } from "./components/Sparkline.js";
11
9
  import { StationTable } from "./components/StationTable.js";
10
+ import { StationFeedProvider, useStationFeedContext } from "./components/StationFeedProvider.js";
12
11
  import { StationStrip } from "./components/StationStrip.js";
13
12
  import { TrendChart } from "./components/TrendChart.js";
14
13
  import { WindArrow } from "./components/WindArrow.js";
@@ -19,11 +18,12 @@ import { RecentSummaries } from "./components/RecentSummaries.js";
19
18
  import { ClimatologyRose } from "./components/ClimatologyRose.js";
20
19
  import { DailyPattern } from "./components/DailyPattern.js";
21
20
  import { Readout } from "./components/Readout.js";
22
- import { useMeasuredChartWidth } from "./hooks/useMeasuredChartWidth.js";
23
21
  import { WindHistoryChart } from "./components/WindHistoryChart.js";
24
22
  import { WindRose } from "./components/WindRose.js";
25
23
  import { WindSampleStrip } from "./components/WindSampleStrip.js";
26
24
  import { StationCard, StationCardChart, StationCardHeader, StationCardInstrument, StationCardSummary } from "./components/StationCard.js";
25
+ import { useFreshness } from "./hooks/useFreshness.js";
26
+ import { useMeasuredChartWidth } from "./hooks/useMeasuredChartWidth.js";
27
27
  import { useStation } from "./hooks/useStation.js";
28
28
  import { useStationClimatology } from "./hooks/useStationClimatology.js";
29
29
  import { useStationCurrent } from "./hooks/useStationCurrent.js";
@@ -1,5 +1,5 @@
1
1
  import "../contract.js";
2
2
  import "../derive.js";
3
- import "../strings.js";
4
3
  import "../format.js";
5
- import "../instruments.js";
4
+ import "../instruments.js";
5
+ import "../strings.js";