@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,195 @@
1
+ "use client";
2
+ import { fmtDegC as e } from "../../lib/format.js";
3
+ import { useHover as t } from "../hooks.js";
4
+ import { Plot as n, Tooltip as r } from "../core.js";
5
+ import { noteOf as i, noteSpace as a, sansWidth as o, stagger as s } from "../util.js";
6
+ import { DimGroup as c, HitRect as l, TipText as u } from "../hover.js";
7
+ import { Dot as d } from "../markers.js";
8
+ import { PlotNote as f } from "../plot-note.js";
9
+ import { HRule as p, Tick 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 { CrossHatch as y, Hatch as b } from "../texture.js";
14
+ import { ridgelineDemo as x } from "./ridgeline.data.js";
15
+ import { scaleLinear as S } from "d3-scale";
16
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
17
+ import { area as E, curveBasis as D, line as O } from "d3-shape";
18
+ //#region src/charts/lupi/ridgeline.tsx
19
+ var k = 120, A = (t) => t === 0 ? "0" : e(t).replace(".0 °C", " °C"), j = (e, t, n, r) => {
20
+ let i = (n - t) / k, a = Array.from({ length: 121 }, (n, a) => {
21
+ let o = t + i * a, s = 0;
22
+ for (let t of e.values) {
23
+ let e = (o - t) / r;
24
+ s += Math.exp(-.5 * e * e);
25
+ }
26
+ return [o, s / (e.values.length * r * Math.sqrt(2 * Math.PI))];
27
+ }), o = 0;
28
+ for (let [e, t] of a.entries()) t[1] > a[o][1] && (o = e);
29
+ let s = o === 0 || o === k ? a[o][1] : (a[o - 1][1] + 4 * a[o][1] + a[o + 1][1]) / 6, c = e.values.toSorted((e, t) => e - t);
30
+ return {
31
+ density: a,
32
+ label: e.label,
33
+ median: c[Math.floor(c.length / 2)] ?? 0,
34
+ n: e.values.length,
35
+ peak: a[o][0],
36
+ top: s
37
+ };
38
+ }, M = ({ ridge: e, index: t, base: n, ridgeH: r, maxD: i, x: a, hero: o, dim: l, label: u, fills: d }) => {
39
+ let f = (e) => n - e / i * r, m = E().x((e) => a(e[0])).y0(n).y1((e) => f(e[1])).curve(D)(e.density), h = O().x((e) => a(e[0])).y((e) => f(e[1])).curve(D)(e.density);
40
+ return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("path", {
41
+ d: m ?? "",
42
+ className: "fill-paper"
43
+ }), /* @__PURE__ */ T(c, {
44
+ dim: l,
45
+ children: [
46
+ /* @__PURE__ */ w("g", {
47
+ className: "fade",
48
+ style: s(t, "series"),
49
+ children: /* @__PURE__ */ w("path", {
50
+ d: m ?? "",
51
+ fill: _(o ? d.hero : d.hatch)
52
+ })
53
+ }),
54
+ /* @__PURE__ */ w(p, {
55
+ x0: a.range()[0],
56
+ x1: a.range()[1],
57
+ y: n
58
+ }),
59
+ /* @__PURE__ */ w("path", {
60
+ d: h ?? "",
61
+ className: `draw cap-round fill-none ${o ? "stroke-hero" : "stroke-l3"}`,
62
+ pathLength: 1,
63
+ style: s(t, "series"),
64
+ strokeWidth: o ? 2 : 1.5
65
+ }),
66
+ /* @__PURE__ */ w(g, {
67
+ anchor: "end",
68
+ muted: !o,
69
+ order: t,
70
+ tier: "series",
71
+ voice: "label",
72
+ x: a.range()[0] - 18,
73
+ y: n - 4,
74
+ children: u
75
+ })
76
+ ]
77
+ })] });
78
+ }, N = ({ ridges: e, baseOf: t, ridgeH: n, maxD: r, x: i, heroOf: a, hover: o, format: l }) => /* @__PURE__ */ w("g", { children: e.map((e, u) => {
79
+ let f = a(e), p = t(u);
80
+ return /* @__PURE__ */ T(c, {
81
+ dim: o !== null && o !== u,
82
+ children: [/* @__PURE__ */ w(d, {
83
+ className: `pop ${f ? "fill-hero" : "fill-l3"}`,
84
+ cx: i(e.peak),
85
+ cy: p - e.top / r * n,
86
+ size: f ? "md" : "sm",
87
+ style: s(u * 6 + 30, "fine")
88
+ }), /* @__PURE__ */ w(g, {
89
+ muted: !f,
90
+ order: u + 6,
91
+ tier: "series",
92
+ voice: "value",
93
+ x: i.range()[1] + 8,
94
+ y: p - 4,
95
+ children: l(e.peak)
96
+ })]
97
+ }, `peak-${e.label}`);
98
+ }) }), P = ({ x: e, y: t, ticks: n, format: r }) => {
99
+ let [i, a] = e.domain(), o = Array.from({ length: n + 1 }, (e, t) => i + (a - i) * t / n);
100
+ return /* @__PURE__ */ w("g", {
101
+ className: "fade",
102
+ children: o.map((n) => /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w(m, {
103
+ x: e(n),
104
+ y: Math.round(t)
105
+ }), /* @__PURE__ */ w(g, {
106
+ anchor: "middle",
107
+ voice: "axis",
108
+ x: e(n),
109
+ y: t + 20,
110
+ children: r(n)
111
+ })] }, `tick-${n}`))
112
+ });
113
+ }, F = (e) => {
114
+ let s = e.data ?? x, [c, d] = e.domain ?? [-12, 12], p = e.bandwidth ?? (d - c) / 26, m = e.format ?? A, g = e.height ?? 440, _ = e.ticks ?? 4, C = t(), E = v("ridge"), D = E("hatch"), O = E("hero"), k = s.map((e) => j(e, c, d, p)), F = Math.max(...k.map((e) => e.top)), I = e.highlight ?? k[0]?.label, L = (e) => e.label === I;
115
+ return /* @__PURE__ */ w(n, { children: (t) => {
116
+ let n = Math.ceil(18 + Math.max(...k.map((e) => o(e.label, 10.4)))), s = Math.ceil(8 + Math.max(...k.map((e) => o(m(e.peak), 11)))), p = Math.min(t - n - s, 520), v = Math.round(n + (t - n - s - p) / 2), x = S().domain([c, d]).range([v, v + p]), E = t - 16 - Math.abs(2 * v + p - t), A = 34 + a(i(e), E, 24), j = (g - A - 30) / (k.length + .9), I = j * 1.9, R = (e) => g - A - j * (k.length - 1 - e), z = C.key === null ? void 0 : k[C.key];
117
+ return /* @__PURE__ */ T("div", {
118
+ className: "relative",
119
+ children: [/* @__PURE__ */ T(h, {
120
+ height: g,
121
+ label: `Ridgeline of ${k.length} distributions; peaks: ${k.map((e) => `${e.label} ${m(e.peak)}`).join(", ")}`,
122
+ leave: C.clear,
123
+ title: "January daily mean temperature by decade",
124
+ width: t,
125
+ children: [
126
+ /* @__PURE__ */ T("defs", { children: [/* @__PURE__ */ w(b, {
127
+ id: D,
128
+ tone: "fill-l5"
129
+ }), /* @__PURE__ */ w(y, {
130
+ id: O,
131
+ tone: "fill-hero"
132
+ })] }),
133
+ k.map((e, n) => /* @__PURE__ */ T("g", {
134
+ onPointerEnter: C.enter(n),
135
+ children: [/* @__PURE__ */ w(l, {
136
+ x: 0,
137
+ y: R(n) - j,
138
+ width: t,
139
+ height: j
140
+ }), /* @__PURE__ */ w(M, {
141
+ ridge: e,
142
+ index: n,
143
+ base: R(n),
144
+ ridgeH: I,
145
+ maxD: F,
146
+ x,
147
+ hero: L(e),
148
+ dim: C.dim(n),
149
+ label: e.label,
150
+ fills: {
151
+ hatch: D,
152
+ hero: O
153
+ }
154
+ })]
155
+ }, e.label)),
156
+ /* @__PURE__ */ w(N, {
157
+ ridges: k,
158
+ baseOf: R,
159
+ ridgeH: I,
160
+ maxD: F,
161
+ x,
162
+ heroOf: L,
163
+ hover: C.key,
164
+ format: m
165
+ }),
166
+ /* @__PURE__ */ w(P, {
167
+ x,
168
+ y: R(k.length - 1) + 8,
169
+ ticks: _,
170
+ format: m
171
+ }),
172
+ /* @__PURE__ */ w(f, {
173
+ text: i(e),
174
+ width: E,
175
+ x: v + p / 2,
176
+ y: g - 6
177
+ })
178
+ ]
179
+ }), z !== void 0 && C.key !== null && /* @__PURE__ */ w(r, {
180
+ x: x(z.peak),
181
+ y: R(C.key) - I * .5,
182
+ children: /* @__PURE__ */ w(u, {
183
+ facts: [
184
+ `peak ${m(z.peak)}`,
185
+ `median ${m(z.median)}`,
186
+ `n = ${z.n}`
187
+ ],
188
+ lead: z.label
189
+ })
190
+ })]
191
+ });
192
+ } });
193
+ };
194
+ //#endregion
195
+ export { F as Ridgeline };
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ //#region src/charts/lupi/trend-lineage.data.ts
3
+ var e = [
4
+ {
5
+ name: "Forties",
6
+ reworked: [1956],
7
+ shipped: 1924
8
+ },
9
+ {
10
+ name: "Dogger",
11
+ reworked: [1956],
12
+ shipped: 1924
13
+ },
14
+ {
15
+ name: "Tay",
16
+ retired: 1949,
17
+ shipped: 1924
18
+ },
19
+ {
20
+ name: "German Bight",
21
+ reworked: [1956],
22
+ shipped: 1949
23
+ },
24
+ {
25
+ name: "FitzRoy",
26
+ reworked: [2002],
27
+ shipped: 1949
28
+ },
29
+ {
30
+ name: "Rockall",
31
+ shipped: 1949
32
+ },
33
+ {
34
+ name: "Fisher",
35
+ shipped: 1956
36
+ },
37
+ {
38
+ name: "Viking",
39
+ shipped: 1956
40
+ },
41
+ {
42
+ name: "North Utsire",
43
+ shipped: 1984
44
+ },
45
+ {
46
+ name: "South Utsire",
47
+ shipped: 1984
48
+ }
49
+ ];
50
+ //#endregion
51
+ export { e as trendLineageDemo };
@@ -0,0 +1,198 @@
1
+ "use client";
2
+ import { yearTickLabels as e } from "../../lib/format.js";
3
+ import { useHover as t } from "../hooks.js";
4
+ import { Plot as n, Tooltip as r } from "../core.js";
5
+ import { noteOf as i, noteSpace as a, stagger as o } from "../util.js";
6
+ import { DimGroup as s, HitRect as c, TipText as l } from "../hover.js";
7
+ import { crisp as u } from "../axes.js";
8
+ import { DOT as d } from "../marks.js";
9
+ import { Dot as f, Ring as p } from "../markers.js";
10
+ import { FootNote as m } from "../plot-note.js";
11
+ import { HRule as h, Stem as g } from "../rules.js";
12
+ import { ChartSvg as _ } from "../svg.js";
13
+ import { Label as v } from "../text.js";
14
+ import { TEXTURE_PITCH as y } from "../texture-ids.js";
15
+ import { DottedLine as b } from "../texture.js";
16
+ import { byStep as x } from "./util-b.js";
17
+ import { trendLineageDemo as S } from "./trend-lineage.data.js";
18
+ import { scaleLinear as C } from "d3-scale";
19
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
20
+ //#region src/charts/lupi/trend-lineage.tsx
21
+ var D = .65, O = (e) => Math.floor(e), k = (e) => {
22
+ let t = [`added ${O(e.shipped)}`], n = e.reworked ?? [], r = e.dormant ?? [];
23
+ return n.length > 0 && t.push(`changed ${n.map(O).join(", ")}`), r.length > 0 && t.push(`suspended ${r.map(([e, t]) => `${O(e)}–${O(t)}`).join(", ")}`), t.push(e.retired === void 0 ? "in use today" : `dropped ${O(e.retired)}`), t.join(" · ");
24
+ }, A = (e, t) => {
25
+ let n = e.dormant ?? [], r = [
26
+ e.shipped,
27
+ ...n.flat(),
28
+ t
29
+ ].toSorted((e, t) => e - t), i = [];
30
+ for (let [t, a] of r.entries()) {
31
+ let o = r[t + 1];
32
+ if (o !== void 0 && o > a) {
33
+ let t = (a + o) / 2;
34
+ i.push({
35
+ a,
36
+ b: o,
37
+ dormant: n.some(([e, n]) => t > e && t < n),
38
+ id: `${e.name}-${a}`
39
+ });
40
+ }
41
+ }
42
+ return i;
43
+ }, j = ({ years: t, y: n, x0: r, x1: i, every: a }) => {
44
+ let o = t.filter((e) => e % a === 0), s = new Map(e(o.map((e) => new Date(Date.UTC(e, 0, 1)))).map((e, t) => [o[t], e]));
45
+ return /* @__PURE__ */ T("g", { children: (a >= 5 ? o : t).map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T(h, {
46
+ kind: "grid",
47
+ x0: r - 8,
48
+ x1: i,
49
+ y: n(e)
50
+ }), s.has(e) && /* @__PURE__ */ T(v, {
51
+ anchor: "end",
52
+ middle: !0,
53
+ voice: "axis",
54
+ x: r - 16,
55
+ y: n(e),
56
+ children: s.get(e)
57
+ })] }, `year-${e}`)) });
58
+ }, M = ({ feature: e, index: t, x: n, colW: r, top: i, floor: a, floorYear: s, size: l, y: d, hero: m }) => {
59
+ let h = [e.shipped, ...e.reworked ?? []].toSorted((e, t) => e - t), _ = e.retired ?? s, x = a + 14, S = m ? Math.round(n) : u(n), C = "fill-muted";
60
+ return m ? C = "" : e.retired !== void 0 && (C = "fill-faint"), /* @__PURE__ */ E(w, { children: [
61
+ /* @__PURE__ */ T(c, {
62
+ x: n - r / 2,
63
+ y: i,
64
+ width: r,
65
+ height: a - i + 40
66
+ }),
67
+ A(e, _).map((e) => e.dormant ? /* @__PURE__ */ T("g", {
68
+ className: "fade",
69
+ style: o(t, "series"),
70
+ children: /* @__PURE__ */ T(b, {
71
+ pitch: y.dense,
72
+ tone: m ? "fill-hero" : "fill-l3",
73
+ x0: n,
74
+ x1: n,
75
+ y0: d(e.a),
76
+ y1: d(e.b)
77
+ })
78
+ }, e.id) : /* @__PURE__ */ T(g, {
79
+ className: `grow-y from-top ${m ? "stroke-hero" : "stroke-l5"}`,
80
+ hero: m,
81
+ style: o(t, "series"),
82
+ x: n,
83
+ y0: u(d(e.a)),
84
+ y1: u(d(e.b))
85
+ }, e.id)),
86
+ e.retired === void 0 ? null : /* @__PURE__ */ T(f, {
87
+ className: "pop fill-l5",
88
+ style: o(t * 3 + 4, "mark"),
89
+ cx: S,
90
+ cy: u(d(e.retired)),
91
+ size: "xs"
92
+ }),
93
+ h.slice(1).map((e) => /* @__PURE__ */ T(p, {
94
+ className: `pop ${m ? "stroke-hero" : "stroke-l3"}`,
95
+ style: o(t * 3 + 2, "mark"),
96
+ cx: S,
97
+ cy: u(d(e)),
98
+ size: l
99
+ }, `rework-${e}`)),
100
+ /* @__PURE__ */ T(f, {
101
+ className: `pop ${m ? "fill-hero" : "fill-l3"}`,
102
+ style: o(t * 3, "mark"),
103
+ cx: S,
104
+ cy: u(d(e.shipped)),
105
+ size: l
106
+ }),
107
+ /* @__PURE__ */ T(v, {
108
+ anchor: "end",
109
+ className: C,
110
+ order: t,
111
+ transform: `rotate(${r < 44 ? -64 : -38} ${n + 3} ${x})`,
112
+ voice: "label",
113
+ x: n + 3,
114
+ y: x,
115
+ children: e.name
116
+ })
117
+ ] });
118
+ }, N = (o) => {
119
+ let c = o.data ?? S, u = o.height ?? 460, f = t(), p = c.flatMap((e) => [
120
+ e.shipped,
121
+ ...e.reworked ?? [],
122
+ ...e.retired === void 0 ? [] : [e.retired]
123
+ ]), h = o.highlight ?? c.filter((e) => e.retired === void 0).toSorted((e, t) => e.shipped - t.shipped).at(0)?.name, [g, v] = o.years ?? [Math.floor(Math.min(...p)), Math.ceil(Math.max(...p))], y = Math.max(0, ...e(Array.from({ length: v - g + 1 }, (e, t) => new Date(Date.UTC(g + t, 0, 1)))).map((e) => e.length * 7.3));
124
+ return /* @__PURE__ */ T(n, { children: (e) => {
125
+ let t = {
126
+ bottom: (e < 480 ? 84 : 76) + a(i(o), e - 16, 24),
127
+ left: 16 + y,
128
+ right: 0,
129
+ top: 14
130
+ }, n = Math.min(e - t.left - t.right, c.length * 64), p = t.left + (e - t.left - t.right - n) / 2, b = n / c.length, S = (e) => p + b * (e + .5), w = C().domain([g, v + D]).range([t.top + 8, u - t.bottom]), O = w(g + 1) - w(g), A = w(v + D), N = Math.min(O * .32, b * .2) >= d.lg ? "lg" : "md", P = Array.from({ length: v - g + 1 }, (e, t) => g + t), F = x(O, [
131
+ {
132
+ min: 34,
133
+ out: 1
134
+ },
135
+ {
136
+ min: 10,
137
+ out: 2
138
+ },
139
+ {
140
+ min: 5,
141
+ out: 5
142
+ },
143
+ {
144
+ min: 2.5,
145
+ out: 10
146
+ }
147
+ ], 25), I = f.key === null ? void 0 : c[f.key];
148
+ return /* @__PURE__ */ E("div", {
149
+ className: "relative",
150
+ children: [/* @__PURE__ */ E(_, {
151
+ height: u,
152
+ label: `Sea area lineage ${g}–${v}: ${c.map((e) => `${e.name}, ${k(e)}`).join("; ")}`,
153
+ leave: f.clear,
154
+ title: "Sea area lineage",
155
+ width: e,
156
+ children: [
157
+ /* @__PURE__ */ T(j, {
158
+ years: P,
159
+ y: w,
160
+ x0: p,
161
+ x1: p + n,
162
+ every: F
163
+ }),
164
+ c.map((e, n) => /* @__PURE__ */ T(s, {
165
+ dim: f.dim(n),
166
+ onPointerEnter: f.enter(n),
167
+ children: /* @__PURE__ */ T(M, {
168
+ feature: e,
169
+ index: n,
170
+ x: S(n),
171
+ colW: b,
172
+ top: t.top,
173
+ floor: A,
174
+ floorYear: v + D,
175
+ size: N,
176
+ y: w,
177
+ hero: h === e.name
178
+ })
179
+ }, e.name)),
180
+ /* @__PURE__ */ T(m, {
181
+ height: u,
182
+ text: i(o),
183
+ width: e
184
+ })
185
+ ]
186
+ }), I !== void 0 && f.key !== null && /* @__PURE__ */ T(r, {
187
+ x: S(f.key),
188
+ y: w(I.shipped) - d[N] - 4,
189
+ children: /* @__PURE__ */ T(l, {
190
+ facts: [k(I)],
191
+ lead: I.name
192
+ })
193
+ })]
194
+ });
195
+ } });
196
+ };
197
+ //#endregion
198
+ export { N as TrendLineage };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ var e = [
3
+ ["Trinity House", /* @__PURE__ */ "Anvil Point Lighthouse,Bamburgh Lighthouse,Beachy Head Lighthouse,Berry Head Lighthouse,Bishop Rock Lighthouse,Bull Point Lighthouse,Coquet Lighthouse,Cromer Lighthouse,Crow Point Lighthouse,Dungeness Lighthouse,Eddystone Lighthouse,Farne Lighthouse,Godrevy Lighthouse,Guile Point East Lighthouse,Hartland Point Lighthouse,Heugh Hill Lighthouse,Hilbre Island Lighthouse,Hurst Point Lighthouse,Instow Front Lighthouse,Instow Rear Lighthouse,Lizard Lighthouse,Longships Lighthouse,Longstone Lighthouse,Lowestoft Lighthouse,Lundy North Lighthouse,Lundy South Lighthouse,Lynmouth Foreland Lighthouse,Nab Tower,Needles Lighthouse,North Foreland Lighthouse,Pendeen Lighthouse,Peninnis Lighthouse,Portland Bill Lighthouse,Round Island Lighthouse,Southwold Lighthouse,St Anthony's Lighthouse,St Bees Lighthouse,St. Catherine's Lighthouse,Start Point Lighthouse,Tater Du Lighthouse,Trevose Head Lighthouse,Whitby Lighthouse,Wolf Rock Lighthouse".split(",")],
4
+ ["Harbours", /* @__PURE__ */ "Beach Lighthouse.Berkeley Pill Front light.Berkeley Pill Rear light.Berwick Lighthouse.Chapel Rock Lighthouse.Folkestone Lighthouse.Gorleston South Pier Lighthouse.Herd Groyne Light.Heugh Lighthouse.Ilfracombe Lighthouse.Killingholme High Lighthouse.Killingholme South Low Lighthouse.Lyde Rock lighthouse.Maryport New Lighthouse.Pharos Lighthouse.Plover Scar Lighthouse.Portishead Point Lighthouse.Portland Breakwater Lighthouse.Rampside Lighthouse.Ramsgate West Pier Lighthouse.Roker Pier lighthouse.Shoreham Lighthouse.South Gare Lighthouse.Teignmouth Lighthouse.Thorngumbald Clough High Lighthouse.Thorngumbald Clough Low Lighthouse.Tyne South Pier light.Tynemouth North Pier light.Walney Lighthouse.Watchet Harbour Lighthouse.West Pier Lighthouse.Whitby East Pier Lighthouse.Whitby West Pier Lighthouse.Whitgift Lighthouse".split(".")],
5
+ ["Councils", [
6
+ "Burnham-on-Sea Low Lighthouse",
7
+ "Scarborough Lighthouse",
8
+ "Whitby East Pier beacon",
9
+ "Whitby West Pier beacon"
10
+ ]],
11
+ ["Trust", ["Happisburgh Lighthouse"]],
12
+ ["Defence", ["Plymouth Breakwater Lighthouse"]]
13
+ ].flatMap(([e, t]) => t.map((t) => ({
14
+ name: t,
15
+ owner: e
16
+ }))).toSorted((e, t) => e.name.localeCompare(t.name));
17
+ //#endregion
18
+ export { e as typeColonnadeDemo };
@@ -0,0 +1,198 @@
1
+ "use client";
2
+ import { Plot as e, Tooltip as t } from "../core.js";
3
+ import { dimClass as n, noteOf as r, noteSpace as i, sansWidth as a, stagger as o, wrapWords as s } from "../util.js";
4
+ import { HitRect as c, TipText as l } from "../hover.js";
5
+ import { crisp as u } from "../axes.js";
6
+ import { DOT as d } from "../marks.js";
7
+ import { Ring as f } from "../markers.js";
8
+ import { FootNote as p } from "../plot-note.js";
9
+ import { ChartSvg as m } from "../svg.js";
10
+ import { Label as h } from "../text.js";
11
+ import { paint as g, useTextureIds as _ } from "../texture-ids.js";
12
+ import { CrossHatch as v, Hatch as y } from "../texture.js";
13
+ import { typeColonnadeDemo as b } from "./type-colonnade.data.js";
14
+ import { useState as x } from "react";
15
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
16
+ //#region src/charts/lupi/type-colonnade.tsx
17
+ var w = 12, T = 10, E = 4, D = 2, O = d.xs, k = (e) => a(e.replaceAll("\xA0", " "), 10.4), A = (e) => `${e.owner}\u00A0·\u00A0${e.count}`, j = (e, t, n) => {
18
+ let r = Math.max(0, ...e.map((e) => t(e.count) + T + k(A(e)) + E));
19
+ return Math.min(Math.ceil(r), n * .42);
20
+ }, M = (e) => {
21
+ let t = /* @__PURE__ */ new Map();
22
+ for (let n of e) t.set(n.owner, (t.get(n.owner) ?? 0) + 1);
23
+ return [...t.entries()].toSorted((e, t) => t[1] - e[1]).map(([e, t], n) => ({
24
+ count: t,
25
+ owner: e,
26
+ rank: n
27
+ }));
28
+ }, N = (e, t) => {
29
+ let n = new Map(t.map((e) => [e.owner, e.rank])), r = [...e.keys()].toSorted((t, r) => (n.get(e[t]?.owner ?? "") ?? 0) - (n.get(e[r]?.owner ?? "") ?? 0) || t - r), i = /* @__PURE__ */ new Map(), a = 0, o;
30
+ for (let t of r) {
31
+ let n = e[t]?.owner;
32
+ o !== void 0 && n !== o && (a += D), i.set(t, a), a += 1, o = n;
33
+ }
34
+ return {
35
+ rows: a,
36
+ slot: i
37
+ };
38
+ }, P = (e, t, n, r, i) => {
39
+ let a = e < 460, o = Math.min(e, 600), c = Math.round((e - o) / 2), { rows: l, slot: u } = N(n, r), d = Math.max(4, Math.floor((t - 12 - i) / Math.max(1, l))), f = (e) => 8 + d * (u.get(e) ?? 0), p = new Map(r.map((e) => {
40
+ let t = [...n.keys()].flatMap((t) => n[t]?.owner === e.owner ? [f(t)] : []);
41
+ return [e.owner, (Math.min(...t) + Math.max(...t)) / 2];
42
+ })), m = r[0]?.count ?? 1, h = a ? 12 : 16, g = (e) => Math.max(3, h * Math.sqrt(e / m)), _ = j(r, g, o), v = new Map(r.map((e) => [e.owner, s(A(e), _ - g(e.count) - T - E, k)]));
43
+ return {
44
+ blockW: o,
45
+ height: Math.round(8 + d * (l - 1) + 12 + i),
46
+ left: c,
47
+ ownerLines: v,
48
+ pitch: d,
49
+ rMax: h,
50
+ rOf: g,
51
+ xDot: c + O + 1.5,
52
+ xOwner: c + o + E - _,
53
+ xTick0: c,
54
+ xTick1: c + O * 2 + 2,
55
+ yItem: f,
56
+ yOwner: (e) => p.get(e) ?? 8
57
+ };
58
+ }, F = (e, t, n) => t === null ? null : t.item === void 0 ? t.owner === e[n]?.owner : t.item === n, I = (e, t, n) => t === null ? null : t.owner === void 0 ? e[t.item ?? -1]?.owner === n : t.owner === n, L = ({ data: e, at: t, focus: r, isHero: i, onFocus: a }) => /* @__PURE__ */ S("g", { children: e.map((s, l) => {
59
+ let d = F(e, r, l), p = u(t.yItem(l)), m = d === !0 || i(s.owner);
60
+ return /* @__PURE__ */ C("g", {
61
+ className: n(d === !1),
62
+ onPointerEnter: () => {
63
+ a({ item: l });
64
+ },
65
+ children: [
66
+ /* @__PURE__ */ S(c, {
67
+ height: t.pitch,
68
+ width: t.xOwner - t.rMax - t.xTick0,
69
+ x: t.xTick0,
70
+ y: p - t.pitch / 2
71
+ }),
72
+ /* @__PURE__ */ S(f, {
73
+ className: `pop transition-tone ${m ? "stroke-ink" : "stroke-l3"}`,
74
+ cx: t.xDot,
75
+ cy: p,
76
+ size: "xs",
77
+ style: o(l, "dense")
78
+ }),
79
+ /* @__PURE__ */ S("line", {
80
+ className: `draw transition-tone ${m ? "stroke-ink" : "stroke-l5"}`,
81
+ pathLength: 1,
82
+ strokeWidth: 1,
83
+ style: o(l, "fine"),
84
+ x1: t.xTick1,
85
+ x2: t.xOwner,
86
+ y1: p,
87
+ y2: t.yOwner(s.owner)
88
+ })
89
+ ]
90
+ }, s.name);
91
+ }) }), R = ({ hero: e, lines: t, owner: n, rank: r, x: i, y: a }) => /* @__PURE__ */ S(h, {
92
+ muted: !e,
93
+ order: r + 10,
94
+ voice: "label",
95
+ y: a - (t.length - 1) * w / 2,
96
+ children: t.map((e, t) => /* @__PURE__ */ S("tspan", {
97
+ dy: t === 0 ? "0.34em" : w,
98
+ x: i,
99
+ children: e
100
+ }, `${n}-${e}`))
101
+ }), z = ({ data: e, owners: t, at: n, focus: r, isHero: i, fills: a, onFocus: s }) => /* @__PURE__ */ S("g", { children: t.map((t) => {
102
+ let l = I(e, r, t.owner), u = n.yOwner(t.owner), d = n.rOf(t.count), f = i(t.owner);
103
+ return /* @__PURE__ */ C("g", {
104
+ className: `transition-opacity ${l === !1 ? "opacity-30" : ""}`,
105
+ onPointerEnter: () => {
106
+ s({ owner: t.owner });
107
+ },
108
+ children: [
109
+ /* @__PURE__ */ S(c, {
110
+ x: n.xOwner - n.rMax,
111
+ y: u - Math.max(d, 9),
112
+ width: n.blockW + n.left - n.xOwner + n.rMax,
113
+ height: Math.max(d, 9) * 2
114
+ }),
115
+ /* @__PURE__ */ S("circle", {
116
+ className: `pop ${f ? "stroke-hero" : "stroke-l5"}`,
117
+ cx: n.xOwner,
118
+ cy: u,
119
+ fill: g(f ? a.hero : a.hatch),
120
+ r: d,
121
+ strokeWidth: 1,
122
+ style: o(t.rank + 24, "mark")
123
+ }),
124
+ /* @__PURE__ */ S(R, {
125
+ hero: f,
126
+ lines: n.ownerLines.get(t.owner) ?? [A(t)],
127
+ owner: t.owner,
128
+ rank: t.rank,
129
+ x: n.xOwner + d + T,
130
+ y: u
131
+ })
132
+ ]
133
+ }, t.owner);
134
+ }) }), B = (n) => {
135
+ let a = n.data ?? b, o = n.height ?? 460, s = n.strong ?? 1, c = n.unit ?? "items", [u, d] = x(null), f = M(a), h = _("owners"), g = {
136
+ hatch: h("hatch"),
137
+ hero: h("hero")
138
+ }, w = new Set(n.highlight === void 0 ? f.flatMap((e) => e.rank < s ? [e.owner] : []) : [n.highlight]);
139
+ return /* @__PURE__ */ S(e, { children: (e) => {
140
+ let s = P(e, o, a, f, i(r(n), e - 16, 24)), h = {
141
+ at: s,
142
+ data: a,
143
+ fills: g,
144
+ focus: u,
145
+ isHero: (e) => w.has(e),
146
+ onFocus: d,
147
+ owners: f
148
+ }, _ = u?.owner, b = u?.item === void 0 ? void 0 : a[u.item];
149
+ return /* @__PURE__ */ C("div", {
150
+ className: "relative",
151
+ children: [
152
+ /* @__PURE__ */ C(m, {
153
+ height: s.height,
154
+ label: `${a.length} ${c} across ${f.length} keepers: ${f.map((e) => `${e.owner} ${e.count}`).join(", ")}`,
155
+ leave: () => {
156
+ d(null);
157
+ },
158
+ title: "Lights by keeper",
159
+ width: e,
160
+ children: [
161
+ /* @__PURE__ */ C("defs", { children: [/* @__PURE__ */ S(y, {
162
+ id: g.hatch,
163
+ tone: "fill-l4"
164
+ }), /* @__PURE__ */ S(v, {
165
+ id: g.hero,
166
+ tone: "fill-hero"
167
+ })] }),
168
+ /* @__PURE__ */ S(L, { ...h }),
169
+ /* @__PURE__ */ S(z, { ...h }),
170
+ /* @__PURE__ */ S(p, {
171
+ height: s.height,
172
+ text: r(n),
173
+ width: e
174
+ })
175
+ ]
176
+ }),
177
+ _ !== void 0 && /* @__PURE__ */ S(t, {
178
+ x: s.xOwner,
179
+ y: s.yOwner(_) - s.rOf(f.find((e) => e.owner === _)?.count ?? 1) - 4,
180
+ children: /* @__PURE__ */ S(l, {
181
+ facts: [`${f.find((e) => e.owner === _)?.count ?? 0} ${c}`],
182
+ lead: _
183
+ })
184
+ }),
185
+ b !== void 0 && u?.item !== void 0 && /* @__PURE__ */ S(t, {
186
+ x: s.xTick1,
187
+ y: s.yItem(u.item) - 6,
188
+ children: /* @__PURE__ */ S(l, {
189
+ facts: [`kept by ${b.owner}`],
190
+ lead: b.name
191
+ })
192
+ })
193
+ ]
194
+ });
195
+ } });
196
+ };
197
+ //#endregion
198
+ export { B as TypeColonnade };
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ //#region src/charts/lupi/util-a.ts
3
+ var e = (e, t, n, r) => {
4
+ let i = r * Math.PI / 180;
5
+ return [e + n * Math.sin(i), t - n * Math.cos(i)];
6
+ }, t = (t, n, r, i, a, o) => {
7
+ let s = +(o - a > 180), [c, l] = e(t, n, i, a), [u, d] = e(t, n, i, o), [f, p] = e(t, n, r, o), [m, h] = e(t, n, r, a);
8
+ return `M${c},${l}A${i},${i} 0 ${s} 1 ${u},${d}L${f},${p}A${r},${r} 0 ${s} 0 ${m},${h}Z`;
9
+ }, n = (t, n, r, i, a) => {
10
+ let [o, s] = e(t, n, r, i), [c, l] = e(t, n, r, a);
11
+ return `M${o},${s}A${r},${r} 0 ${+(a - i > 180)} 1 ${c},${l}`;
12
+ };
13
+ //#endregion
14
+ export { n as arcPath, e as clock, t as sectorPath };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ //#region src/charts/lupi/util-b.ts
3
+ var e = (e, t, n, r, i = .5) => {
4
+ let a = (r - t) * i;
5
+ return `M${e},${t}C${e},${t + a} ${n},${r - a} ${n},${r}`;
6
+ }, t = (e, t, n) => t.find((t) => e >= t.min)?.out ?? n, n = (e) => {
7
+ let t = 0;
8
+ for (let [n, r] of e.entries()) r > (e[t] ?? -Infinity) && (t = n);
9
+ return t;
10
+ };
11
+ //#endregion
12
+ export { n as argMax, t as byStep, e as vCurve };