@howells/hairline 0.0.0-stage → 0.1.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 (455) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -2
  3. package/lib/charts/axes.js +5 -0
  4. package/lib/charts/basics/candlestick.data.js +44 -0
  5. package/lib/charts/basics/candlestick.js +180 -0
  6. package/lib/charts/basics/daily-empty.js +24 -0
  7. package/lib/charts/basics/daily-readings.js +16 -0
  8. package/lib/charts/basics/dot-heat.data.js +225 -0
  9. package/lib/charts/basics/dot-heat.js +174 -0
  10. package/lib/charts/basics/dumbbell-queue.js +203 -0
  11. package/lib/charts/basics/hairline-area.js +208 -0
  12. package/lib/charts/basics/hairline-line.js +195 -0
  13. package/lib/charts/basics/nested-treemap.data.js +55 -0
  14. package/lib/charts/basics/nested-treemap.js +191 -0
  15. package/lib/charts/basics/paired-rungs.data.js +31 -0
  16. package/lib/charts/basics/paired-rungs.js +151 -0
  17. package/lib/charts/basics/plumb-scatter.js +229 -0
  18. package/lib/charts/basics/rung-bars.js +178 -0
  19. package/lib/charts/basics/rung-geometry.js +6 -0
  20. package/lib/charts/basics/rung-histogram.data.js +73 -0
  21. package/lib/charts/basics/rung-histogram.js +153 -0
  22. package/lib/charts/basics/rung-waterfall.data.js +30 -0
  23. package/lib/charts/basics/rung-waterfall.js +150 -0
  24. package/lib/charts/basics/rungs.js +22 -0
  25. package/lib/charts/basics/series-key.js +26 -0
  26. package/lib/charts/basics/stacked-rungs.data.js +42 -0
  27. package/lib/charts/basics/stacked-rungs.js +174 -0
  28. package/lib/charts/basics/stream-ribbon.data.js +124 -0
  29. package/lib/charts/basics/stream-ribbon.js +336 -0
  30. package/lib/charts/basics/tick-box.data.js +50 -0
  31. package/lib/charts/basics/tick-box.js +226 -0
  32. package/lib/charts/basics/tick-donut.data.js +30 -0
  33. package/lib/charts/basics/tick-donut.js +210 -0
  34. package/lib/charts/basics/tick-gauge.data.js +8 -0
  35. package/lib/charts/basics/tick-gauge.js +169 -0
  36. package/lib/charts/basics/tick-rows.data.js +30 -0
  37. package/lib/charts/basics/tick-rows.js +121 -0
  38. package/lib/charts/basics/util-a.js +15 -0
  39. package/lib/charts/basics/util-b.js +13 -0
  40. package/lib/charts/big/circular-graph.data.js +827 -0
  41. package/lib/charts/big/circular-graph.js +289 -0
  42. package/lib/charts/big/force-galaxy-model.js +167 -0
  43. package/lib/charts/big/force-galaxy.data.js +813 -0
  44. package/lib/charts/big/force-galaxy.js +276 -0
  45. package/lib/charts/big/thread-triptych.data.js +204 -0
  46. package/lib/charts/big/thread-triptych.js +334 -0
  47. package/lib/charts/board/room.js +6 -0
  48. package/lib/charts/board/slope.js +176 -0
  49. package/lib/charts/board/spread.js +28 -0
  50. package/lib/charts/control.js +18 -0
  51. package/lib/charts/core.js +84 -0
  52. package/lib/charts/data-table.js +34 -0
  53. package/lib/charts/fills.js +153 -0
  54. package/lib/charts/forms/area-difference.data.js +62 -0
  55. package/lib/charts/forms/area-difference.js +192 -0
  56. package/lib/charts/forms/brush-math.js +42 -0
  57. package/lib/charts/forms/brush-strip.js +199 -0
  58. package/lib/charts/forms/brushed-overview.data.js +374 -0
  59. package/lib/charts/forms/brushed-overview.js +162 -0
  60. package/lib/charts/forms/chord-ring.data.js +140 -0
  61. package/lib/charts/forms/chord-ring.js +167 -0
  62. package/lib/charts/forms/circle-pack.data.js +80 -0
  63. package/lib/charts/forms/circle-pack.js +99 -0
  64. package/lib/charts/forms/hatched-stack.data.js +71 -0
  65. package/lib/charts/forms/hatched-stack.js +228 -0
  66. package/lib/charts/forms/radial-year.data.js +13 -0
  67. package/lib/charts/forms/radial-year.js +156 -0
  68. package/lib/charts/frame.js +73 -0
  69. package/lib/charts/glance/aggregate-sankey.data.js +74 -0
  70. package/lib/charts/glance/aggregate-sankey.js +242 -0
  71. package/lib/charts/glance/bar-race.data.js +122 -0
  72. package/lib/charts/glance/bar-race.js +246 -0
  73. package/lib/charts/glance/big-slice.data.js +41 -0
  74. package/lib/charts/glance/big-slice.js +238 -0
  75. package/lib/charts/glance/chunky-bars.data.js +22 -0
  76. package/lib/charts/glance/chunky-bars.js +113 -0
  77. package/lib/charts/glance/circular-graph.data.js +146 -0
  78. package/lib/charts/glance/circular-graph.js +138 -0
  79. package/lib/charts/glance/control-slot.js +9 -0
  80. package/lib/charts/glance/diverging-bar.data.js +34 -0
  81. package/lib/charts/glance/diverging-bar.js +154 -0
  82. package/lib/charts/glance/dot-waffle.data.js +26 -0
  83. package/lib/charts/glance/dot-waffle.js +179 -0
  84. package/lib/charts/glance/draw-in.data.js +9 -0
  85. package/lib/charts/glance/draw-in.goals.json.js +289 -0
  86. package/lib/charts/glance/draw-in.js +214 -0
  87. package/lib/charts/glance/dynamic-stream.data.js +6 -0
  88. package/lib/charts/glance/dynamic-stream.js +189 -0
  89. package/lib/charts/glance/force-graph.data.js +77 -0
  90. package/lib/charts/glance/force-graph.js +211 -0
  91. package/lib/charts/glance/jitter-strip.data.js +10 -0
  92. package/lib/charts/glance/jitter-strip.easter.json.js +430 -0
  93. package/lib/charts/glance/jitter-strip.js +157 -0
  94. package/lib/charts/glance/link-bundle.js +51 -0
  95. package/lib/charts/glance/matrix-heat-glance.data.js +108 -0
  96. package/lib/charts/glance/matrix-heat-glance.js +170 -0
  97. package/lib/charts/glance/pictorial-bar.data.js +22 -0
  98. package/lib/charts/glance/pictorial-bar.js +180 -0
  99. package/lib/charts/glance/rainfall-dual-area.data.js +177 -0
  100. package/lib/charts/glance/rainfall-dual-area.js +192 -0
  101. package/lib/charts/glance/rank-strip.data.js +76 -0
  102. package/lib/charts/glance/rank-strip.js +172 -0
  103. package/lib/charts/glance/scatter-labels.js +60 -0
  104. package/lib/charts/glance/scatter-morph.data.js +78 -0
  105. package/lib/charts/glance/scatter-morph.js +338 -0
  106. package/lib/charts/glance/single-axis.data.js +6 -0
  107. package/lib/charts/glance/single-axis.js +150 -0
  108. package/lib/charts/glance/single-axis.tides.json.js +180 -0
  109. package/lib/charts/glance/stagger-wave.data.js +66 -0
  110. package/lib/charts/glance/stagger-wave.js +132 -0
  111. package/lib/charts/glance/tree-lr.data.js +41 -0
  112. package/lib/charts/glance/tree-lr.js +135 -0
  113. package/lib/charts/glance/util-a.js +49 -0
  114. package/lib/charts/glance/util-b.js +19 -0
  115. package/lib/charts/glance/violin.data.js +9 -0
  116. package/lib/charts/glance/violin.js +185 -0
  117. package/lib/charts/glance/violin.tenors.json.js +5 -0
  118. package/lib/charts/hooks.js +154 -0
  119. package/lib/charts/hover.js +19 -0
  120. package/lib/charts/lupi/arc-matrix.data.js +83 -0
  121. package/lib/charts/lupi/arc-matrix.js +146 -0
  122. package/lib/charts/lupi/ballot-tally.data.js +22 -0
  123. package/lib/charts/lupi/ballot-tally.js +125 -0
  124. package/lib/charts/lupi/barcode-lollipop.data.js +195 -0
  125. package/lib/charts/lupi/barcode-lollipop.js +161 -0
  126. package/lib/charts/lupi/brand-spectrum.data.js +70 -0
  127. package/lib/charts/lupi/brand-spectrum.js +233 -0
  128. package/lib/charts/lupi/bubble-almanac.data.js +689 -0
  129. package/lib/charts/lupi/bubble-almanac.js +164 -0
  130. package/lib/charts/lupi/calendar-heat.data.js +399 -0
  131. package/lib/charts/lupi/calendar-heat.js +175 -0
  132. package/lib/charts/lupi/cluster-field.data.js +83 -0
  133. package/lib/charts/lupi/cluster-field.js +173 -0
  134. package/lib/charts/lupi/dot-cascade.data.js +54 -0
  135. package/lib/charts/lupi/dot-cascade.js +124 -0
  136. package/lib/charts/lupi/dotty-matrix.data.js +170 -0
  137. package/lib/charts/lupi/dotty-matrix.js +126 -0
  138. package/lib/charts/lupi/hourglass-stream.data.js +30 -0
  139. package/lib/charts/lupi/hourglass-stream.js +158 -0
  140. package/lib/charts/lupi/hundred-field.data.js +38 -0
  141. package/lib/charts/lupi/hundred-field.js +237 -0
  142. package/lib/charts/lupi/launch-fan.data.js +315 -0
  143. package/lib/charts/lupi/launch-fan.js +198 -0
  144. package/lib/charts/lupi/matrix-heat.data.js +97 -0
  145. package/lib/charts/lupi/matrix-heat.js +246 -0
  146. package/lib/charts/lupi/parallel-coordinates.data.js +54 -0
  147. package/lib/charts/lupi/parallel-coordinates.js +218 -0
  148. package/lib/charts/lupi/radial-convergence.data.js +178 -0
  149. package/lib/charts/lupi/radial-convergence.js +208 -0
  150. package/lib/charts/lupi/radial-patchwork.data.js +454 -0
  151. package/lib/charts/lupi/radial-patchwork.js +181 -0
  152. package/lib/charts/lupi/ridgeline.data.js +1834 -0
  153. package/lib/charts/lupi/ridgeline.js +195 -0
  154. package/lib/charts/lupi/trend-lineage.data.js +51 -0
  155. package/lib/charts/lupi/trend-lineage.js +198 -0
  156. package/lib/charts/lupi/type-colonnade.data.js +18 -0
  157. package/lib/charts/lupi/type-colonnade.js +198 -0
  158. package/lib/charts/lupi/util-a.js +14 -0
  159. package/lib/charts/lupi/util-b.js +12 -0
  160. package/lib/charts/maps/choropleth.js +295 -0
  161. package/lib/charts/maps/geo.js +84 -0
  162. package/lib/charts/maps/legend.js +83 -0
  163. package/lib/charts/maps/step-fill.js +9 -0
  164. package/lib/charts/maps/us-choropleth.data.js +249 -0
  165. package/lib/charts/maps/us-choropleth.js +41 -0
  166. package/lib/charts/maps/world-choropleth.data.js +681 -0
  167. package/lib/charts/maps/world-choropleth.js +46 -0
  168. package/lib/charts/markers.js +35 -0
  169. package/lib/charts/marks.js +31 -0
  170. package/lib/charts/motion.js +11 -0
  171. package/lib/charts/originals/daily-users.data.js +101 -0
  172. package/lib/charts/originals/daily-users.js +203 -0
  173. package/lib/charts/originals/feature-rank.data.js +92 -0
  174. package/lib/charts/originals/feature-rank.js +167 -0
  175. package/lib/charts/originals/format.js +5 -0
  176. package/lib/charts/originals/key.js +26 -0
  177. package/lib/charts/originals/response-time.data.js +98 -0
  178. package/lib/charts/originals/response-time.js +187 -0
  179. package/lib/charts/originals/revenue-by-plan.data.js +26 -0
  180. package/lib/charts/originals/revenue-by-plan.js +248 -0
  181. package/lib/charts/playback.js +68 -0
  182. package/lib/charts/plot-note.js +27 -0
  183. package/lib/charts/roles.js +5 -0
  184. package/lib/charts/rules.js +66 -0
  185. package/lib/charts/scale-context.js +6 -0
  186. package/lib/charts/shapes.js +8 -0
  187. package/lib/charts/shared-options.js +25 -0
  188. package/lib/charts/svg.js +43 -0
  189. package/lib/charts/text.js +30 -0
  190. package/lib/charts/texture-ids.js +20 -0
  191. package/lib/charts/texture.js +286 -0
  192. package/lib/charts/util.js +43 -0
  193. package/lib/charts/value-grid.js +26 -0
  194. package/lib/draw.js +27 -0
  195. package/lib/entries/dumbbell-queue.js +2 -0
  196. package/lib/entries/hairline-area.js +2 -0
  197. package/lib/entries/hairline-line.js +2 -0
  198. package/lib/entries/plumb-scatter.js +2 -0
  199. package/lib/entries/rung-bars.js +2 -0
  200. package/lib/entries/slope.js +2 -0
  201. package/lib/frame.js +2 -0
  202. package/lib/hairline.css +1385 -0
  203. package/lib/index.js +72 -0
  204. package/lib/json-schema/dumbbell-queue.json +258 -0
  205. package/lib/json-schema/hairline-area.json +262 -0
  206. package/lib/json-schema/hairline-line.json +256 -0
  207. package/lib/json-schema/index.json +50 -0
  208. package/lib/json-schema/plumb-scatter.json +363 -0
  209. package/lib/json-schema/rung-bars.json +230 -0
  210. package/lib/json-schema/slope.json +333 -0
  211. package/lib/kit.js +16 -0
  212. package/lib/lib/format.js +29 -0
  213. package/lib/lib/random.js +8 -0
  214. package/lib/maps.js +4 -0
  215. package/lib/schema/daily.js +9 -0
  216. package/lib/schema/dumbbell-queue.js +28 -0
  217. package/lib/schema/format.js +72 -0
  218. package/lib/schema/hairline-area.js +24 -0
  219. package/lib/schema/hairline-line.js +23 -0
  220. package/lib/schema/key.js +4 -0
  221. package/lib/schema/metrics.js +26 -0
  222. package/lib/schema/motion.js +12 -0
  223. package/lib/schema/options.js +21 -0
  224. package/lib/schema/plumb-scatter.js +48 -0
  225. package/lib/schema/registry.js +132 -0
  226. package/lib/schema/rung-bars.js +25 -0
  227. package/lib/schema/scale.js +9 -0
  228. package/lib/schema/slope.js +28 -0
  229. package/lib/schema/validate.js +25 -0
  230. package/lib/schema.js +16 -0
  231. package/lib/theme/derive.js +98 -0
  232. package/lib/theme.css +443 -0
  233. package/lib/theme.js +1 -0
  234. package/lib/tokens.css +306 -0
  235. package/lib/types/charts/axes.d.ts +14 -0
  236. package/lib/types/charts/basics/candlestick.d.ts +22 -0
  237. package/lib/types/charts/basics/candlestick.data.d.ts +10 -0
  238. package/lib/types/charts/basics/daily-empty.d.ts +7 -0
  239. package/lib/types/charts/basics/daily-readings.d.ts +38 -0
  240. package/lib/types/charts/basics/dot-heat.d.ts +19 -0
  241. package/lib/types/charts/basics/dot-heat.data.d.ts +28 -0
  242. package/lib/types/charts/basics/dumbbell-queue.d.ts +15 -0
  243. package/lib/types/charts/basics/hairline-area.d.ts +18 -0
  244. package/lib/types/charts/basics/hairline-line.d.ts +18 -0
  245. package/lib/types/charts/basics/nested-treemap.d.ts +18 -0
  246. package/lib/types/charts/basics/nested-treemap.data.d.ts +30 -0
  247. package/lib/types/charts/basics/paired-rungs.d.ts +21 -0
  248. package/lib/types/charts/basics/paired-rungs.data.d.ts +43 -0
  249. package/lib/types/charts/basics/plumb-scatter.d.ts +14 -0
  250. package/lib/types/charts/basics/rung-bars.d.ts +16 -0
  251. package/lib/types/charts/basics/rung-geometry.d.ts +6 -0
  252. package/lib/types/charts/basics/rung-histogram.d.ts +22 -0
  253. package/lib/types/charts/basics/rung-histogram.data.d.ts +34 -0
  254. package/lib/types/charts/basics/rung-waterfall.d.ts +19 -0
  255. package/lib/types/charts/basics/rung-waterfall.data.d.ts +31 -0
  256. package/lib/types/charts/basics/rungs.d.ts +28 -0
  257. package/lib/types/charts/basics/series-key.d.ts +19 -0
  258. package/lib/types/charts/basics/stacked-rungs.d.ts +20 -0
  259. package/lib/types/charts/basics/stacked-rungs.data.d.ts +26 -0
  260. package/lib/types/charts/basics/stream-ribbon.d.ts +19 -0
  261. package/lib/types/charts/basics/stream-ribbon.data.d.ts +29 -0
  262. package/lib/types/charts/basics/tick-box.d.ts +19 -0
  263. package/lib/types/charts/basics/tick-box.data.d.ts +30 -0
  264. package/lib/types/charts/basics/tick-donut.d.ts +24 -0
  265. package/lib/types/charts/basics/tick-donut.data.d.ts +25 -0
  266. package/lib/types/charts/basics/tick-gauge.d.ts +22 -0
  267. package/lib/types/charts/basics/tick-gauge.data.d.ts +24 -0
  268. package/lib/types/charts/basics/tick-rows.d.ts +18 -0
  269. package/lib/types/charts/basics/tick-rows.data.d.ts +23 -0
  270. package/lib/types/charts/basics/util-a.d.ts +10 -0
  271. package/lib/types/charts/basics/util-b.d.ts +13 -0
  272. package/lib/types/charts/big/circular-graph.d.ts +20 -0
  273. package/lib/types/charts/big/circular-graph.data.d.ts +46 -0
  274. package/lib/types/charts/big/force-galaxy-model.d.ts +109 -0
  275. package/lib/types/charts/big/force-galaxy.d.ts +18 -0
  276. package/lib/types/charts/big/force-galaxy.data.d.ts +48 -0
  277. package/lib/types/charts/big/thread-triptych.d.ts +17 -0
  278. package/lib/types/charts/big/thread-triptych.data.d.ts +41 -0
  279. package/lib/types/charts/board/room.d.ts +18 -0
  280. package/lib/types/charts/board/slope.d.ts +14 -0
  281. package/lib/types/charts/board/spread.d.ts +5 -0
  282. package/lib/types/charts/control.d.ts +17 -0
  283. package/lib/types/charts/core.d.ts +77 -0
  284. package/lib/types/charts/data-table.d.ts +18 -0
  285. package/lib/types/charts/fills.d.ts +103 -0
  286. package/lib/types/charts/forms/area-difference.d.ts +9 -0
  287. package/lib/types/charts/forms/area-difference.data.d.ts +26 -0
  288. package/lib/types/charts/forms/brush-math.d.ts +19 -0
  289. package/lib/types/charts/forms/brush-strip.d.ts +19 -0
  290. package/lib/types/charts/forms/brushed-overview.d.ts +12 -0
  291. package/lib/types/charts/forms/brushed-overview.data.d.ts +16 -0
  292. package/lib/types/charts/forms/chord-ring.d.ts +12 -0
  293. package/lib/types/charts/forms/chord-ring.data.d.ts +29 -0
  294. package/lib/types/charts/forms/circle-pack.d.ts +9 -0
  295. package/lib/types/charts/forms/circle-pack.data.d.ts +23 -0
  296. package/lib/types/charts/forms/hatched-stack.d.ts +10 -0
  297. package/lib/types/charts/forms/hatched-stack.data.d.ts +36 -0
  298. package/lib/types/charts/forms/radial-year.d.ts +8 -0
  299. package/lib/types/charts/forms/radial-year.data.d.ts +17 -0
  300. package/lib/types/charts/frame.d.ts +21 -0
  301. package/lib/types/charts/glance/aggregate-sankey.d.ts +23 -0
  302. package/lib/types/charts/glance/aggregate-sankey.data.d.ts +32 -0
  303. package/lib/types/charts/glance/bar-race.d.ts +20 -0
  304. package/lib/types/charts/glance/bar-race.data.d.ts +32 -0
  305. package/lib/types/charts/glance/big-slice.d.ts +27 -0
  306. package/lib/types/charts/glance/big-slice.data.d.ts +30 -0
  307. package/lib/types/charts/glance/chunky-bars.d.ts +18 -0
  308. package/lib/types/charts/glance/chunky-bars.data.d.ts +24 -0
  309. package/lib/types/charts/glance/circular-graph.d.ts +19 -0
  310. package/lib/types/charts/glance/circular-graph.data.d.ts +43 -0
  311. package/lib/types/charts/glance/control-slot.d.ts +9 -0
  312. package/lib/types/charts/glance/diverging-bar.d.ts +19 -0
  313. package/lib/types/charts/glance/diverging-bar.data.d.ts +27 -0
  314. package/lib/types/charts/glance/dot-waffle.d.ts +19 -0
  315. package/lib/types/charts/glance/dot-waffle.data.d.ts +31 -0
  316. package/lib/types/charts/glance/draw-in.d.ts +20 -0
  317. package/lib/types/charts/glance/draw-in.data.d.ts +6 -0
  318. package/lib/types/charts/glance/dynamic-stream.d.ts +22 -0
  319. package/lib/types/charts/glance/dynamic-stream.data.d.ts +7 -0
  320. package/lib/types/charts/glance/force-graph.d.ts +16 -0
  321. package/lib/types/charts/glance/force-graph.data.d.ts +45 -0
  322. package/lib/types/charts/glance/jitter-strip.d.ts +24 -0
  323. package/lib/types/charts/glance/jitter-strip.data.d.ts +27 -0
  324. package/lib/types/charts/glance/link-bundle.d.ts +22 -0
  325. package/lib/types/charts/glance/matrix-heat-glance.d.ts +22 -0
  326. package/lib/types/charts/glance/matrix-heat-glance.data.d.ts +35 -0
  327. package/lib/types/charts/glance/pictorial-bar.d.ts +20 -0
  328. package/lib/types/charts/glance/pictorial-bar.data.d.ts +27 -0
  329. package/lib/types/charts/glance/rainfall-dual-area.d.ts +19 -0
  330. package/lib/types/charts/glance/rainfall-dual-area.data.d.ts +32 -0
  331. package/lib/types/charts/glance/rank-strip.d.ts +19 -0
  332. package/lib/types/charts/glance/rank-strip.data.d.ts +36 -0
  333. package/lib/types/charts/glance/scatter-labels.d.ts +23 -0
  334. package/lib/types/charts/glance/scatter-morph.d.ts +22 -0
  335. package/lib/types/charts/glance/scatter-morph.data.d.ts +30 -0
  336. package/lib/types/charts/glance/single-axis.d.ts +27 -0
  337. package/lib/types/charts/glance/single-axis.data.d.ts +6 -0
  338. package/lib/types/charts/glance/stagger-wave.d.ts +18 -0
  339. package/lib/types/charts/glance/stagger-wave.data.d.ts +26 -0
  340. package/lib/types/charts/glance/tree-lr.d.ts +16 -0
  341. package/lib/types/charts/glance/tree-lr.data.d.ts +27 -0
  342. package/lib/types/charts/glance/util-a.d.ts +31 -0
  343. package/lib/types/charts/glance/util-b.d.ts +12 -0
  344. package/lib/types/charts/glance/violin.d.ts +22 -0
  345. package/lib/types/charts/glance/violin.data.d.ts +24 -0
  346. package/lib/types/charts/hooks.d.ts +109 -0
  347. package/lib/types/charts/hover.d.ts +26 -0
  348. package/lib/types/charts/lupi/arc-matrix.d.ts +18 -0
  349. package/lib/types/charts/lupi/arc-matrix.data.d.ts +28 -0
  350. package/lib/types/charts/lupi/ballot-tally.d.ts +19 -0
  351. package/lib/types/charts/lupi/ballot-tally.data.d.ts +28 -0
  352. package/lib/types/charts/lupi/barcode-lollipop.d.ts +19 -0
  353. package/lib/types/charts/lupi/barcode-lollipop.data.d.ts +26 -0
  354. package/lib/types/charts/lupi/brand-spectrum.d.ts +28 -0
  355. package/lib/types/charts/lupi/brand-spectrum.data.d.ts +34 -0
  356. package/lib/types/charts/lupi/bubble-almanac.d.ts +22 -0
  357. package/lib/types/charts/lupi/bubble-almanac.data.d.ts +45 -0
  358. package/lib/types/charts/lupi/calendar-heat.d.ts +19 -0
  359. package/lib/types/charts/lupi/calendar-heat.data.d.ts +20 -0
  360. package/lib/types/charts/lupi/cluster-field.d.ts +21 -0
  361. package/lib/types/charts/lupi/cluster-field.data.d.ts +52 -0
  362. package/lib/types/charts/lupi/dot-cascade.d.ts +22 -0
  363. package/lib/types/charts/lupi/dot-cascade.data.d.ts +24 -0
  364. package/lib/types/charts/lupi/dotty-matrix.d.ts +17 -0
  365. package/lib/types/charts/lupi/dotty-matrix.data.d.ts +32 -0
  366. package/lib/types/charts/lupi/hourglass-stream.d.ts +18 -0
  367. package/lib/types/charts/lupi/hourglass-stream.data.d.ts +27 -0
  368. package/lib/types/charts/lupi/hundred-field.d.ts +18 -0
  369. package/lib/types/charts/lupi/hundred-field.data.d.ts +24 -0
  370. package/lib/types/charts/lupi/launch-fan.d.ts +37 -0
  371. package/lib/types/charts/lupi/launch-fan.data.d.ts +41 -0
  372. package/lib/types/charts/lupi/matrix-heat.d.ts +20 -0
  373. package/lib/types/charts/lupi/matrix-heat.data.d.ts +29 -0
  374. package/lib/types/charts/lupi/parallel-coordinates.d.ts +23 -0
  375. package/lib/types/charts/lupi/parallel-coordinates.data.d.ts +40 -0
  376. package/lib/types/charts/lupi/radial-convergence.d.ts +15 -0
  377. package/lib/types/charts/lupi/radial-convergence.data.d.ts +24 -0
  378. package/lib/types/charts/lupi/radial-patchwork.d.ts +16 -0
  379. package/lib/types/charts/lupi/radial-patchwork.data.d.ts +35 -0
  380. package/lib/types/charts/lupi/ridgeline.d.ts +23 -0
  381. package/lib/types/charts/lupi/ridgeline.data.d.ts +19 -0
  382. package/lib/types/charts/lupi/trend-lineage.d.ts +18 -0
  383. package/lib/types/charts/lupi/trend-lineage.data.d.ts +56 -0
  384. package/lib/types/charts/lupi/type-colonnade.d.ts +20 -0
  385. package/lib/types/charts/lupi/type-colonnade.data.d.ts +30 -0
  386. package/lib/types/charts/lupi/util-a.d.ts +9 -0
  387. package/lib/types/charts/lupi/util-b.d.ts +11 -0
  388. package/lib/types/charts/maps/choropleth.d.ts +33 -0
  389. package/lib/types/charts/maps/geo.d.ts +48 -0
  390. package/lib/types/charts/maps/legend.d.ts +14 -0
  391. package/lib/types/charts/maps/step-fill.d.ts +6 -0
  392. package/lib/types/charts/maps/us-choropleth.d.ts +25 -0
  393. package/lib/types/charts/maps/us-choropleth.data.d.ts +23 -0
  394. package/lib/types/charts/maps/world-choropleth.d.ts +22 -0
  395. package/lib/types/charts/maps/world-choropleth.data.d.ts +35 -0
  396. package/lib/types/charts/markers.d.ts +42 -0
  397. package/lib/types/charts/marks.d.ts +58 -0
  398. package/lib/types/charts/motion.d.ts +12 -0
  399. package/lib/types/charts/originals/daily-users.d.ts +13 -0
  400. package/lib/types/charts/originals/daily-users.data.d.ts +17 -0
  401. package/lib/types/charts/originals/feature-rank.d.ts +13 -0
  402. package/lib/types/charts/originals/feature-rank.data.d.ts +29 -0
  403. package/lib/types/charts/originals/format.d.ts +2 -0
  404. package/lib/types/charts/originals/key.d.ts +16 -0
  405. package/lib/types/charts/originals/response-time.d.ts +11 -0
  406. package/lib/types/charts/originals/response-time.data.d.ts +24 -0
  407. package/lib/types/charts/originals/revenue-by-plan.d.ts +12 -0
  408. package/lib/types/charts/originals/revenue-by-plan.data.d.ts +26 -0
  409. package/lib/types/charts/playback.d.ts +42 -0
  410. package/lib/types/charts/plot-note.d.ts +37 -0
  411. package/lib/types/charts/roles.d.ts +28 -0
  412. package/lib/types/charts/rules.d.ts +62 -0
  413. package/lib/types/charts/scale-context.d.ts +3 -0
  414. package/lib/types/charts/shapes.d.ts +9 -0
  415. package/lib/types/charts/shared-options.d.ts +25 -0
  416. package/lib/types/charts/svg.d.ts +24 -0
  417. package/lib/types/charts/text.d.ts +36 -0
  418. package/lib/types/charts/texture-ids.d.ts +24 -0
  419. package/lib/types/charts/texture.d.ts +185 -0
  420. package/lib/types/charts/util.d.ts +66 -0
  421. package/lib/types/charts/value-grid.d.ts +22 -0
  422. package/lib/types/draw.d.ts +279 -0
  423. package/lib/types/entries/dumbbell-queue.d.ts +2 -0
  424. package/lib/types/entries/hairline-area.d.ts +2 -0
  425. package/lib/types/entries/hairline-line.d.ts +2 -0
  426. package/lib/types/entries/plumb-scatter.d.ts +2 -0
  427. package/lib/types/entries/rung-bars.d.ts +2 -0
  428. package/lib/types/entries/slope.d.ts +2 -0
  429. package/lib/types/frame.d.ts +2 -0
  430. package/lib/types/index.d.ts +82 -0
  431. package/lib/types/kit.d.ts +22 -0
  432. package/lib/types/lib/format.d.ts +58 -0
  433. package/lib/types/lib/random.d.ts +5 -0
  434. package/lib/types/maps.d.ts +2 -0
  435. package/lib/types/schema/daily.d.ts +14 -0
  436. package/lib/types/schema/dumbbell-queue.d.ts +91 -0
  437. package/lib/types/schema/format.d.ts +101 -0
  438. package/lib/types/schema/hairline-area.d.ts +83 -0
  439. package/lib/types/schema/hairline-line.d.ts +85 -0
  440. package/lib/types/schema/key.d.ts +12 -0
  441. package/lib/types/schema/metrics.d.ts +26 -0
  442. package/lib/types/schema/motion.d.ts +22 -0
  443. package/lib/types/schema/options.d.ts +51 -0
  444. package/lib/types/schema/plumb-scatter.d.ts +124 -0
  445. package/lib/types/schema/registry.d.ts +309 -0
  446. package/lib/types/schema/rung-bars.d.ts +84 -0
  447. package/lib/types/schema/scale.d.ts +34 -0
  448. package/lib/types/schema/slope.d.ts +120 -0
  449. package/lib/types/schema/validate.d.ts +29 -0
  450. package/lib/types/schema.d.ts +30 -0
  451. package/lib/types/theme/derive.d.ts +23 -0
  452. package/lib/types/theme.d.ts +2 -0
  453. package/lib/vendor/us-atlas/states-10m.json.js +13855 -0
  454. package/lib/vendor/world-atlas/countries-110m.json.js +9357 -0
  455. package/package.json +162 -4
@@ -0,0 +1,218 @@
1
+ "use client";
2
+ import { useHover as e } from "../hooks.js";
3
+ import { Plot as t, Tooltip as n } from "../core.js";
4
+ import { noteOf as r, noteSpace as i, sansWidth as a, stagger as o, wrapWords as s } from "../util.js";
5
+ import { DimGroup as c, TipText as l } from "../hover.js";
6
+ import { TICK as u } from "../marks.js";
7
+ import { Dot as d } from "../markers.js";
8
+ import { PlotNote as f } from "../plot-note.js";
9
+ import { HRule as p, VRule as m } from "../rules.js";
10
+ import { ChartSvg as h } from "../svg.js";
11
+ import { Label as g } from "../text.js";
12
+ import { paint as _, useTextureIds as v } from "../texture-ids.js";
13
+ import { Hatch as y, Stipple as b } from "../texture.js";
14
+ import { parallelDemo as x } from "./parallel-coordinates.data.js";
15
+ import { scaleLinear as S } from "d3-scale";
16
+ import { quantile as C } from "d3-array";
17
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
18
+ //#region src/charts/lupi/parallel-coordinates.tsx
19
+ var E = u.md, D = (e) => {
20
+ let t = e.slice(1).map((t, n) => {
21
+ let r = e[n], i = (t.x - r.x) * .45;
22
+ return `C${r.x + i},${r.y} ${t.x - i},${t.y} ${t.x},${t.y}`;
23
+ });
24
+ return e.length > 0 ? `M${e[0].x},${e[0].y}${t.join("")}` : "";
25
+ }, O = (e, t) => `${D(e)}L${D(t.toReversed()).slice(1)}Z`, k = 14, A = (e, t, n) => t === 0 ? "0" : `${n(t).replace("-", "−")}${e.unit ?? ""}`, j = ({ axis: e, rug: t, index: n, x: r, top: i, bottom: a, lines: s, format: c }) => /* @__PURE__ */ T("g", {
26
+ className: "fade",
27
+ style: o(n, "mark"),
28
+ children: [
29
+ s.map((e, t) => /* @__PURE__ */ w(g, {
30
+ anchor: "middle",
31
+ muted: !0,
32
+ voice: "label",
33
+ x: r,
34
+ y: i - 26 - (s.length - 1 - t) * k,
35
+ children: e
36
+ }, e)),
37
+ /* @__PURE__ */ w(m, {
38
+ kind: "rule",
39
+ x: r,
40
+ y0: Math.round(i),
41
+ y1: Math.round(a)
42
+ }),
43
+ t.map((t) => /* @__PURE__ */ w(p, {
44
+ className: "stroke-l2 shape-crisp",
45
+ kind: "plain",
46
+ strokeWidth: 1,
47
+ x0: Math.round(r) + 1 - E,
48
+ x1: Math.round(r) + 1,
49
+ y: t
50
+ }, `${e.key}-${t}`)),
51
+ /* @__PURE__ */ w(g, {
52
+ middle: !0,
53
+ muted: !0,
54
+ voice: "axis",
55
+ x: r + 9,
56
+ y: i,
57
+ children: A(e, e.domain[1], c)
58
+ }),
59
+ /* @__PURE__ */ w(g, {
60
+ middle: !0,
61
+ muted: !0,
62
+ voice: "axis",
63
+ x: r + 9,
64
+ y: a,
65
+ children: A(e, e.domain[0], c)
66
+ })
67
+ ]
68
+ }), M = ({ row: e, index: t, pts: n, hero: r, active: i, onEnter: a }) => {
69
+ let s = D(n), l = r || i === !0, u = n.at(-1);
70
+ return /* @__PURE__ */ T(c, {
71
+ dim: i === !1,
72
+ onPointerEnter: a,
73
+ children: [
74
+ /* @__PURE__ */ w("path", {
75
+ className: "fill-none stroke-transparent",
76
+ d: s,
77
+ strokeWidth: 10
78
+ }),
79
+ /* @__PURE__ */ w("path", {
80
+ className: `draw cap-round fill-none ${l ? "stroke-hero" : "stroke-l4"}`,
81
+ d: s,
82
+ pathLength: 1,
83
+ strokeWidth: l ? 2 : 1,
84
+ style: o(r ? 14 : t, "mark")
85
+ }),
86
+ r ? n.map((n) => /* @__PURE__ */ w(d, {
87
+ className: "fade fill-hero",
88
+ cx: n.x,
89
+ cy: n.y,
90
+ size: "md",
91
+ style: o(t + 4, "mark")
92
+ }, `${e.name}-${n.x}`)) : null,
93
+ r && u !== void 0 && /* @__PURE__ */ w(g, {
94
+ middle: !0,
95
+ order: 16,
96
+ voice: "label",
97
+ x: u.x + 12,
98
+ y: u.y,
99
+ children: e.name
100
+ })
101
+ ]
102
+ });
103
+ }, N = (e) => /* @__PURE__ */ T("g", {
104
+ className: "fade",
105
+ style: o(2, "series"),
106
+ children: [
107
+ /* @__PURE__ */ T("defs", { children: [/* @__PURE__ */ w(b, {
108
+ id: e.ids("range"),
109
+ tone: "fill-l4"
110
+ }), /* @__PURE__ */ w(y, {
111
+ id: e.ids("middle"),
112
+ tone: "fill-l5"
113
+ })] }),
114
+ /* @__PURE__ */ w("path", {
115
+ className: "stroke-l5",
116
+ d: e.range,
117
+ fill: _(e.ids("range")),
118
+ strokeWidth: 1
119
+ }),
120
+ /* @__PURE__ */ w("path", {
121
+ className: "stroke-l5",
122
+ d: e.middle,
123
+ fill: _(e.ids("middle")),
124
+ strokeWidth: 1
125
+ })
126
+ ]
127
+ }), P = (e, t) => {
128
+ let n = e.rows.map((e) => e.values[t.key] ?? t.domain[0]);
129
+ return [Math.min(t.domain[0], ...n), Math.max(t.domain[1], ...n)];
130
+ }, F = (e, t, n) => e.axes.map((r) => S().domain(P(e, r)).range([n, t])), I = (e) => a(e, 10.4), L = (e, t) => Math.max(0, ...s(e?.label ?? "", t - 10, I).map(I)) / 2, R = (e, t, n, r) => {
131
+ let i = e.axes.at(0), a = e.axes.at(-1), o = a === void 0 ? 0 : Math.max(...P(e, a).map((e) => I(A(a, e, n)))), s = e.rows.some((e) => e.name === r) ? 12 + I(r ?? "") : 0, c = (n) => {
132
+ let r = (t - n.l - n.r) / Math.max(1, e.axes.length - 1);
133
+ return {
134
+ gap: r,
135
+ l: Math.max(E, L(i, r)),
136
+ r: Math.max(L(a, r), 9 + o, s)
137
+ };
138
+ }, l = c({
139
+ l: 30,
140
+ r: 30
141
+ }), u = c(l);
142
+ for (let e = 0; e < 4 && (u.l !== l.l || u.r !== l.r); e += 1) l = u, u = c(u);
143
+ return {
144
+ gap: Math.max(l.gap, u.gap),
145
+ l: Math.max(l.l, u.l),
146
+ r: Math.max(l.r, u.r)
147
+ };
148
+ }, z = (e, t, n, r) => e.axes.map((i, a) => ({
149
+ x: n(a),
150
+ y: t[a](C(e.rows.map((e) => e.values[i.key] ?? i.domain[0]), r) ?? i.domain[0])
151
+ })), B = (a) => {
152
+ let o = a.data ?? x, c = a.height ?? 470, u = a.format ?? ((e) => `${e}`), d = e(), p = v("ranges"), m = o.rows.map((e, t) => ({
153
+ i: t,
154
+ r: e
155
+ })).toSorted((e, t) => Number(e.r.name === a.highlight) - Number(t.r.name === a.highlight));
156
+ return /* @__PURE__ */ w(t, { children: (e) => {
157
+ let t = Math.min(e, a.maxWidth ?? 600), g = R(o, t, u, a.highlight), _ = (e - t) / 2 + g.l, v = (e + t) / 2 - g.r, y = e - 16 - Math.abs(_ + v - e), b = c - (30 + i(r(a), y, 24)), x = (e) => _ + (v - _) * e / Math.max(1, o.axes.length - 1), S = F(o, 58, b), { gap: C } = g, E = o.axes.map((e, t) => {
158
+ let n = S.at(t), r = n === void 0 ? e.domain[0] : n.invert(b), i = n === void 0 ? e.domain[1] : n.invert(58);
159
+ return {
160
+ ...e,
161
+ domain: [r, i]
162
+ };
163
+ }), D = (e) => o.axes.map((t, n) => ({
164
+ x: x(n),
165
+ y: S[n](e.values[t.key] ?? t.domain[0])
166
+ })), k = (e) => z(o, S, x, e), P = d.key === null ? void 0 : o.rows[d.key], L = P === void 0 ? [] : D(P);
167
+ return /* @__PURE__ */ T("div", {
168
+ className: "relative",
169
+ children: [/* @__PURE__ */ T(h, {
170
+ height: c,
171
+ label: `${o.rows.length} cheeses across ${o.axes.map((e) => e.label).join(", ")}`,
172
+ leave: d.clear,
173
+ title: "Twelve cheeses",
174
+ width: e,
175
+ children: [
176
+ /* @__PURE__ */ w(N, {
177
+ ids: p,
178
+ middle: O(k(.75), k(.25)),
179
+ range: O(k(1), k(0))
180
+ }),
181
+ E.map((e, t) => /* @__PURE__ */ w(j, {
182
+ axis: e,
183
+ bottom: b,
184
+ format: u,
185
+ index: t,
186
+ rug: [...new Set(o.rows.map((n) => S[t](n.values[e.key] ?? e.domain[0])))],
187
+ lines: s(e.label, C - 10, I),
188
+ top: 58,
189
+ x: x(t)
190
+ }, e.key)),
191
+ m.map(({ r: e, i: t }) => /* @__PURE__ */ w(M, {
192
+ active: d.key === null ? null : d.key === t,
193
+ hero: a.highlight === e.name,
194
+ index: t,
195
+ onEnter: d.enter(t),
196
+ pts: D(e),
197
+ row: e
198
+ }, e.name)),
199
+ /* @__PURE__ */ w(f, {
200
+ text: r(a),
201
+ width: y,
202
+ x: (_ + v) / 2,
203
+ y: c - 6
204
+ })
205
+ ]
206
+ }), P !== void 0 && L.length > 0 && /* @__PURE__ */ w(n, {
207
+ x: L[Math.floor(L.length / 2)].x,
208
+ y: Math.min(...L.map((e) => e.y)) - 6,
209
+ children: /* @__PURE__ */ w(l, {
210
+ facts: o.axes.map((e) => `${e.label} ${A(e, P.values[e.key] ?? 0, u)}`),
211
+ lead: P.name
212
+ })
213
+ })]
214
+ });
215
+ } });
216
+ };
217
+ //#endregion
218
+ export { B as ParallelCoordinates };
@@ -0,0 +1,178 @@
1
+ "use client";
2
+ //#region src/charts/lupi/radial-convergence.data.ts
3
+ var e = [
4
+ {
5
+ id: "Alex",
6
+ theme: "2020/21"
7
+ },
8
+ {
9
+ id: "Barbara",
10
+ theme: "2020/21"
11
+ },
12
+ {
13
+ id: "Aiden",
14
+ theme: "2020/21"
15
+ },
16
+ {
17
+ id: "Bella",
18
+ theme: "2020/21"
19
+ },
20
+ {
21
+ id: "Christoph",
22
+ theme: "2020/21"
23
+ },
24
+ {
25
+ id: "Darcy",
26
+ theme: "2020/21"
27
+ },
28
+ {
29
+ id: "Evert",
30
+ theme: "2020/21"
31
+ },
32
+ {
33
+ id: "Arwen",
34
+ theme: "2021/22"
35
+ },
36
+ {
37
+ id: "Barra",
38
+ theme: "2021/22"
39
+ },
40
+ {
41
+ id: "Malik",
42
+ theme: "2021/22"
43
+ },
44
+ {
45
+ id: "Corrie",
46
+ theme: "2021/22"
47
+ },
48
+ {
49
+ id: "Dudley",
50
+ theme: "2021/22"
51
+ },
52
+ {
53
+ id: "Eunice",
54
+ theme: "2021/22"
55
+ },
56
+ {
57
+ id: "Franklin",
58
+ theme: "2021/22"
59
+ },
60
+ {
61
+ id: "Otto",
62
+ theme: "2022/23"
63
+ },
64
+ {
65
+ id: "Noa",
66
+ theme: "2022/23"
67
+ },
68
+ {
69
+ id: "Antoni",
70
+ theme: "2022/23"
71
+ },
72
+ {
73
+ id: "Betty",
74
+ theme: "2022/23"
75
+ },
76
+ {
77
+ id: "Agnes",
78
+ theme: "2023/24"
79
+ },
80
+ {
81
+ id: "Babet",
82
+ theme: "2023/24"
83
+ },
84
+ {
85
+ id: "Ciarán",
86
+ theme: "2023/24"
87
+ },
88
+ {
89
+ id: "Debi",
90
+ theme: "2023/24"
91
+ },
92
+ {
93
+ id: "Elin",
94
+ theme: "2023/24"
95
+ },
96
+ {
97
+ id: "Fergus",
98
+ theme: "2023/24"
99
+ },
100
+ {
101
+ id: "Gerrit",
102
+ theme: "2023/24"
103
+ },
104
+ {
105
+ id: "Henk",
106
+ theme: "2023/24"
107
+ },
108
+ {
109
+ id: "Isha",
110
+ theme: "2023/24"
111
+ },
112
+ {
113
+ id: "Jocelyn",
114
+ theme: "2023/24"
115
+ },
116
+ {
117
+ id: "Kathleen",
118
+ theme: "2023/24"
119
+ },
120
+ {
121
+ id: "Lilian",
122
+ theme: "2023/24"
123
+ },
124
+ {
125
+ id: "Ashley",
126
+ theme: "2024/25"
127
+ },
128
+ {
129
+ id: "Bert",
130
+ theme: "2024/25"
131
+ },
132
+ {
133
+ id: "Conall",
134
+ theme: "2024/25"
135
+ },
136
+ {
137
+ id: "Darragh",
138
+ theme: "2024/25"
139
+ },
140
+ {
141
+ id: "Éowyn",
142
+ theme: "2024/25"
143
+ },
144
+ {
145
+ id: "Floris",
146
+ theme: "2024/25"
147
+ },
148
+ {
149
+ id: "Amy",
150
+ theme: "2025/26"
151
+ },
152
+ {
153
+ id: "Benjamin",
154
+ theme: "2025/26"
155
+ },
156
+ {
157
+ id: "Claudia",
158
+ theme: "2025/26"
159
+ },
160
+ {
161
+ id: "Bram",
162
+ theme: "2025/26"
163
+ },
164
+ {
165
+ id: "Goretti",
166
+ theme: "2025/26"
167
+ },
168
+ {
169
+ id: "Chandra",
170
+ theme: "2025/26"
171
+ },
172
+ {
173
+ id: "Dave",
174
+ theme: "2025/26"
175
+ }
176
+ ];
177
+ //#endregion
178
+ export { e as radialConvergenceDemo };
@@ -0,0 +1,208 @@
1
+ "use client";
2
+ import { Plot as e, Tooltip as t } from "../core.js";
3
+ import { clamp as n, dimClass as r, noteOf as i, noteSpace as a, sansWidth as o, stagger as s } from "../util.js";
4
+ import { DimGroup as c, HitCircle as l, TipText as u } from "../hover.js";
5
+ import { RING_STEP as d } from "../marks.js";
6
+ import { FootNote as f } from "../plot-note.js";
7
+ import { ChartSvg as p } from "../svg.js";
8
+ import { Label as m } from "../text.js";
9
+ import { DotRing as h } from "../texture.js";
10
+ import { argMax as g } from "./util-b.js";
11
+ import { clock as _ } from "./util-a.js";
12
+ import { radialConvergenceDemo as v } from "./radial-convergence.data.js";
13
+ import { useState as y } from "react";
14
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ //#region src/charts/lupi/radial-convergence.tsx
16
+ var S = (e, t) => n(t / 90, 1.4, 2.2) * Math.sqrt(e), C = .35, w = (e) => {
17
+ let t = e.reduce((e, t) => e + Math.sin(t * Math.PI / 180), 0), n = e.reduce((e, t) => e + Math.cos(t * Math.PI / 180), 0);
18
+ return (Math.atan2(t, n) * 180 / Math.PI + 360) % 360;
19
+ }, T = (e) => [...new Set(e.map((e) => e.theme))].map((t) => {
20
+ let n = e.flatMap((n, r) => n.theme === t ? [360 * r / e.length] : []);
21
+ return {
22
+ angle: w(n),
23
+ count: n.length,
24
+ theme: t
25
+ };
26
+ }), E = (e, t) => T(e).map((e) => {
27
+ let [n, r] = _(t.cx, t.cy, t.R * .34, e.angle);
28
+ return {
29
+ ...e,
30
+ x: n,
31
+ y: r
32
+ };
33
+ }), D = (e) => {
34
+ let { hub: t, rim: n } = e, [r, i] = _(n.cx, n.cy, n.R + 16, t.angle), a = Math.sin(t.angle * Math.PI / 180), s = Math.abs(a) > C && n.stacked, l = o(s ? t.theme : `${t.theme} · ${t.count}`, 11), u = "middle", d = r;
35
+ a > C ? (u = "start", d = Math.min(r, n.width - l - 2)) : a < -.35 && (u = "end", d = Math.max(r, l + 2));
36
+ let f = e.focus === null || e.focus.theme === t.theme;
37
+ return /* @__PURE__ */ b(c, {
38
+ dim: !f,
39
+ onPointerEnter: e.onEnter,
40
+ children: s ? /* @__PURE__ */ x(m, {
41
+ anchor: u,
42
+ className: "fade",
43
+ muted: !e.hero,
44
+ voice: "label",
45
+ x: d,
46
+ y: i,
47
+ children: [/* @__PURE__ */ b("tspan", {
48
+ x: d,
49
+ dy: "-0.2em",
50
+ children: t.theme
51
+ }), /* @__PURE__ */ b("tspan", {
52
+ x: d,
53
+ dy: "1.25em",
54
+ children: t.count
55
+ })]
56
+ }) : /* @__PURE__ */ x(m, {
57
+ anchor: u,
58
+ className: "fade",
59
+ middle: !0,
60
+ muted: !e.hero,
61
+ voice: "label",
62
+ x: d,
63
+ y: i,
64
+ children: [
65
+ t.theme,
66
+ " · ",
67
+ t.count
68
+ ]
69
+ })
70
+ });
71
+ }, O = ({ focused: e, hub: t, k: n, lit: i, onEnter: a, rim: o }) => {
72
+ let c = o.angle(n), [u, d] = _(o.cx, o.cy, o.R, c), [f, p] = _(o.cx, o.cy, o.R * .52, c), m = t.x + (f - t.x) * .25, h = t.y + (p - t.y) * .25;
73
+ return /* @__PURE__ */ x("g", {
74
+ className: r(!i),
75
+ onPointerEnter: () => {
76
+ a(u, d);
77
+ },
78
+ children: [/* @__PURE__ */ b("path", {
79
+ className: `draw ${e ? "stroke-l3" : "stroke-l6"}`,
80
+ d: `M${u},${d}C${f},${p} ${m},${h} ${t.x},${t.y}`,
81
+ fill: "none",
82
+ pathLength: 1,
83
+ strokeWidth: 1.5,
84
+ style: s(n, "fine")
85
+ }), /* @__PURE__ */ b(l, {
86
+ cx: u,
87
+ cy: d,
88
+ r: 7
89
+ })]
90
+ });
91
+ }, k = (e) => /* @__PURE__ */ b("g", { children: e.hubs.map((t) => /* @__PURE__ */ b("circle", {
92
+ className: `pop ${t.theme === e.hero ? "fill-hero" : "fill-l3"}`,
93
+ cx: t.x,
94
+ cy: t.y,
95
+ r: S(t.count, e.R),
96
+ style: s(6)
97
+ }, `hub-${t.theme}`)) }), A = (e, t, r, i) => {
98
+ let a = T(r), s = (e, t) => {
99
+ let n = -e - 2, r = e + 2;
100
+ for (let i of a) {
101
+ let a = Math.sin(i.angle * Math.PI / 180), s = (e + 16) * a, c = o(t && Math.abs(a) > C ? i.theme : `${i.theme} · ${i.count}`, 12);
102
+ a > C ? r = Math.max(r, s + c) : a < -.35 ? n = Math.min(n, s - c) : (n = Math.min(n, s - c / 2), r = Math.max(r, s + c / 2));
103
+ }
104
+ return {
105
+ hi: r,
106
+ lo: n
107
+ };
108
+ }, c = (r) => {
109
+ let a = 240;
110
+ for (; a > 64 && s(a, r).hi - s(a, r).lo > e;) --a;
111
+ return n(Math.min(a, (t - 56 - i) / 2), 64, 240);
112
+ }, l = c(!1) < 130 && c(!0) > c(!1), u = c(l), d = s(u, l), f = r.length, p = Math.min(t, Math.round(2 * (u + 28) + i));
113
+ return {
114
+ plotH: p,
115
+ rim: {
116
+ R: u,
117
+ angle: (e) => 360 * e / f,
118
+ cx: (e - (d.hi - d.lo)) / 2 - d.lo,
119
+ cy: (p - i) / 2,
120
+ stacked: l,
121
+ width: e
122
+ }
123
+ };
124
+ }, j = (n) => {
125
+ let r = n.data ?? v, o = n.height ?? 460, s = n.noun ?? "storm", [c, l] = y(null), [m, _] = y(null), C = () => {
126
+ l(null), _(null);
127
+ }, w = (e, t) => c === null || (c.item === null ? c.theme === e : c.item === t);
128
+ return /* @__PURE__ */ b(e, {
129
+ overlay: m === null ? null : /* @__PURE__ */ b(t, {
130
+ x: m.x,
131
+ y: m.y,
132
+ children: /* @__PURE__ */ b(u, {
133
+ facts: [m.value],
134
+ lead: m.label
135
+ })
136
+ }),
137
+ children: (e) => {
138
+ let t = a(i(n), e - 16, 20), { plotH: u, rim: m } = A(e, o, r, t), v = E(r, m), y = new Map(v.map((e) => [e.theme, e])), T = v.at(g(v.map((e) => e.count)))?.theme;
139
+ return /* @__PURE__ */ x(p, {
140
+ height: u,
141
+ label: `${r.length} named storms in ${v.length} seasons: ${v.map((e) => `${e.theme} ${e.count}`).join(", ")}`,
142
+ leave: C,
143
+ title: "Named storms on a rim bundled into season hubs",
144
+ width: e,
145
+ children: [
146
+ /* @__PURE__ */ b(h, {
147
+ className: "fade",
148
+ cx: m.cx,
149
+ cy: m.cy,
150
+ r: m.R,
151
+ step: d.guide,
152
+ tone: "fill-l4"
153
+ }),
154
+ v.map((e) => /* @__PURE__ */ b(D, {
155
+ focus: c,
156
+ hero: e.theme === T,
157
+ hub: e,
158
+ onEnter: () => {
159
+ l({
160
+ item: null,
161
+ theme: e.theme
162
+ }), _({
163
+ label: e.theme,
164
+ value: `${e.count} ${s}s`,
165
+ x: e.x,
166
+ y: e.y - S(e.count, m.R) - 4
167
+ });
168
+ },
169
+ rim: m
170
+ }, `label-${e.theme}`)),
171
+ r.map((e, t) => {
172
+ let n = y.get(e.theme);
173
+ return n === void 0 ? null : /* @__PURE__ */ b(O, {
174
+ focused: c !== null,
175
+ hub: n,
176
+ k: t,
177
+ lit: w(e.theme, t),
178
+ onEnter: (n, r) => {
179
+ l({
180
+ item: t,
181
+ theme: e.theme
182
+ }), _({
183
+ label: e.id,
184
+ value: e.theme,
185
+ x: n,
186
+ y: r - 8
187
+ });
188
+ },
189
+ rim: m
190
+ }, e.id);
191
+ }),
192
+ /* @__PURE__ */ b(k, {
193
+ R: m.R,
194
+ hero: T,
195
+ hubs: v
196
+ }),
197
+ /* @__PURE__ */ b(f, {
198
+ height: u,
199
+ text: i(n),
200
+ width: e
201
+ })
202
+ ]
203
+ });
204
+ }
205
+ });
206
+ };
207
+ //#endregion
208
+ export { j as RadialConvergence };