@azohra/meteo.station 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/client/climatology.d.ts +27 -0
  2. package/dist/client/climatology.js +83 -0
  3. package/dist/client/history.d.ts +47 -0
  4. package/dist/client/history.js +112 -0
  5. package/dist/client/index.d.ts +3 -1
  6. package/dist/client/index.js +3 -1
  7. package/dist/client/live.js +15 -0
  8. package/dist/climatology.d.ts +66 -0
  9. package/dist/climatology.js +230 -0
  10. package/dist/contract-climatology.d.ts +73 -0
  11. package/dist/contract-climatology.js +52 -0
  12. package/dist/contract.d.ts +234 -1
  13. package/dist/contract.js +52 -4
  14. package/dist/derive.d.ts +23 -1
  15. package/dist/derive.js +43 -4
  16. package/dist/display.d.ts +4 -0
  17. package/dist/display.js +2 -1
  18. package/dist/elements/elements/AirExtremesElement.d.ts +8 -0
  19. package/dist/elements/elements/AirExtremesElement.js +33 -0
  20. package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +15 -0
  21. package/dist/elements/elements/ClimatologyDailyPatternElement.js +84 -0
  22. package/dist/elements/elements/ClimatologyRoseElement.d.ts +14 -0
  23. package/dist/elements/elements/ClimatologyRoseElement.js +51 -0
  24. package/dist/elements/elements/CompassFanElement.d.ts +14 -0
  25. package/dist/elements/elements/CompassFanElement.js +92 -0
  26. package/dist/elements/elements/DailyPatternElement.d.ts +1 -0
  27. package/dist/elements/elements/DailyPatternElement.js +24 -16
  28. package/dist/elements/elements/DialElement.js +14 -3
  29. package/dist/elements/elements/FavorableShareElement.d.ts +14 -0
  30. package/dist/elements/elements/FavorableShareElement.js +47 -0
  31. package/dist/elements/elements/RecentSummariesElement.d.ts +14 -0
  32. package/dist/elements/elements/RecentSummariesElement.js +54 -0
  33. package/dist/elements/elements/StationFeedElement.d.ts +3 -0
  34. package/dist/elements/elements/StationFeedElement.js +13 -2
  35. package/dist/elements/elements/WindHistoryChartElement.js +20 -7
  36. package/dist/elements/elements/WindRoseElement.d.ts +1 -3
  37. package/dist/elements/elements/WindRoseElement.js +60 -62
  38. package/dist/elements/elements/atoms.js +3 -3
  39. package/dist/elements/index.d.ts +13 -1
  40. package/dist/elements/index.js +15 -3
  41. package/dist/elements/lib/ambient.d.ts +2 -0
  42. package/dist/elements/lib/attributes.js +24 -1
  43. package/dist/elements/lib/base.d.ts +3 -0
  44. package/dist/elements/lib/base.js +14 -2
  45. package/dist/endpoints.d.ts +7 -1
  46. package/dist/endpoints.js +13 -1
  47. package/dist/geometry.d.ts +23 -4
  48. package/dist/geometry.js +44 -13
  49. package/dist/index.d.ts +8 -6
  50. package/dist/index.js +8 -6
  51. package/dist/instruments.d.ts +7 -5
  52. package/dist/instruments.js +20 -7
  53. package/dist/merge-current.js +2 -1
  54. package/dist/react/components/AirExtremes.d.ts +16 -0
  55. package/dist/react/components/AirExtremes.js +38 -0
  56. package/dist/react/components/ClimatologyDailyPattern.d.ts +20 -0
  57. package/dist/react/components/ClimatologyDailyPattern.js +59 -0
  58. package/dist/react/components/ClimatologyRose.d.ts +18 -0
  59. package/dist/react/components/ClimatologyRose.js +45 -0
  60. package/dist/react/components/CompassFan.d.ts +17 -0
  61. package/dist/react/components/CompassFan.js +93 -0
  62. package/dist/react/components/DailyPattern.d.ts +4 -1
  63. package/dist/react/components/DailyPattern.js +15 -8
  64. package/dist/react/components/Dial.d.ts +3 -1
  65. package/dist/react/components/Dial.js +13 -2
  66. package/dist/react/components/FavorableShare.d.ts +14 -0
  67. package/dist/react/components/FavorableShare.js +43 -0
  68. package/dist/react/components/RecentSummaries.d.ts +18 -0
  69. package/dist/react/components/RecentSummaries.js +64 -0
  70. package/dist/react/components/StationFeedProvider.d.ts +4 -1
  71. package/dist/react/components/StationFeedProvider.js +5 -3
  72. package/dist/react/components/WindHistoryChart.d.ts +6 -1
  73. package/dist/react/components/WindHistoryChart.js +20 -5
  74. package/dist/react/components/WindRose.d.ts +4 -2
  75. package/dist/react/components/WindRose.js +80 -71
  76. package/dist/react/components/WindSampleStrip.d.ts +3 -1
  77. package/dist/react/components/WindSampleStrip.js +8 -5
  78. package/dist/react/components/atoms.d.ts +4 -1
  79. package/dist/react/components/atoms.js +6 -3
  80. package/dist/react/hooks/useStationClimatology.d.ts +18 -0
  81. package/dist/react/hooks/useStationClimatology.js +25 -0
  82. package/dist/react/index.d.ts +10 -3
  83. package/dist/react/index.js +9 -2
  84. package/dist/scene/air-extremes.d.ts +2 -0
  85. package/dist/scene/air-extremes.js +42 -0
  86. package/dist/scene/atoms.d.ts +2 -1
  87. package/dist/scene/atoms.js +6 -4
  88. package/dist/scene/climatology-pattern.d.ts +6 -0
  89. package/dist/scene/climatology-pattern.js +35 -0
  90. package/dist/scene/climatology-rose.d.ts +5 -0
  91. package/dist/scene/climatology-rose.js +49 -0
  92. package/dist/scene/compass-fan.d.ts +3 -0
  93. package/dist/scene/compass-fan.js +115 -0
  94. package/dist/scene/daily-pattern.d.ts +1 -0
  95. package/dist/scene/daily-pattern.js +21 -7
  96. package/dist/scene/dial.d.ts +1 -0
  97. package/dist/scene/dial.js +16 -3
  98. package/dist/scene/favorable-share.d.ts +3 -0
  99. package/dist/scene/favorable-share.js +41 -0
  100. package/dist/scene/index.d.ts +9 -3
  101. package/dist/scene/recent-summaries.d.ts +4 -0
  102. package/dist/scene/recent-summaries.js +75 -0
  103. package/dist/scene/rose.d.ts +2 -1
  104. package/dist/scene/rose.js +18 -3
  105. package/dist/scene/sample-strip.d.ts +1 -0
  106. package/dist/scene/sample-strip.js +1 -1
  107. package/dist/scene/trend.js +2 -7
  108. package/dist/scene/wind-history.d.ts +1 -0
  109. package/dist/scene/wind-history.js +4 -3
  110. package/dist/scene/wind-plot.d.ts +1 -0
  111. package/dist/scene/wind-plot.js +44 -9
  112. package/dist/server/adapter.d.ts +2 -1
  113. package/dist/server/adapter.js +2 -1
  114. package/dist/server/adapters/windnerd-climatology.d.ts +30 -0
  115. package/dist/server/adapters/windnerd-climatology.js +82 -0
  116. package/dist/server/adapters/windnerd-live.d.ts +5 -8
  117. package/dist/server/adapters/windnerd-live.js +26 -21
  118. package/dist/server/adapters/windnerd.d.ts +31 -4
  119. package/dist/server/adapters/windnerd.js +196 -19
  120. package/dist/server/environment.d.ts +4 -10
  121. package/dist/server/environment.js +4 -10
  122. package/dist/server/feed.d.ts +44 -2
  123. package/dist/server/feed.js +63 -2
  124. package/dist/server/handler.d.ts +11 -1
  125. package/dist/server/handler.js +83 -2
  126. package/dist/server/index.d.ts +4 -3
  127. package/dist/server/index.js +4 -3
  128. package/dist/strings.d.ts +13 -1
  129. package/dist/strings.js +13 -1
  130. package/package.json +2 -2
  131. package/schema/example-climatology.json +86 -0
  132. package/schema/example-history.json +38 -0
  133. package/schema/stationclimatology.schema.json +221 -0
  134. package/schema/stationcurrent.schema.json +173 -0
  135. package/schema/stationfeed.schema.json +173 -0
  136. package/schema/stationhistory.schema.json +186 -0
  137. package/schema/stationlive.schema.json +202 -0
  138. package/styles.css +232 -19
package/styles.css CHANGED
@@ -4,7 +4,7 @@
4
4
  * - `--meteo-*` is the SHARED skin — surfaces, ink, muted text, borders,
5
5
  * grid lines, the accent, the gap hatch, typography, radius, shadow, and
6
6
  * the freshness states (live/aging/stale). Any meteo capability's
7
- * components (wind today, forecast tomorrow) wear these.
7
+ * components (wind today, forecast tomorrow) use these.
8
8
  * - `--meteo-wind-*` is genuinely wind-scoped — the lull–gust band fill, the mean
9
9
  * trace, vanes, the inspection cursor, the meteo-band-0..4 ramp, and the
10
10
  * rose's favorable/unfavorable judgment ring.
@@ -21,8 +21,7 @@
21
21
  * outranks it without specificity games.
22
22
  *
23
23
  * meteo-band-0..4 is a placeholder ramp — calm blue through green and amber to
24
- * red. What a band means (flyable, marginal, nuked) and what colour it wears
25
- * belong to the consumer. */
24
+ * red. What a band means and what colour it gets belong to the consumer. */
26
25
 
27
26
  @layer meteo {
28
27
 
@@ -94,8 +93,7 @@
94
93
  color: var(--meteo-accent, #0f7490);
95
94
  }
96
95
 
97
- /* One voice for every caption-grade label: flank labels, summary terms,
98
- * table headers. */
96
+ /* Shared style for caption-grade labels: flanks, summary terms, table headers. */
99
97
  .meteo-microlabel {
100
98
  font-size: 0.68rem;
101
99
  font-weight: 600;
@@ -151,14 +149,52 @@
151
149
  color: var(--meteo-ink, #17232e);
152
150
  }
153
151
 
154
- /* The unit hangs quieter beside the number, like the dial hub's unit line. */
152
+ /* Unit is smaller and muted beside the number, matching the dial hub. */
155
153
  .meteo-value .meteo-unit {
156
154
  font-size: 0.72em;
157
155
  font-weight: 500;
158
156
  color: var(--meteo-muted, #62717f);
159
157
  }
160
158
 
161
- /* A timestamp is context, not a reading — it speaks in the muted voice. */
159
+ /* Verdict-tinted direction fragments, only when the consumer supplied
160
+ * favorable arcs. */
161
+ .meteo-direction-favorable {
162
+ color: var(--meteo-wind-favorable, #2e9e63);
163
+ }
164
+
165
+ .meteo-direction-unfavorable {
166
+ color: var(--meteo-wind-unfavorable, #c98a80);
167
+ }
168
+
169
+ /* The favorable-share stat: one caption-grade label and one number, sized
170
+ * to sit beside the summary cells. Hidden entirely without arcs; the -na
171
+ * note carries the words when there is nothing to judge. */
172
+ .meteo-favorable-share {
173
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
174
+ color: var(--meteo-ink, #17232e);
175
+ }
176
+
177
+ .meteo-favorable-share-label {
178
+ font-size: 0.68rem;
179
+ font-weight: 600;
180
+ text-transform: uppercase;
181
+ letter-spacing: 0.08em;
182
+ color: var(--meteo-muted, #62717f);
183
+ }
184
+
185
+ .meteo-favorable-share-value {
186
+ font-variant-numeric: tabular-nums;
187
+ font-feature-settings: "tnum";
188
+ font-weight: 600;
189
+ }
190
+
191
+ .meteo-favorable-share-na {
192
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
193
+ font-size: 0.82rem;
194
+ color: var(--meteo-muted, #62717f);
195
+ }
196
+
197
+ /* Timestamps are context, not readings: muted. */
162
198
  .meteo-updated {
163
199
  color: var(--meteo-muted, #62717f);
164
200
  }
@@ -202,9 +238,7 @@
202
238
  box-shadow: var(--meteo-shadow, 0 1px 2px rgb(23 35 46 / 0.06), 0 8px 24px rgb(23 35 46 / 0.05));
203
239
  }
204
240
 
205
- /* Wraps rather than overflows: LULL/dial/GUST needs more width than a
206
- * narrow card can promise, and a flank spilling into whatever sits beside
207
- * the card reads as a broken layout, not a compact one. */
241
+ /* Wraps rather than overflows when LULL/dial/GUST exceeds a narrow card. */
208
242
  .meteo-current-instrument {
209
243
  display: flex;
210
244
  flex-wrap: wrap;
@@ -251,8 +285,24 @@
251
285
  stroke-width: 1.5;
252
286
  }
253
287
 
254
- /* The speed arc: the current reading's share of the dial scale, wearing the
255
- * reading's band when thresholds grade it. */
288
+ /* The dial's judgment ring, the rose's treatment on the bezel radius:
289
+ * favorable arcs paint over the unfavorable circle. */
290
+ .meteo-wind-dial-ring-unfavorable {
291
+ fill: none;
292
+ stroke: var(--meteo-wind-unfavorable, #c98a80);
293
+ stroke-width: 3;
294
+ opacity: 0.55;
295
+ }
296
+
297
+ .meteo-wind-dial-ring-favorable {
298
+ fill: none;
299
+ stroke: var(--meteo-wind-favorable, #2e9e63);
300
+ stroke-width: 3;
301
+ stroke-linecap: butt;
302
+ }
303
+
304
+ /* Speed arc: the reading's share of the dial scale, in the reading's band
305
+ * colour when thresholds grade it. */
256
306
  .meteo-wind-dial-arc {
257
307
  fill: none;
258
308
  stroke: var(--meteo-accent, #0f7490);
@@ -390,7 +440,7 @@
390
440
 
391
441
  /* Fixed minimum height so pinning and unpinning never moves the chart. The
392
442
  * daily-pattern caption is static — no pin state — but shares the line so
393
- * it never wears a different rhythm than the chart above it. */
443
+ * it keeps the same line metrics as the chart caption above it. */
394
444
  .meteo-wind-chart-readout,
395
445
  .meteo-sample-strip-readout,
396
446
  .meteo-daily-pattern-caption,
@@ -437,7 +487,7 @@
437
487
  stroke-width: 1;
438
488
  }
439
489
 
440
- /* Band zones: each band's territory tinted at a whisper behind the plot. */
490
+ /* Band zones: each band's range faintly tinted behind the plot. */
441
491
  .meteo-wind-zone {
442
492
  stroke: none;
443
493
  fill-opacity: 0.05;
@@ -449,7 +499,7 @@
449
499
  .meteo-wind-zone.meteo-band-3 { fill: var(--meteo-band-3, #e2662c); }
450
500
  .meteo-wind-zone.meteo-band-4 { fill: var(--meteo-band-4, #c22727); }
451
501
 
452
- /* Threshold guides wear the band they open. */
502
+ /* Threshold guides use the colour of the band they open. */
453
503
  .meteo-wind-threshold {
454
504
  stroke: var(--meteo-muted, #62717f);
455
505
  stroke-width: 1;
@@ -539,6 +589,16 @@
539
589
  stroke-linejoin: round;
540
590
  }
541
591
 
592
+ /* Verdict-tinted vanes, drawn only when the consumer supplied favorable
593
+ * arcs; a calm cell never gets one. */
594
+ .meteo-wind-vane-favorable {
595
+ stroke: var(--meteo-wind-favorable, #2e9e63);
596
+ }
597
+
598
+ .meteo-wind-vane-unfavorable {
599
+ stroke: var(--meteo-wind-unfavorable, #c98a80);
600
+ }
601
+
542
602
  /* The persistent compass letter above every vane, and the persistent Avg
543
603
  * number below it — both small, tabular, and quieter than the vane row's
544
604
  * own "TO" caption; text.meteo-wind-chart-svg's base rule already sets
@@ -600,7 +660,7 @@
600
660
  }
601
661
 
602
662
  /* The em-dash placeholder holds the exact box the glyph would, so a station
603
- * going quiet never twitches the row's layout. */
663
+ * going empty never shifts the row's layout. */
604
664
  .meteo-sparkline-na {
605
665
  display: inline-flex;
606
666
  align-items: center;
@@ -657,7 +717,7 @@
657
717
  width: 100%;
658
718
  }
659
719
 
660
- /* The trace speaks in the mean line's voice, a step quieter — a trend is a
720
+ /* The trace uses the mean line's colour, thinner — a trend is a
661
721
  * background fact, not the wind. */
662
722
  .meteo-trend-line {
663
723
  fill: none;
@@ -780,6 +840,157 @@
780
840
  font-feature-settings: "tnum";
781
841
  }
782
842
 
843
+ /* Night columns: sunset to sunrise, low-opacity gray under
844
+ * every data layer. */
845
+ .meteo-night {
846
+ fill: var(--meteo-muted, #62717f);
847
+ opacity: 0.12;
848
+ }
849
+
850
+ /* ---------- live theatre ---------- */
851
+
852
+ .meteo-compass-fan-svg {
853
+ display: block;
854
+ }
855
+
856
+ .meteo-compass-fan-na,
857
+ .meteo-recent-summaries-na {
858
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
859
+ font-size: 0.82rem;
860
+ color: var(--meteo-muted, #62717f);
861
+ }
862
+
863
+ /* The fan's age gradient: ghost-0 is the freshest sample, ghost-9 the
864
+ * oldest, fading toward the ring. */
865
+ .meteo-fan-ghost-0,
866
+ .meteo-fan-ghost-1,
867
+ .meteo-fan-ghost-2,
868
+ .meteo-fan-ghost-3,
869
+ .meteo-fan-ghost-4,
870
+ .meteo-fan-ghost-5,
871
+ .meteo-fan-ghost-6,
872
+ .meteo-fan-ghost-7,
873
+ .meteo-fan-ghost-8,
874
+ .meteo-fan-ghost-9 {
875
+ fill: none;
876
+ stroke: var(--meteo-wind-vane, #3b4a58);
877
+ stroke-width: 1.4;
878
+ stroke-linecap: round;
879
+ stroke-linejoin: round;
880
+ }
881
+
882
+ .meteo-fan-ghost-0 {
883
+ opacity: 0.85;
884
+ }
885
+ .meteo-fan-ghost-1 {
886
+ opacity: 0.75;
887
+ }
888
+ .meteo-fan-ghost-2 {
889
+ opacity: 0.65;
890
+ }
891
+ .meteo-fan-ghost-3 {
892
+ opacity: 0.55;
893
+ }
894
+ .meteo-fan-ghost-4 {
895
+ opacity: 0.47;
896
+ }
897
+ .meteo-fan-ghost-5 {
898
+ opacity: 0.4;
899
+ }
900
+ .meteo-fan-ghost-6 {
901
+ opacity: 0.33;
902
+ }
903
+ .meteo-fan-ghost-7 {
904
+ opacity: 0.27;
905
+ }
906
+ .meteo-fan-ghost-8 {
907
+ opacity: 0.21;
908
+ }
909
+ .meteo-fan-ghost-9 {
910
+ opacity: 0.16;
911
+ }
912
+
913
+ .meteo-recent-summaries {
914
+ display: flex;
915
+ gap: 1rem;
916
+ flex-wrap: wrap;
917
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
918
+ }
919
+
920
+ .meteo-recent-summary {
921
+ min-width: 10rem;
922
+ }
923
+
924
+ .meteo-recent-summary-ghosts {
925
+ display: flex;
926
+ gap: 2px;
927
+ margin: 0.25rem 0;
928
+ }
929
+
930
+ .meteo-recent-summary-ghost {
931
+ display: inline-flex;
932
+ }
933
+
934
+ .meteo-recent-summary-stats {
935
+ display: flex;
936
+ gap: 0.9rem;
937
+ margin: 0;
938
+ }
939
+
940
+ .meteo-recent-summary-stat dd {
941
+ margin: 0;
942
+ font-variant-numeric: tabular-nums;
943
+ font-feature-settings: "tnum";
944
+ font-weight: 600;
945
+ }
946
+
947
+ .meteo-air-extremes {
948
+ display: flex;
949
+ gap: 1rem;
950
+ margin: 0;
951
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
952
+ }
953
+
954
+ .meteo-air-extremes-tile dd,
955
+ .meteo-air-extremes-value {
956
+ margin: 0;
957
+ font-variant-numeric: tabular-nums;
958
+ font-feature-settings: "tnum";
959
+ font-weight: 600;
960
+ }
961
+
962
+ /* ---------- climatology views ---------- */
963
+
964
+ /* The cube's rose and typical day carry the honesty row beneath the
965
+ * drawing; the shared inner classes do the drawing itself. */
966
+ .meteo-climatology-rose {
967
+ display: inline-block;
968
+ }
969
+
970
+ .meteo-climatology-caption {
971
+ margin: 0;
972
+ font-size: 0.8rem;
973
+ color: var(--meteo-muted, #62717f);
974
+ font-variant-numeric: tabular-nums;
975
+ font-feature-settings: "tnum";
976
+ }
977
+
978
+ .meteo-climatology-caption-favorable {
979
+ color: var(--meteo-wind-favorable, #2e9e63);
980
+ font-weight: 600;
981
+ }
982
+
983
+ .meteo-climatology-daily-pattern {
984
+ display: block;
985
+ }
986
+
987
+ .meteo-climatology-rose-na,
988
+ .meteo-climatology-daily-pattern-na {
989
+ font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);
990
+ font-size: 0.82rem;
991
+ color: var(--meteo-muted, #62717f);
992
+ }
993
+
783
994
  /* ---------- station table ---------- */
784
995
 
785
996
  .meteo-station-table {
@@ -1041,7 +1252,7 @@
1041
1252
  padding-top: 0.5rem;
1042
1253
  }
1043
1254
 
1044
- /* Row labels speak in the shared micro-label voice; the unit hangs off the
1255
+ /* Row labels use the shared micro-label style; the unit follows the
1045
1256
  * label so cells hold bare numbers. */
1046
1257
  .meteo-air-label {
1047
1258
  font-size: 0.78rem;
@@ -1078,8 +1289,10 @@
1078
1289
  * keeps the unavailable arm the same height as a reading. */
1079
1290
  .meteo-strip {
1080
1291
  display: flex;
1292
+ /* Wrap rather than clip when the column is narrower than the cells. */
1293
+ flex-wrap: wrap;
1081
1294
  align-items: center;
1082
- gap: 1.1rem;
1295
+ gap: 0.15rem 1.1rem;
1083
1296
  min-height: 2.6rem;
1084
1297
  padding: 0.4rem 0.9rem;
1085
1298
  font-family: var(--meteo-font, ui-sans-serif, system-ui, sans-serif);