@azohra/meteo.station 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +17 -17
  2. package/dist/air.d.ts +4 -7
  3. package/dist/air.js +1 -2
  4. package/dist/client/climatology.d.ts +4 -7
  5. package/dist/client/climatology.js +1 -2
  6. package/dist/client/history.d.ts +14 -17
  7. package/dist/client/history.js +1 -2
  8. package/dist/client/live.d.ts +9 -11
  9. package/dist/client/live.js +1 -2
  10. package/dist/client/poll.d.ts +9 -12
  11. package/dist/client/poll.js +1 -2
  12. package/dist/client/stores.d.ts +8 -10
  13. package/dist/client/stores.js +1 -2
  14. package/dist/client/ticker.d.ts +1 -4
  15. package/dist/client/ticker.js +1 -2
  16. package/dist/climatology.d.ts +13 -15
  17. package/dist/climatology.js +1 -2
  18. package/dist/connectivity.d.ts +9 -12
  19. package/dist/connectivity.js +1 -2
  20. package/dist/contract-climatology.d.ts +11 -14
  21. package/dist/contract-climatology.js +1 -2
  22. package/dist/contract.d.ts +148 -151
  23. package/dist/contract.js +1 -2
  24. package/dist/derive.d.ts +24 -26
  25. package/dist/derive.js +5 -6
  26. package/dist/display.d.ts +6 -9
  27. package/dist/display.js +1 -2
  28. package/dist/elements/elements/AirExtremesElement.d.ts +2 -5
  29. package/dist/elements/elements/AirExtremesElement.js +6 -20
  30. package/dist/elements/elements/AirMatrixElement.d.ts +2 -5
  31. package/dist/elements/elements/AirMatrixElement.js +7 -33
  32. package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +2 -5
  33. package/dist/elements/elements/ClimatologyDailyPatternElement.js +18 -14
  34. package/dist/elements/elements/ClimatologyRoseElement.d.ts +2 -5
  35. package/dist/elements/elements/ClimatologyRoseElement.js +6 -17
  36. package/dist/elements/elements/CompassFanElement.d.ts +2 -5
  37. package/dist/elements/elements/CompassFanElement.js +6 -66
  38. package/dist/elements/elements/CurrentConditionsElement.d.ts +2 -5
  39. package/dist/elements/elements/CurrentConditionsElement.js +8 -28
  40. package/dist/elements/elements/DailyPatternElement.d.ts +2 -6
  41. package/dist/elements/elements/DailyPatternElement.js +7 -122
  42. package/dist/elements/elements/DialElement.d.ts +2 -5
  43. package/dist/elements/elements/DialElement.js +4 -97
  44. package/dist/elements/elements/FavorableShareElement.d.ts +2 -5
  45. package/dist/elements/elements/FavorableShareElement.js +7 -23
  46. package/dist/elements/elements/FreshnessBadgeElement.d.ts +2 -5
  47. package/dist/elements/elements/FreshnessBadgeElement.js +1 -2
  48. package/dist/elements/elements/RecentSummariesElement.d.ts +2 -5
  49. package/dist/elements/elements/RecentSummariesElement.js +7 -25
  50. package/dist/elements/elements/SparklineElement.d.ts +2 -6
  51. package/dist/elements/elements/SparklineElement.js +5 -41
  52. package/dist/elements/elements/StationCardElement.d.ts +6 -8
  53. package/dist/elements/elements/StationCardElement.js +5 -20
  54. package/dist/elements/elements/StationFeedElement.d.ts +2 -5
  55. package/dist/elements/elements/StationFeedElement.js +5 -4
  56. package/dist/elements/elements/StationStripElement.d.ts +2 -5
  57. package/dist/elements/elements/StationStripElement.js +5 -20
  58. package/dist/elements/elements/StationTableElement.d.ts +3 -6
  59. package/dist/elements/elements/StationTableElement.js +16 -53
  60. package/dist/elements/elements/TrendChartElement.d.ts +2 -5
  61. package/dist/elements/elements/TrendChartElement.js +22 -71
  62. package/dist/elements/elements/WindArrowElement.d.ts +2 -5
  63. package/dist/elements/elements/WindArrowElement.js +1 -2
  64. package/dist/elements/elements/WindHistoryChartElement.d.ts +2 -5
  65. package/dist/elements/elements/WindHistoryChartElement.js +24 -166
  66. package/dist/elements/elements/WindRoseElement.d.ts +2 -6
  67. package/dist/elements/elements/WindRoseElement.js +7 -72
  68. package/dist/elements/elements/atoms.d.ts +10 -12
  69. package/dist/elements/elements/atoms.js +12 -40
  70. package/dist/elements/index.d.ts +3 -5
  71. package/dist/elements/index.js +4 -5
  72. package/dist/elements/lib/ambient.d.ts +2 -5
  73. package/dist/elements/lib/ambient.js +1 -2
  74. package/dist/elements/lib/attributes.js +1 -2
  75. package/dist/elements/lib/base.d.ts +3 -6
  76. package/dist/elements/lib/base.js +1 -2
  77. package/dist/elements/lib/context.js +1 -2
  78. package/dist/elements/lib/fragments.js +9 -39
  79. package/dist/elements/lib/h.js +2 -3
  80. package/dist/elements/lib/pinned-cursor.js +1 -2
  81. package/dist/elements/lib/render.js +29 -0
  82. package/dist/elements/register.js +1 -2
  83. package/dist/endpoints.d.ts +6 -9
  84. package/dist/endpoints.js +1 -2
  85. package/dist/fixtures.d.ts +7 -10
  86. package/dist/fixtures.js +1 -2
  87. package/dist/format.d.ts +11 -14
  88. package/dist/format.js +1 -2
  89. package/dist/geometry.d.ts +36 -38
  90. package/dist/geometry.js +3 -3
  91. package/dist/instruments.d.ts +37 -40
  92. package/dist/instruments.js +3 -4
  93. package/dist/merge-current.d.ts +4 -7
  94. package/dist/merge-current.js +1 -2
  95. package/dist/react/components/AirExtremes.d.ts +2 -5
  96. package/dist/react/components/AirExtremes.js +6 -24
  97. package/dist/react/components/AirMatrix.d.ts +2 -5
  98. package/dist/react/components/AirMatrix.js +11 -45
  99. package/dist/react/components/ClimatologyDailyPattern.d.ts +2 -5
  100. package/dist/react/components/ClimatologyDailyPattern.js +20 -15
  101. package/dist/react/components/ClimatologyRose.d.ts +2 -5
  102. package/dist/react/components/ClimatologyRose.js +12 -30
  103. package/dist/react/components/CompassFan.d.ts +2 -5
  104. package/dist/react/components/CompassFan.js +7 -75
  105. package/dist/react/components/CurrentConditions.d.ts +2 -5
  106. package/dist/react/components/CurrentConditions.js +12 -76
  107. package/dist/react/components/DailyPattern.d.ts +3 -8
  108. package/dist/react/components/DailyPattern.js +11 -151
  109. package/dist/react/components/Dial.d.ts +2 -5
  110. package/dist/react/components/Dial.js +6 -120
  111. package/dist/react/components/FavorableShare.d.ts +2 -5
  112. package/dist/react/components/FavorableShare.js +7 -29
  113. package/dist/react/components/FreshnessBadge.d.ts +2 -5
  114. package/dist/react/components/FreshnessBadge.js +6 -14
  115. package/dist/react/components/Readout.d.ts +2 -5
  116. package/dist/react/components/Readout.js +1 -2
  117. package/dist/react/components/RecentSummaries.d.ts +2 -5
  118. package/dist/react/components/RecentSummaries.js +7 -46
  119. package/dist/react/components/SceneTree.js +37 -0
  120. package/dist/react/components/Sparkline.d.ts +2 -5
  121. package/dist/react/components/Sparkline.js +4 -41
  122. package/dist/react/components/StationCard.d.ts +8 -10
  123. package/dist/react/components/StationCard.js +6 -47
  124. package/dist/react/components/StationFeedProvider.d.ts +3 -6
  125. package/dist/react/components/StationFeedProvider.js +1 -2
  126. package/dist/react/components/StationStrip.d.ts +2 -5
  127. package/dist/react/components/StationStrip.js +6 -62
  128. package/dist/react/components/StationTable.d.ts +3 -6
  129. package/dist/react/components/StationTable.js +22 -77
  130. package/dist/react/components/TrendChart.d.ts +2 -5
  131. package/dist/react/components/TrendChart.js +9 -65
  132. package/dist/react/components/WindArrow.d.ts +2 -5
  133. package/dist/react/components/WindArrow.js +4 -17
  134. package/dist/react/components/WindHistoryChart.d.ts +2 -5
  135. package/dist/react/components/WindHistoryChart.js +9 -184
  136. package/dist/react/components/WindRose.d.ts +2 -7
  137. package/dist/react/components/WindRose.js +7 -91
  138. package/dist/react/components/WindSampleStrip.d.ts +2 -5
  139. package/dist/react/components/WindSampleStrip.js +9 -117
  140. package/dist/react/components/atoms.d.ts +12 -14
  141. package/dist/react/components/atoms.js +13 -50
  142. package/dist/react/hooks/useFreshness.d.ts +1 -4
  143. package/dist/react/hooks/useFreshness.js +1 -2
  144. package/dist/react/hooks/useMeasuredChartWidth.d.ts +2 -5
  145. package/dist/react/hooks/useMeasuredChartWidth.js +1 -2
  146. package/dist/react/hooks/usePolledJson.js +1 -2
  147. package/dist/react/hooks/useStation.d.ts +2 -5
  148. package/dist/react/hooks/useStation.js +1 -2
  149. package/dist/react/hooks/useStationClimatology.d.ts +2 -5
  150. package/dist/react/hooks/useStationClimatology.js +1 -2
  151. package/dist/react/hooks/useStationCurrent.d.ts +2 -5
  152. package/dist/react/hooks/useStationCurrent.js +4 -4
  153. package/dist/react/hooks/useStationFeed.d.ts +2 -5
  154. package/dist/react/hooks/useStationFeed.js +4 -4
  155. package/dist/react/hooks/useStationLive.d.ts +2 -5
  156. package/dist/react/hooks/useStationLive.js +1 -2
  157. package/dist/react/index.d.ts +2 -2
  158. package/dist/react/index.js +5 -5
  159. package/dist/react/lib/cells.js +5 -26
  160. package/dist/react/lib/use-pinned-cursor.js +1 -2
  161. package/dist/samples.d.ts +8 -11
  162. package/dist/samples.js +1 -2
  163. package/dist/scene/air-extremes.js +13 -29
  164. package/dist/scene/air-matrix.js +46 -60
  165. package/dist/scene/atoms.js +1 -2
  166. package/dist/scene/card.js +15 -42
  167. package/dist/scene/cells.d.ts +4 -0
  168. package/dist/scene/cells.js +50 -0
  169. package/dist/scene/chart.d.ts +2 -5
  170. package/dist/scene/chart.js +3 -3
  171. package/dist/scene/climatology-pattern.d.ts +1 -2
  172. package/dist/scene/climatology-pattern.js +11 -13
  173. package/dist/scene/climatology-rose.d.ts +1 -2
  174. package/dist/scene/climatology-rose.js +15 -35
  175. package/dist/scene/compass-fan.js +29 -102
  176. package/dist/scene/current.d.ts +2 -1
  177. package/dist/scene/current.js +30 -58
  178. package/dist/scene/daily-pattern.d.ts +1 -3
  179. package/dist/scene/daily-pattern.js +21 -29
  180. package/dist/scene/dial-parts.d.ts +1 -0
  181. package/dist/scene/dial-parts.js +69 -0
  182. package/dist/scene/dial.d.ts +1 -2
  183. package/dist/scene/dial.js +49 -138
  184. package/dist/scene/favorable-share.js +17 -35
  185. package/dist/scene/glyphs.js +21 -18
  186. package/dist/scene/index.d.ts +5 -3
  187. package/dist/scene/node.js +18 -0
  188. package/dist/scene/recent-summaries.js +27 -65
  189. package/dist/scene/rose.js +90 -119
  190. package/dist/scene/sample-strip.d.ts +1 -2
  191. package/dist/scene/sample-strip.js +36 -38
  192. package/dist/scene/sparkline.js +32 -42
  193. package/dist/scene/strip.js +19 -59
  194. package/dist/scene/table.js +48 -71
  195. package/dist/scene/trend.d.ts +1 -2
  196. package/dist/scene/trend.js +30 -57
  197. package/dist/scene/wind-history.d.ts +1 -2
  198. package/dist/scene/wind-history.js +42 -53
  199. package/dist/scene/wind-plot.js +71 -142
  200. package/dist/server/adapter.d.ts +7 -10
  201. package/dist/server/adapter.js +1 -2
  202. package/dist/server/adapters/campbell.d.ts +18 -20
  203. package/dist/server/adapters/campbell.js +2 -3
  204. package/dist/server/adapters/ecowitt.d.ts +12 -15
  205. package/dist/server/adapters/ecowitt.js +1 -2
  206. package/dist/server/adapters/tempest.d.ts +10 -13
  207. package/dist/server/adapters/tempest.js +1 -2
  208. package/dist/server/adapters/windnerd-climatology.d.ts +5 -8
  209. package/dist/server/adapters/windnerd-climatology.js +5 -5
  210. package/dist/server/adapters/windnerd-live.d.ts +2 -5
  211. package/dist/server/adapters/windnerd-live.js +4 -4
  212. package/dist/server/adapters/windnerd.d.ts +30 -33
  213. package/dist/server/adapters/windnerd.js +2 -3
  214. package/dist/server/config.d.ts +61 -63
  215. package/dist/server/config.js +1 -2
  216. package/dist/server/environment.d.ts +20 -22
  217. package/dist/server/environment.js +1 -2
  218. package/dist/server/feed.d.ts +19 -21
  219. package/dist/server/feed.js +1 -2
  220. package/dist/server/handler.d.ts +4 -7
  221. package/dist/server/handler.js +1 -2
  222. package/dist/server/hologram.d.ts +9 -12
  223. package/dist/server/hologram.js +3 -3
  224. package/dist/server/live.d.ts +2 -5
  225. package/dist/server/live.js +1 -2
  226. package/dist/sse.js +1 -2
  227. package/dist/strings.d.ts +8 -11
  228. package/dist/strings.js +1 -2
  229. package/dist/windnerd.d.ts +4 -7
  230. package/dist/windnerd.js +1 -2
  231. package/package.json +12 -17
  232. package/schema/README.md +1 -1
  233. package/schema/stationclimatology.schema.json +64 -61
  234. package/schema/stationcurrent.schema.json +68 -156
  235. package/schema/stationfeed.schema.json +71 -163
  236. package/schema/stationhistory.schema.json +37 -46
  237. package/schema/stationlive.schema.json +221 -306
package/README.md CHANGED
@@ -1,23 +1,24 @@
1
1
  # `@azohra/meteo.station`
2
2
 
3
- The **station** capability of meteo by Azohra: one wire contract, vendor
4
- adapters that normalize into it (WindNerd, WeatherFlow Tempest, Campbell
5
- Scientific loggers, Ecowitt, or your own), a mountable `Request → Response` handler
6
- that serves the whole inventory as a single feed, and hooks and components
7
- that render it natively, in your design system, with no vendor iframe.
3
+ Live weather stations for meteo by Azohra. Adapters read WindNerd,
4
+ WeatherFlow Tempest, Campbell Scientific loggers, Ecowitt, or your own
5
+ hardware and convert it to one wire contract. A handler you mount on your
6
+ server serves every station as a single feed, and React components or
7
+ custom elements render that feed on your page in your own styles, without a
8
+ vendor iframe.
8
9
 
9
10
  ## Surface
10
11
 
11
12
  | Entry point | What it is |
12
13
  |---|---|
13
- | `@azohra/meteo.station` | The isomorphic root: the wire contract (zod), the standalone connectivity contract (`StationConnectivity` — cellular backhaul health for the operator's own routes, never the public feed), pure derivations (period stats, compass, freshness, unit and threshold conversion), framework-free chart and instrument geometry, and the shared display rules (strings, formatting, air sentences, display resolution, merge policy) every binding renders from. |
14
- | `@azohra/meteo.station/client` | The framework-free client data layer: `createJsonPoller` and the station stores (`createStationFeedStore`, `createStationCurrentStore`, `createStationStore`) every binding subscribes to. Client-only at runtime, import-safe anywhere. |
15
- | `@azohra/meteo.station/server` | Vendor adapters plus the custom-adapter interface and `defineStationAdapter`, data-level `loadStationFeed()` / `loadStationCurrent()`, the Hologram connectivity loader (`loadHologramConnectivity`), and the mountable feed handler. Server-only, so it can never leak into a client bundle. |
14
+ | `@azohra/meteo.station` | Runs on server and client. The wire contract (zod); the separate connectivity contract, `StationConnectivity`, which reports cellular backhaul health on the operator's own routes and is never part of the public feed; pure derivations (period stats, compass, freshness, unit and threshold conversion); chart and instrument geometry; and the display rules both bindings share (strings, formatting, air sentences, display resolution, merge policy). |
15
+ | `@azohra/meteo.station/client` | The framework-free client data layer: `createJsonPoller` and the station stores (`createStationFeedStore`, `createStationCurrentStore`, `createStationStore`) every binding subscribes to. It runs only in the browser but is safe to import anywhere. |
16
+ | `@azohra/meteo.station/server` | Vendor adapters plus the custom-adapter interface and `defineStationAdapter`, data-level `loadStationFeed()` / `loadStationCurrent()`, the Hologram connectivity loader (`loadHologramConnectivity`), and the mountable feed handler. It is server-only, so it cannot end up in a client bundle. |
16
17
  | `@azohra/meteo.station/react` | `StationFeedProvider`, polling hooks (`useStation`, `useStationFeed`, `useStationCurrent`), the component set (`StationCard`, `CurrentConditions`, `WindHistoryChart`, `WindSampleStrip`, `TrendChart`, `WindRose`, `DailyPattern`, `StationTable`, `StationStrip`, `AirMatrix`, `FreshnessBadge`), and an atoms layer of inline primitives (`Speed`, `Gust`, `Lull`, `Temperature`, `Pressure`, `Direction`, `UpdatedAt`, `BandChip`, `Dial`, `Sparkline`, `Readout`) for composing your own layouts. |
17
- | `@azohra/meteo.station/elements` | The same surface as light-DOM custom elements (`<meteo-station-feed>`, `<meteo-station-card>`, `<meteo-station-table>`, the charts, the atoms…), a full peer of the React binding, framework-free, held byte-identical by a parity suite. `/register` is the auto-defining one-liner. |
18
+ | `@azohra/meteo.station/elements` | The same surface as light-DOM custom elements (`<meteo-station-feed>`, `<meteo-station-card>`, `<meteo-station-table>`, the charts, the atoms…), with the same features as the React binding and no framework. A parity suite keeps the two byte-identical. Import `/register` to define every element. |
18
19
  | `@azohra/meteo.station/styles.css` | The default skin (an intentional side effect), shared by both bindings. |
19
20
 
20
- ## Taste
21
+ ## Example
21
22
 
22
23
  ```tsx
23
24
  import { StationFeedProvider, useStation, StationCard } from "@azohra/meteo.station/react";
@@ -39,15 +40,14 @@ function LiveWind() {
39
40
 
40
41
  ## Documentation
41
42
 
42
- Station's reference lives in [`docs/`](docs/) and is served at
43
- <https://meteo.azohra.com/docs/station/>.
44
-
45
- JSON Schema for the wire documents lives in [`../schema/`](../schema/).
43
+ The documentation is in [`docs/`](docs/) and published at
44
+ <https://meteo.azohra.com/docs/station/>. JSON Schema for the wire
45
+ documents is in [`schema/`](schema/).
46
46
 
47
47
  ## Stability
48
48
 
49
- Pre-1.0: the wire contract and environment helpers are stable; handler
50
- internals are not. Pin a minor version if you reach past the documented
51
- surface.
49
+ The package is pre-1.0. The wire contract and environment helpers are
50
+ stable, and the handler's internals are not. Pin a minor version if you use
51
+ anything beyond the documented surface.
52
52
 
53
53
  MIT © Justin Watts
package/dist/air.d.ts CHANGED
@@ -1,13 +1,10 @@
1
1
  import { AirConditions } from "./contract.js";
2
2
  import { FormatTime, StationStrings } from "./strings.js";
3
- //#region src/air.d.ts
4
- declare function airSummary(conditions: AirConditions, strings?: StationStrings): string;
5
- declare function lastStrikeWords(conditions: AirConditions, formatTime: FormatTime, strings?: StationStrings): string;
6
- type AirRow = {
3
+ export declare function airSummary(conditions: AirConditions, strings?: StationStrings): string;
4
+ export declare function lastStrikeWords(conditions: AirConditions, formatTime: FormatTime, strings?: StationStrings): string;
5
+ export type AirRow = {
7
6
  label: string;
8
7
  unit: string;
9
8
  value: (conditions: AirConditions) => string | null;
10
9
  };
11
- declare function airRows(words: StationStrings): AirRow[];
12
- //#endregion
13
- export { AirRow, airRows, airSummary, lastStrikeWords };
10
+ export declare function airRows(words: StationStrings): AirRow[];
package/dist/air.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defaultStrings } from "./strings.js";
2
- //#region src/air.ts
2
+ // src/air.ts
3
3
  const round1 = (value) => Math.round(value * 10) / 10;
4
4
  function airSummary(conditions, strings = defaultStrings) {
5
5
  const words = strings.air;
@@ -72,5 +72,4 @@ function airRows(words) {
72
72
  }
73
73
  ];
74
74
  }
75
- //#endregion
76
75
  export { airRows, airSummary, lastStrikeWords };
@@ -1,13 +1,12 @@
1
1
  import { PollError } from "./poll.js";
2
2
  import { StationClimatology } from "../contract-climatology.js";
3
- //#region src/client/climatology.d.ts
4
- type StationClimatologySnapshot = {
3
+ export type StationClimatologySnapshot = {
5
4
  document: StationClimatology | null;
6
5
  receivedAtMs: number | null;
7
6
  loading: boolean;
8
7
  error: PollError | null;
9
8
  };
10
- type StationClimatologyStore = {
9
+ export type StationClimatologyStore = {
11
10
  getSnapshot(): StationClimatologySnapshot;
12
11
  subscribe(listener: () => void): () => void;
13
12
  /** Fetches once; further calls while a document is held are no-ops. */
@@ -20,8 +19,6 @@ type StationClimatologyStore = {
20
19
  * needs no poller. Every filter interaction re-aggregates the held cube
21
20
  * client-side; only load()/refresh() touch the network.
22
21
  */
23
- declare function createStationClimatologyStore(url: string, options?: {
22
+ export declare function createStationClimatologyStore(url: string, options?: {
24
23
  fetchInit?: RequestInit;
25
- }): StationClimatologyStore;
26
- //#endregion
27
- export { StationClimatologySnapshot, StationClimatologyStore, createStationClimatologyStore };
24
+ }): StationClimatologyStore;
@@ -1,6 +1,6 @@
1
1
  import { parseStationClimatologyJson } from "../contract-climatology.js";
2
2
  import { REQUEST_TIMEOUT_MS } from "./poll.js";
3
- //#region src/client/climatology.ts
3
+ // src/client/climatology.ts
4
4
  /**
5
5
  * Fetch-once store for the climatology document: near-immutable history
6
6
  * needs no poller. Every filter interaction re-aggregates the held cube
@@ -79,5 +79,4 @@ function createStationClimatologyStore(url, options = {}) {
79
79
  refresh
80
80
  };
81
81
  }
82
- //#endregion
83
82
  export { createStationClimatologyStore };
@@ -1,7 +1,6 @@
1
1
  import { StationHistory } from "../contract.js";
2
- //#region src/client/history.d.ts
3
- declare const HISTORY_STORE_DEFAULT_MAX_WINDOWS = 32;
4
- type StationHistoryQuery = {
2
+ export declare const HISTORY_STORE_DEFAULT_MAX_WINDOWS = 32;
3
+ export type StationHistoryQuery = {
5
4
  fromMs: number;
6
5
  toMs: number;
7
6
  periodMinutes: number;
@@ -9,10 +8,10 @@ type StationHistoryQuery = {
9
8
  /** One requested window in, one parsed document (or null on failure) out.
10
9
  * A host that mounts the feed handler uses `stationHistoryFetcher`; a host
11
10
  * serving history its own way supplies any function of this shape. */
12
- type StationHistoryFetcher = (query: StationHistoryQuery) => Promise<StationHistory | null>;
11
+ export type StationHistoryFetcher = (query: StationHistoryQuery) => Promise<StationHistory | null>;
13
12
  /** The default fetcher, against the mounted handler's /history route. */
14
- declare function stationHistoryFetcher(base: string, stationId: string, fetchInit?: RequestInit): StationHistoryFetcher;
15
- type StationHistoryStore = {
13
+ export declare function stationHistoryFetcher(base: string, stationId: string, fetchInit?: RequestInit): StationHistoryFetcher;
14
+ export type StationHistoryStore = {
16
15
  /** The window's document — cache-served when held, deduplicated while in
17
16
  * flight. A failed fetch resolves null and is not cached, so the next
18
17
  * ask retries. */
@@ -21,27 +20,25 @@ type StationHistoryStore = {
21
20
  size(): number;
22
21
  };
23
22
  /** A window-keyed LRU over a fetcher, so pan/zoom revisits cost nothing. */
24
- declare function createStationHistoryStore(fetcher: StationHistoryFetcher, options?: {
23
+ export declare function createStationHistoryStore(fetcher: StationHistoryFetcher, options?: {
25
24
  maxWindows?: number;
26
25
  }): StationHistoryStore;
27
- declare const ARCHIVE_DEFAULT_PERIODS_MINUTES: readonly [1, 5, 10, 15, 30, 60, 180, 360];
28
- declare const ARCHIVE_TARGET_POINTS = 500;
29
- type ArchiveWindow = {
26
+ export declare const ARCHIVE_DEFAULT_PERIODS_MINUTES: readonly [1, 5, 10, 15, 30, 60, 180, 360];
27
+ export declare const ARCHIVE_TARGET_POINTS = 500;
28
+ export type ArchiveWindow = {
30
29
  fromMs: number;
31
30
  toMs: number;
32
31
  };
33
32
  /** The finest ladder period that keeps the span at or under the point
34
33
  * target; a span too wide for every rung takes the coarsest. */
35
- declare function archivePeriodFor(spanMs: number, periods?: ReadonlyArray<number>, targetPoints?: number): number;
34
+ export declare function archivePeriodFor(spanMs: number, periods?: ReadonlyArray<number>, targetPoints?: number): number;
36
35
  /** One whole LOCAL day from a YYYY-MM-DD date-input value (not the UTC
37
36
  * day); null when the value is not a real date. */
38
- declare function archiveDayWindow(dateValue: string): ArchiveWindow | null;
37
+ export declare function archiveDayWindow(dateValue: string): ArchiveWindow | null;
39
38
  /** The YYYY-MM-DD value naming an instant's local day. */
40
- declare function archiveDayValue(atMs: number): string;
39
+ export declare function archiveDayValue(atMs: number): string;
41
40
  /** The day value deltaDays away. Steps through noon so a DST-shifted
42
41
  * midnight cannot skip a day; null for an invalid value. */
43
- declare function archiveDayStep(dateValue: string, deltaDays: number): string | null;
42
+ export declare function archiveDayStep(dateValue: string, deltaDays: number): string | null;
44
43
  /** The trailing 24 h ending at nowMs. */
45
- declare function archiveTrailingWindow(nowMs: number, spanMs?: number): ArchiveWindow;
46
- //#endregion
47
- export { ARCHIVE_DEFAULT_PERIODS_MINUTES, ARCHIVE_TARGET_POINTS, ArchiveWindow, HISTORY_STORE_DEFAULT_MAX_WINDOWS, StationHistoryFetcher, StationHistoryQuery, StationHistoryStore, archiveDayStep, archiveDayValue, archiveDayWindow, archivePeriodFor, archiveTrailingWindow, createStationHistoryStore, stationHistoryFetcher };
44
+ export declare function archiveTrailingWindow(nowMs: number, spanMs?: number): ArchiveWindow;
@@ -2,7 +2,7 @@ import { parseStationHistoryJson } from "../contract.js";
2
2
  import { historyEndpoint } from "../endpoints.js";
3
3
  import { WINDNERD_RECORD_PERIODS_MINUTES } from "../windnerd.js";
4
4
  import { REQUEST_TIMEOUT_MS } from "./poll.js";
5
- //#region src/client/history.ts
5
+ // src/client/history.ts
6
6
  const HISTORY_STORE_DEFAULT_MAX_WINDOWS = 32;
7
7
  /** The default fetcher, against the mounted handler's /history route. */
8
8
  function stationHistoryFetcher(base, stationId, fetchInit) {
@@ -100,5 +100,4 @@ function archiveTrailingWindow(nowMs, spanMs = DAY_MS) {
100
100
  toMs: nowMs
101
101
  };
102
102
  }
103
- //#endregion
104
103
  export { ARCHIVE_DEFAULT_PERIODS_MINUTES, ARCHIVE_TARGET_POINTS, HISTORY_STORE_DEFAULT_MAX_WINDOWS, archiveDayStep, archiveDayValue, archiveDayWindow, archivePeriodFor, archiveTrailingWindow, createStationHistoryStore, stationHistoryFetcher };
@@ -1,11 +1,10 @@
1
1
  import { PollError } from "./poll.js";
2
2
  import { LiveSample, Station, StationCurrent } from "../contract.js";
3
- //#region src/client/live.d.ts
4
- declare const LIVE_BACKOFF_MIN_MS = 1000;
5
- declare const LIVE_BACKOFF_MAX_MS = 30000;
6
- declare const LIVE_IDLE_RECONNECT_MS = 60000;
7
- type LiveStatus = "connecting" | "open" | "backoff" | "stopped";
8
- type StationLiveSnapshot = {
3
+ export declare const LIVE_BACKOFF_MIN_MS = 1000;
4
+ export declare const LIVE_BACKOFF_MAX_MS = 30000;
5
+ export declare const LIVE_IDLE_RECONNECT_MS = 60000;
6
+ export type LiveStatus = "connecting" | "open" | "backoff" | "stopped";
7
+ export type StationLiveSnapshot = {
9
8
  status: LiveStatus;
10
9
  station: Station | null;
11
10
  samples: LiveSample[];
@@ -14,7 +13,7 @@ type StationLiveSnapshot = {
14
13
  receivedAtMs: number | null;
15
14
  error: PollError | null;
16
15
  };
17
- type StationLiveStore = {
16
+ export type StationLiveStore = {
18
17
  getSnapshot(): StationLiveSnapshot;
19
18
  subscribe(listener: () => void): () => void;
20
19
  start(): void;
@@ -29,10 +28,9 @@ type FetchInitOption = RequestInit | (() => RequestInit | undefined);
29
28
  * disconnect and reconnect on return; a reconnect's fresh init frame heals
30
29
  * any gap the ring can cover.
31
30
  */
32
- declare function createStationLiveStore(base: string, stationId: string, options?: {
31
+ export declare function createStationLiveStore(base: string, stationId: string, options?: {
33
32
  fetchInit?: FetchInitOption;
34
33
  windowSeconds?: number;
35
34
  }): StationLiveStore;
36
- declare function liveSnapshotToCurrent(live: Pick<StationLiveSnapshot, "station" | "servedAt" | "samples" | "sampleIntervalSeconds">): StationCurrent | null;
37
- //#endregion
38
- export { LIVE_BACKOFF_MAX_MS, LIVE_BACKOFF_MIN_MS, LIVE_IDLE_RECONNECT_MS, LiveStatus, StationLiveSnapshot, StationLiveStore, createStationLiveStore, liveSnapshotToCurrent };
35
+ export declare function liveSnapshotToCurrent(live: Pick<StationLiveSnapshot, "station" | "servedAt" | "samples" | "sampleIntervalSeconds">): StationCurrent | null;
36
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { parseStationLiveFrameJson } from "../contract.js";
2
2
  import { liveEndpoint } from "../endpoints.js";
3
3
  import { sseEvents } from "../sse.js";
4
- //#region src/client/live.ts
4
+ // src/client/live.ts
5
5
  const LIVE_BACKOFF_MIN_MS = 1e3;
6
6
  const LIVE_BACKOFF_MAX_MS = 3e4;
7
7
  const LIVE_IDLE_RECONNECT_MS = 6e4;
@@ -255,5 +255,4 @@ function mergeSamples(existing, incoming, windowSeconds) {
255
255
  const cutoffMs = Date.parse(latest.observedAt) - windowSeconds * 1e3;
256
256
  return merged.filter((sample) => Date.parse(sample.observedAt) >= cutoffMs);
257
257
  }
258
- //#endregion
259
258
  export { LIVE_BACKOFF_MAX_MS, LIVE_BACKOFF_MIN_MS, LIVE_IDLE_RECONNECT_MS, createStationLiveStore, liveSnapshotToCurrent };
@@ -1,42 +1,39 @@
1
- //#region src/client/poll.d.ts
2
- type PollError = {
1
+ export type PollError = {
3
2
  kind: "network";
4
3
  status?: number;
5
4
  } | {
6
5
  kind: "contract";
7
6
  cause?: unknown;
8
7
  };
9
- type ParseOutcome<T> = {
8
+ export type ParseOutcome<T> = {
10
9
  ok: true;
11
10
  data: T;
12
11
  } | {
13
12
  ok: false;
14
13
  cause: unknown;
15
14
  };
16
- type PollSeed<T> = {
15
+ export type PollSeed<T> = {
17
16
  data: T;
18
17
  receivedAtMs: number;
19
18
  };
20
- type PollSnapshot<T> = {
19
+ export type PollSnapshot<T> = {
21
20
  data: T | null;
22
21
  error: PollError | null;
23
22
  receivedAtMs: number | null;
24
23
  };
25
- declare const REQUEST_TIMEOUT_MS = 15000;
26
- declare const FRESHNESS_REEVALUATE_MS = 30000;
27
- type JsonPollerOptions<T> = {
24
+ export declare const REQUEST_TIMEOUT_MS = 15000;
25
+ export declare const FRESHNESS_REEVALUATE_MS = 30000;
26
+ export type JsonPollerOptions<T> = {
28
27
  parse: (text: string) => ParseOutcome<T>;
29
28
  intervalMsFor: (last: T | null) => number;
30
29
  fetchInit?: RequestInit | (() => RequestInit | undefined);
31
30
  initial?: PollSeed<T>;
32
31
  };
33
- type JsonPoller<T> = {
32
+ export type JsonPoller<T> = {
34
33
  getSnapshot(): PollSnapshot<T>;
35
34
  subscribe(listener: () => void): () => void;
36
35
  start(): void;
37
36
  stop(): void;
38
37
  refresh(): void;
39
38
  };
40
- declare function createJsonPoller<T>(url: string, options: JsonPollerOptions<T>): JsonPoller<T>;
41
- //#endregion
42
- export { FRESHNESS_REEVALUATE_MS, JsonPoller, JsonPollerOptions, ParseOutcome, PollError, PollSeed, PollSnapshot, REQUEST_TIMEOUT_MS, createJsonPoller };
39
+ export declare function createJsonPoller<T>(url: string, options: JsonPollerOptions<T>): JsonPoller<T>;
@@ -1,4 +1,4 @@
1
- //#region src/client/poll.ts
1
+ // src/client/poll.ts
2
2
  const REQUEST_TIMEOUT_MS = 15e3;
3
3
  const FRESHNESS_REEVALUATE_MS = 3e4;
4
4
  function createJsonPoller(url, options) {
@@ -117,5 +117,4 @@ function createJsonPoller(url, options) {
117
117
  }
118
118
  };
119
119
  }
120
- //#endregion
121
120
  export { FRESHNESS_REEVALUATE_MS, REQUEST_TIMEOUT_MS, createJsonPoller };
@@ -1,10 +1,9 @@
1
1
  import { JsonPoller, ParseOutcome, PollError } from "./poll.js";
2
2
  import { Station, StationCurrent, StationFeed } from "../contract.js";
3
- //#region src/client/stores.d.ts
4
- declare function parseFeedText(text: string): ParseOutcome<StationFeed>;
5
- declare function parseCurrentText(text: string): ParseOutcome<StationCurrent>;
3
+ export declare function parseFeedText(text: string): ParseOutcome<StationFeed>;
4
+ export declare function parseCurrentText(text: string): ParseOutcome<StationCurrent>;
6
5
  type FetchInitOption = RequestInit | (() => RequestInit | undefined);
7
- declare function createStationFeedStore(base: string, options?: {
6
+ export declare function createStationFeedStore(base: string, options?: {
8
7
  pollSeconds?: number;
9
8
  fetchInit?: FetchInitOption;
10
9
  initial?: {
@@ -12,7 +11,7 @@ declare function createStationFeedStore(base: string, options?: {
12
11
  receivedAtMs: number;
13
12
  };
14
13
  }): JsonPoller<StationFeed>;
15
- declare function createStationCurrentStore(base: string, stationId: string, options?: {
14
+ export declare function createStationCurrentStore(base: string, stationId: string, options?: {
16
15
  pollSeconds?: number;
17
16
  fetchInit?: FetchInitOption;
18
17
  initial?: {
@@ -20,20 +19,20 @@ declare function createStationCurrentStore(base: string, stationId: string, opti
20
19
  receivedAtMs: number;
21
20
  };
22
21
  }): JsonPoller<StationCurrent>;
23
- type StationSnapshot = {
22
+ export type StationSnapshot = {
24
23
  feed: StationFeed | null;
25
24
  station: Station | null;
26
25
  receivedAtMs: number | null;
27
26
  error: PollError | null;
28
27
  };
29
- type StationStore = {
28
+ export type StationStore = {
30
29
  getSnapshot(): StationSnapshot;
31
30
  subscribe(listener: () => void): () => void;
32
31
  start(): void;
33
32
  stop(): void;
34
33
  refresh(): void;
35
34
  };
36
- declare function createStationStore(base: string, stationId: string, options?: {
35
+ export declare function createStationStore(base: string, stationId: string, options?: {
37
36
  pollSeconds?: number;
38
37
  currentPollSeconds?: number;
39
38
  fetchInit?: FetchInitOption;
@@ -43,5 +42,4 @@ declare function createStationStore(base: string, stationId: string, options?: {
43
42
  };
44
43
  live?: boolean;
45
44
  }): StationStore;
46
- //#endregion
47
- export { StationSnapshot, StationStore, createStationCurrentStore, createStationFeedStore, createStationStore, parseCurrentText, parseFeedText };
45
+ export {};
@@ -3,7 +3,7 @@ import { currentEndpoint, feedEndpoint } from "../endpoints.js";
3
3
  import { foldCurrent } from "../merge-current.js";
4
4
  import { createJsonPoller } from "./poll.js";
5
5
  import { createStationLiveStore, liveSnapshotToCurrent } from "./live.js";
6
- //#region src/client/stores.ts
6
+ // src/client/stores.ts
7
7
  const FEED_DEFAULT_POLL_SECONDS = 60;
8
8
  const CURRENT_DEFAULT_POLL_SECONDS = 15;
9
9
  function parseFeedText(text) {
@@ -167,5 +167,4 @@ function createStationStore(base, stationId, options = {}) {
167
167
  }
168
168
  };
169
169
  }
170
- //#endregion
171
170
  export { createStationCurrentStore, createStationFeedStore, createStationStore, parseCurrentText, parseFeedText };
@@ -1,4 +1 @@
1
- //#region src/client/ticker.d.ts
2
- declare function subscribeTicker(listener: () => void): () => void;
3
- //#endregion
4
- export { subscribeTicker };
1
+ export declare function subscribeTicker(listener: () => void): () => void;
@@ -1,5 +1,5 @@
1
1
  import { FRESHNESS_REEVALUATE_MS } from "./poll.js";
2
- //#region src/client/ticker.ts
2
+ // src/client/ticker.ts
3
3
  const listeners = /* @__PURE__ */ new Set();
4
4
  let timer = null;
5
5
  function subscribeTicker(listener) {
@@ -15,5 +15,4 @@ function subscribeTicker(listener) {
15
15
  }
16
16
  };
17
17
  }
18
- //#endregion
19
18
  export { subscribeTicker };
@@ -2,8 +2,7 @@ import { HistoryPoint } from "./contract.js";
2
2
  import { ClimatologyCell, StationClimatology } from "./contract-climatology.js";
3
3
  import { DailyPatternSlot, WindRoseSummary } from "./geometry.js";
4
4
  import { DirectionArc } from "@azohra/meteo.core";
5
- //#region src/climatology.d.ts
6
- type ClimatologyFoldParams = {
5
+ export type ClimatologyFoldParams = {
7
6
  sectorCount: number;
8
7
  slotMinutes: number;
9
8
  /** The consumer's band bounds in m/s, ascending — a judgment parameter
@@ -24,18 +23,18 @@ type MutableCell = {
24
23
  calmCount: number;
25
24
  sectors: Map<number, MutableSector>;
26
25
  };
27
- type ClimatologyAccumulator = {
26
+ export type ClimatologyAccumulator = {
28
27
  readonly params: ClimatologyFoldParams;
29
28
  readonly cells: Map<string, MutableCell>;
30
29
  /** Distinct (month, day, slot) buckets holding a record, per year. */
31
30
  readonly coveredSlots: Map<number, Set<string>>;
32
31
  };
33
- declare function createClimatologyAccumulator(params: ClimatologyFoldParams): ClimatologyAccumulator;
34
- declare function foldClimatologyPoints(accumulator: ClimatologyAccumulator, points: ReadonlyArray<HistoryPoint>): void;
32
+ export declare function createClimatologyAccumulator(params: ClimatologyFoldParams): ClimatologyAccumulator;
33
+ export declare function foldClimatologyPoints(accumulator: ClimatologyAccumulator, points: ReadonlyArray<HistoryPoint>): void;
35
34
  /** The accumulated buckets as wire cells: month, then slot, then sector,
36
35
  * every empty bucket absent. */
37
- declare function accumulatedCells(accumulator: ClimatologyAccumulator): ClimatologyCell[];
38
- type ClimatologyFilters = {
36
+ export declare function accumulatedCells(accumulator: ClimatologyAccumulator): ClimatologyCell[];
37
+ export type ClimatologyFilters = {
39
38
  /** Calendar months to keep, 1–12; absent keeps all. */
40
39
  months?: ReadonlyArray<number>;
41
40
  /** Slot-of-day indices to keep; absent keeps all. */
@@ -43,24 +42,23 @@ type ClimatologyFilters = {
43
42
  };
44
43
  /** The filtered cube as a rose — geometry's WindRoseSummary shape, every
45
44
  * sector carrying its bandCounts stack. */
46
- declare function climatologyRose(document: StationClimatology, filters?: ClimatologyFilters): WindRoseSummary;
45
+ export declare function climatologyRose(document: StationClimatology, filters?: ClimatologyFilters): WindRoseSummary;
47
46
  /** The filtered cube as a typical day — geometry's DailyPatternSlot list,
48
47
  * vector-averaged per slot, calm records weighing the mean down exactly as
49
48
  * the point-level dailyPattern does. */
50
- declare function climatologyPattern(document: StationClimatology, filters?: Pick<ClimatologyFilters, "months">): DailyPatternSlot[];
51
- type ClimatologyCoverage = {
49
+ export declare function climatologyPattern(document: StationClimatology, filters?: Pick<ClimatologyFilters, "months">): DailyPatternSlot[];
50
+ export type ClimatologyCoverage = {
52
51
  sampleCount: number;
53
52
  expectedCount: number;
54
53
  ratio: number | null;
55
54
  };
56
55
  /** Per-year covered-slot counts, for producers writing the ledger. */
57
- declare function coveredSlotCountByYear(accumulator: ClimatologyAccumulator): Map<number, number>;
56
+ export declare function coveredSlotCountByYear(accumulator: ClimatologyAccumulator): Map<number, number>;
58
57
  /** Summed over the ledger. The ratio comes only from the slot pair and is
59
58
  * null when any year lacks it — no percent beats a wrong-unit percent. */
60
- declare function climatologyCoverage(document: StationClimatology): ClimatologyCoverage;
59
+ export declare function climatologyCoverage(document: StationClimatology): ClimatologyCoverage;
61
60
  /** The share of the filtered non-calm record blowing from inside the
62
61
  * consumer's arcs, judged at each sector's centre bearing; null when
63
62
  * nothing non-calm was recorded. */
64
- declare function climatologyFavorableShare(document: StationClimatology, arcs: ReadonlyArray<DirectionArc>, filters?: ClimatologyFilters): number | null;
65
- //#endregion
66
- export { ClimatologyAccumulator, ClimatologyCoverage, ClimatologyFilters, ClimatologyFoldParams, accumulatedCells, climatologyCoverage, climatologyFavorableShare, climatologyPattern, climatologyRose, coveredSlotCountByYear, createClimatologyAccumulator, foldClimatologyPoints };
63
+ export declare function climatologyFavorableShare(document: StationClimatology, arcs: ReadonlyArray<DirectionArc>, filters?: ClimatologyFilters): number | null;
64
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { isCalm, normalizeDegrees } from "./derive.js";
2
2
  import { speedBand } from "./geometry.js";
3
3
  import { componentsToWind, inDirectionArcs, windToComponents } from "@azohra/meteo.core";
4
- //#region src/climatology.ts
4
+ // src/climatology.ts
5
5
  function createClimatologyAccumulator(params) {
6
6
  if (params.slotMinutes <= 0 || 1440 % params.slotMinutes !== 0) throw new Error(`climatology: slotMinutes must evenly divide 1440, got ${params.slotMinutes}`);
7
7
  if (params.sectorCount < 4) throw new Error(`climatology: sectorCount must be at least 4, got ${params.sectorCount}`);
@@ -226,5 +226,4 @@ function climatologyFavorableShare(document, arcs, filters) {
226
226
  }
227
227
  return blowing === 0 ? null : favorable / blowing;
228
228
  }
229
- //#endregion
230
229
  export { accumulatedCells, climatologyCoverage, climatologyFavorableShare, climatologyPattern, climatologyRose, coveredSlotCountByYear, createClimatologyAccumulator, foldClimatologyPoints };
@@ -1,14 +1,13 @@
1
1
  import { z } from "zod";
2
- //#region src/connectivity.d.ts
3
- declare const CONNECTIVITY_SERVICE_STATES: readonly ["active", "paused", "inactive", "retired", "unknown"];
4
- type ConnectivityServiceState = (typeof CONNECTIVITY_SERVICE_STATES)[number];
5
- declare const connectivitySessionSchema: z.ZodObject<{
2
+ export declare const CONNECTIVITY_SERVICE_STATES: readonly ["active", "paused", "inactive", "retired", "unknown"];
3
+ export type ConnectivityServiceState = (typeof CONNECTIVITY_SERVICE_STATES)[number];
4
+ export declare const connectivitySessionSchema: z.ZodObject<{
6
5
  beganAt: z.ZodString;
7
6
  endedAt: z.ZodNullable<z.ZodString>;
8
7
  bytes: z.ZodNullable<z.ZodNumber>;
9
8
  }, z.core.$strip>;
10
- type ConnectivitySession = z.infer<typeof connectivitySessionSchema>;
11
- declare const stationConnectivitySchema: z.ZodObject<{
9
+ export type ConnectivitySession = z.infer<typeof connectivitySessionSchema>;
10
+ export declare const stationConnectivitySchema: z.ZodObject<{
12
11
  sourceLabel: z.ZodString;
13
12
  checkedAt: z.ZodString;
14
13
  deviceName: z.ZodNullable<z.ZodString>;
@@ -18,11 +17,11 @@ declare const stationConnectivitySchema: z.ZodObject<{
18
17
  radioTechnology: z.ZodNullable<z.ZodString>;
19
18
  sim: z.ZodObject<{
20
19
  service: z.ZodEnum<{
21
- unknown: "unknown";
22
20
  active: "active";
23
- paused: "paused";
24
21
  inactive: "inactive";
22
+ paused: "paused";
25
23
  retired: "retired";
24
+ unknown: "unknown";
26
25
  }>;
27
26
  vendorState: z.ZodNullable<z.ZodString>;
28
27
  expiresAt: z.ZodNullable<z.ZodString>;
@@ -40,7 +39,5 @@ declare const stationConnectivitySchema: z.ZodObject<{
40
39
  bytes: z.ZodNullable<z.ZodNumber>;
41
40
  }, z.core.$strip>>;
42
41
  }, z.core.$strip>;
43
- type StationConnectivity = z.infer<typeof stationConnectivitySchema>;
44
- declare function parseStationConnectivity(value: unknown): StationConnectivity | null;
45
- //#endregion
46
- export { CONNECTIVITY_SERVICE_STATES, ConnectivityServiceState, ConnectivitySession, StationConnectivity, connectivitySessionSchema, parseStationConnectivity, stationConnectivitySchema };
42
+ export type StationConnectivity = z.infer<typeof stationConnectivitySchema>;
43
+ export declare function parseStationConnectivity(value: unknown): StationConnectivity | null;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region src/connectivity.ts
2
+ // src/connectivity.ts
3
3
  const isoTime = z.string().refine((value) => Number.isFinite(Date.parse(value)), { message: "not an ISO timestamp" }).meta({ format: "date-time" });
4
4
  const dataBytes = z.number().int().min(0);
5
5
  const CONNECTIVITY_SERVICE_STATES = [
@@ -40,5 +40,4 @@ function parseStationConnectivity(value) {
40
40
  const result = stationConnectivitySchema.safeParse(value);
41
41
  return result.success ? result.data : null;
42
42
  }
43
- //#endregion
44
43
  export { CONNECTIVITY_SERVICE_STATES, connectivitySessionSchema, parseStationConnectivity, stationConnectivitySchema };
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
- //#region src/contract-climatology.d.ts
3
- declare const STATION_CLIMATOLOGY_SCHEMA_VERSION = 1;
4
- declare const climatologySectorSchema: z.ZodObject<{
2
+ export declare const STATION_CLIMATOLOGY_SCHEMA_VERSION = 1;
3
+ export declare const climatologySectorSchema: z.ZodObject<{
5
4
  sector: z.ZodNumber;
6
5
  count: z.ZodNumber;
7
6
  uSum: z.ZodNumber;
@@ -10,8 +9,8 @@ declare const climatologySectorSchema: z.ZodObject<{
10
9
  bandCounts: z.ZodArray<z.ZodNumber>;
11
10
  maxGustMps: z.ZodNullable<z.ZodNumber>;
12
11
  }, z.core.$strip>;
13
- type ClimatologySector = z.infer<typeof climatologySectorSchema>;
14
- declare const climatologyCellSchema: z.ZodObject<{
12
+ export type ClimatologySector = z.infer<typeof climatologySectorSchema>;
13
+ export declare const climatologyCellSchema: z.ZodObject<{
15
14
  month: z.ZodNumber;
16
15
  slot: z.ZodNumber;
17
16
  sampleCount: z.ZodNumber;
@@ -26,16 +25,16 @@ declare const climatologyCellSchema: z.ZodObject<{
26
25
  maxGustMps: z.ZodNullable<z.ZodNumber>;
27
26
  }, z.core.$strip>>;
28
27
  }, z.core.$strip>;
29
- type ClimatologyCell = z.infer<typeof climatologyCellSchema>;
30
- declare const climatologyYearSchema: z.ZodObject<{
28
+ export type ClimatologyCell = z.infer<typeof climatologyCellSchema>;
29
+ export declare const climatologyYearSchema: z.ZodObject<{
31
30
  year: z.ZodNumber;
32
31
  sampleCount: z.ZodNumber;
33
32
  expectedCount: z.ZodNumber;
34
33
  coveredSlotCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
35
34
  expectedSlotCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
36
35
  }, z.core.$strip>;
37
- type ClimatologyYear = z.infer<typeof climatologyYearSchema>;
38
- declare const stationClimatologySchema: z.ZodObject<{
36
+ export type ClimatologyYear = z.infer<typeof climatologyYearSchema>;
37
+ export declare const stationClimatologySchema: z.ZodObject<{
39
38
  schemaVersion: z.ZodLiteral<1>;
40
39
  servedAt: z.ZodString;
41
40
  stationId: z.ZodString;
@@ -66,8 +65,6 @@ declare const stationClimatologySchema: z.ZodObject<{
66
65
  }, z.core.$strip>>;
67
66
  }, z.core.$strip>>;
68
67
  }, z.core.$strip>;
69
- type StationClimatology = z.infer<typeof stationClimatologySchema>;
70
- declare function parseStationClimatology(value: unknown): StationClimatology | null;
71
- declare function parseStationClimatologyJson(text: string): StationClimatology | null;
72
- //#endregion
73
- export { ClimatologyCell, ClimatologySector, ClimatologyYear, STATION_CLIMATOLOGY_SCHEMA_VERSION, StationClimatology, climatologyCellSchema, climatologySectorSchema, climatologyYearSchema, parseStationClimatology, parseStationClimatologyJson, stationClimatologySchema };
68
+ export type StationClimatology = z.infer<typeof stationClimatologySchema>;
69
+ export declare function parseStationClimatology(value: unknown): StationClimatology | null;
70
+ export declare function parseStationClimatologyJson(text: string): StationClimatology | null;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region src/contract-climatology.ts
2
+ // src/contract-climatology.ts
3
3
  const STATION_CLIMATOLOGY_SCHEMA_VERSION = 1;
4
4
  const count = z.number().int().min(0);
5
5
  const climatologySectorSchema = z.object({
@@ -48,5 +48,4 @@ function parseStationClimatologyJson(text) {
48
48
  return null;
49
49
  }
50
50
  }
51
- //#endregion
52
51
  export { STATION_CLIMATOLOGY_SCHEMA_VERSION, climatologyCellSchema, climatologySectorSchema, climatologyYearSchema, parseStationClimatology, parseStationClimatologyJson, stationClimatologySchema };