@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,198 @@
1
+ "use client";
2
+ import { fmtDay as e, fmtMonth as t, monthTickLabels as n } from "../../lib/format.js";
3
+ import { Plot as r, Tooltip as i } from "../core.js";
4
+ import { noteOf as a, noteSpace as o, sansWidth as s, stagger as c } from "../util.js";
5
+ import { DimGroup as l, HitCircle as u, TipText as d } from "../hover.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 { PixelLine as h } from "../texture.js";
10
+ import { argMax as g } from "./util-b.js";
11
+ import { arrivalWeekDate as _, launchFanDemo as v } from "./launch-fan.data.js";
12
+ import { arcPath as y, clock as b } from "./util-a.js";
13
+ import { useState as x } from "react";
14
+ import { scaleSqrt as S } from "d3-scale";
15
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
16
+ //#region src/charts/lupi/launch-fan.tsx
17
+ var T = (e) => 10 + s(e.name, 10.4), E = (e, t, n, r, i, a) => {
18
+ let o = (e) => n.length === 1 ? 43 : 4 + 78 * e / (n.length - 1), c = Math.max(58, ...n.map((e, t) => 16 + s(e.name, 12) * Math.cos(o(t) * Math.PI / 180))), l = i + 2, u = (e, t) => {
19
+ let r = o(t) * Math.PI / 180;
20
+ return (e + T(n[t])) * Math.sin(r) + 7 * Math.cos(r);
21
+ }, d = Math.min(...n.map((t, n) => {
22
+ let r = o(n) * Math.PI / 180;
23
+ return (e - l - 7 * Math.cos(r)) / Math.sin(r) - T(t);
24
+ })), f = Math.max(150, Math.min((t - c - 6 - a) / .96, d)), p = Math.max(...n.map((e, t) => u(f, t))), m = f * .2, h = S().domain([0, Math.max(...n.map((e) => e.size))]).range([0, Math.min(11, f / 30)]), g = Math.max(1, ...n.flatMap((e) => e.weekly ?? [0]));
25
+ return {
26
+ a0: 4,
27
+ a1: 82,
28
+ angle: o,
29
+ bottom: f * .96 + c,
30
+ cx: l + Math.max(0, (e - l - p) / 2),
31
+ cy: f + c,
32
+ ringR: (e) => m + (f - m) * e / r,
33
+ rungR: (e) => 1.5 + 3.5 * Math.sqrt(e / g),
34
+ sizeR: (e) => h(e)
35
+ };
36
+ }, D = (e) => `${e.toFixed(2)}%`, O = (e) => e === "demo" ? 24 : e === "week" ? 20 : 24, k = (e, t) => e === "week" ? 5 : t <= 18 ? 3 : t <= 48 ? 6 : 12, A = (e, t) => {
37
+ let n = k(e, t);
38
+ return Array.from({ length: Math.floor(t / n) }, (e, t) => (t + 1) * n);
39
+ }, j = (e) => {
40
+ let { a0: t, a1: n, cx: r, cy: i, ringR: a } = e.layout, { rings: o } = e;
41
+ return /* @__PURE__ */ C("g", { children: o.map((o, s) => {
42
+ let l = a(o), [u, d] = b(r, i, l, t - 4);
43
+ return /* @__PURE__ */ w("g", {
44
+ className: "fade",
45
+ style: c(s),
46
+ children: [/* @__PURE__ */ C("path", {
47
+ className: "grid-line shape-smooth",
48
+ d: y(r, i, l, t - 3, n + 2),
49
+ fill: "none"
50
+ }), /* @__PURE__ */ C(m, {
51
+ anchor: "end",
52
+ middle: !0,
53
+ voice: "axis",
54
+ x: u - 2,
55
+ y: d,
56
+ children: e.labels[s]
57
+ })]
58
+ }, `ring-${o}`);
59
+ }) });
60
+ }, M = ({ datum: e, dim: t, hero: n, i: r, layout: i, onTip: a, weeks: o }) => {
61
+ let { angle: s, cx: d, cy: f, ringR: p, rungR: g, sizeR: _ } = i, v = s(r), y = Math.max(0, e.launch), [x, S] = b(d, f, p(y), v), [T, E] = b(d, f, p(o), v), [D, O] = b(d, f, p(o) + 10, v), k = Array.from({ length: Math.max(0, o - y) }, (e, t) => t + 1), A = Math.max(...e.weekly ?? [1]) * .3;
62
+ return /* @__PURE__ */ w(l, {
63
+ dim: t,
64
+ onPointerEnter: () => {
65
+ a({
66
+ i: r,
67
+ x,
68
+ y: S - _(e.size) - 4
69
+ });
70
+ },
71
+ children: [
72
+ /* @__PURE__ */ C("line", {
73
+ stroke: "transparent",
74
+ strokeWidth: 14,
75
+ x1: x,
76
+ x2: T,
77
+ y1: S,
78
+ y2: E
79
+ }),
80
+ /* @__PURE__ */ C("line", {
81
+ className: "draw stroke-rule",
82
+ pathLength: 1,
83
+ strokeWidth: 1,
84
+ style: c(r, "mark"),
85
+ x1: x,
86
+ x2: T,
87
+ y1: S,
88
+ y2: E
89
+ }),
90
+ k.map((t) => {
91
+ let [n, i] = b(d, f, p(y + t), v), o = g(e.weekly?.[t] ?? A), s = Math.cos(v * Math.PI / 180), l = Math.sin(v * Math.PI / 180);
92
+ return /* @__PURE__ */ w("g", {
93
+ className: "fade",
94
+ onPointerEnter: () => {
95
+ a({
96
+ i: r,
97
+ week: t,
98
+ x: n,
99
+ y: i - 6
100
+ });
101
+ },
102
+ style: c(r * 3 + t, "dense"),
103
+ children: [/* @__PURE__ */ C(u, {
104
+ cx: n,
105
+ cy: i,
106
+ r: 5
107
+ }), /* @__PURE__ */ C(h, {
108
+ tone: "fill-l3",
109
+ x0: n - s * o,
110
+ x1: n + s * o,
111
+ y0: i - l * o,
112
+ y1: i + l * o
113
+ })]
114
+ }, `${e.name}-w${t}`);
115
+ }),
116
+ /* @__PURE__ */ C("circle", {
117
+ className: `pop ${n ? "fill-hero stroke-hero" : "fill-paper stroke-l3"}`,
118
+ cx: x,
119
+ cy: S,
120
+ r: _(e.size),
121
+ strokeWidth: 1.5,
122
+ style: c(r, "mark")
123
+ }),
124
+ /* @__PURE__ */ C(m, {
125
+ middle: !0,
126
+ muted: !n,
127
+ order: r,
128
+ tier: "mark",
129
+ transform: `translate(${D},${O}) rotate(${v - 90})`,
130
+ voice: "label",
131
+ children: e.name
132
+ })
133
+ ]
134
+ });
135
+ }, N = {
136
+ month: "month",
137
+ week: "week"
138
+ }, P = {
139
+ month: "M",
140
+ week: "W"
141
+ }, F = (e) => {
142
+ let t = e.data === void 0, n = e.unit ?? (t ? "week" : "month");
143
+ return {
144
+ periodDate: e.periodDate ?? (t ? _ : void 0),
145
+ unit: n,
146
+ weeks: e.periods ?? e.weeks ?? O(t ? "demo" : n)
147
+ };
148
+ }, I = (c) => {
149
+ let l = (c.data ?? v).toSorted((e, t) => e.launch - t.launch), { periodDate: u, unit: m, weeks: h } = F(c), _ = c.height ?? 460, y = c.format ?? D, b = N[m], S = m === "week" ? e : t, T = (e) => u === void 0 ? `${P[m]}${e}` : S(u(e)), O = A(m, h), k = u === void 0 ? O.map(T) : n(O.map(u)), I = Math.max(0, ...k.map((e) => s(e, 11))), [L, R] = x(null), z = c.highlight ?? l.at(g(l.map((e) => e.size)))?.name;
150
+ return /* @__PURE__ */ C(r, {
151
+ overlay: L === null ? null : /* @__PURE__ */ C(i, {
152
+ x: L.x,
153
+ y: L.y,
154
+ children: /* @__PURE__ */ C(d, {
155
+ facts: [`arrived ${T(l[L.i].launch)}`, ((e) => {
156
+ let t = l[e.i];
157
+ return e.week === void 0 ? `peak ${y(t.size)}` : `${T(t.launch + e.week)} · ${y(t.weekly?.[e.week] ?? 0)}`;
158
+ })(L)],
159
+ lead: l[L.i].name
160
+ })
161
+ }),
162
+ children: (e) => {
163
+ let t = o(a(c), e - 16, 30), n = E(e, _, l, h, I, t), r = Math.min(_, Math.round(n.bottom + 6 + t));
164
+ return /* @__PURE__ */ w(p, {
165
+ height: r,
166
+ label: `Arrival fan: ${l.map((e) => `${e.name} arrived ${T(e.launch)}, peak ${y(e.size)}`).join("; ")}`,
167
+ leave: () => {
168
+ R(null);
169
+ },
170
+ title: `Arrival ${b} and peak reporting of each migrant, one spoke each`,
171
+ width: e,
172
+ children: [
173
+ /* @__PURE__ */ C(j, {
174
+ labels: k,
175
+ layout: n,
176
+ rings: O
177
+ }),
178
+ l.map((e, t) => /* @__PURE__ */ C(M, {
179
+ datum: e,
180
+ dim: L !== null && L.i !== t,
181
+ hero: z === e.name,
182
+ i: t,
183
+ layout: n,
184
+ onTip: R,
185
+ weeks: h
186
+ }, e.name)),
187
+ /* @__PURE__ */ C(f, {
188
+ height: r,
189
+ text: a(c),
190
+ width: e
191
+ })
192
+ ]
193
+ });
194
+ }
195
+ });
196
+ };
197
+ //#endregion
198
+ export { I as LaunchFan };
@@ -0,0 +1,97 @@
1
+ "use client";
2
+ var e = {
3
+ rows: [
4
+ "E",
5
+ "T",
6
+ "A",
7
+ "O",
8
+ "I",
9
+ "N",
10
+ "S",
11
+ "R"
12
+ ],
13
+ values: [
14
+ [
15
+ 4,
16
+ 6,
17
+ 7,
18
+ 2,
19
+ 2,
20
+ 10,
21
+ 13,
22
+ 16
23
+ ],
24
+ [
25
+ 14,
26
+ 3,
27
+ 8,
28
+ 12,
29
+ 14,
30
+ 0,
31
+ 5,
32
+ 5
33
+ ],
34
+ [
35
+ 0,
36
+ 14,
37
+ 0,
38
+ 0,
39
+ 3,
40
+ 18,
41
+ 8,
42
+ 12
43
+ ],
44
+ [
45
+ 1,
46
+ 6,
47
+ 2,
48
+ 3,
49
+ 1,
50
+ 18,
51
+ 4,
52
+ 16
53
+ ],
54
+ [
55
+ 5,
56
+ 11,
57
+ 4,
58
+ 9,
59
+ 0,
60
+ 25,
61
+ 10,
62
+ 3
63
+ ],
64
+ [
65
+ 11,
66
+ 16,
67
+ 7,
68
+ 7,
69
+ 6,
70
+ 2,
71
+ 7,
72
+ 1
73
+ ],
74
+ [
75
+ 14,
76
+ 19,
77
+ 8,
78
+ 8,
79
+ 10,
80
+ 1,
81
+ 8,
82
+ 1
83
+ ],
84
+ [
85
+ 24,
86
+ 7,
87
+ 10,
88
+ 10,
89
+ 11,
90
+ 3,
91
+ 7,
92
+ 2
93
+ ]
94
+ ]
95
+ };
96
+ //#endregion
97
+ export { e as matrixHeatDemo };
@@ -0,0 +1,246 @@
1
+ "use client";
2
+ import { Plot as e, Tooltip as t } from "../core.js";
3
+ import { sansWidth as n, stagger as r, sum as i } from "../util.js";
4
+ import { TipText as a } from "../hover.js";
5
+ import { KEY as o } from "../marks.js";
6
+ import { ChartSvg as s } from "../svg.js";
7
+ import { Label as c } from "../text.js";
8
+ import { HALFTONE_R as l, TEXTURE_PITCH as u, paint as d, useTextureIds as f } from "../texture-ids.js";
9
+ import { CrossHatch as p, DotScreen as m, Hatch as h, KeySwatch as g, PlateLabel as _ } from "../texture.js";
10
+ import { byStep as v } from "./util-b.js";
11
+ import { matrixHeatDemo as y } from "./matrix-heat.data.js";
12
+ import { useState as b } from "react";
13
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
+ //#region src/charts/lupi/matrix-heat.tsx
15
+ var C = 2, w = (e) => {
16
+ for (let [t, n] of e.entries()) {
17
+ if (n.length !== e.length) return !1;
18
+ for (let [r, i] of n.entries()) if (e[r]?.[t] !== i) return !1;
19
+ }
20
+ return !0;
21
+ }, T = ([e, t]) => e < t ? [t, e] : [e, t], E = (e) => {
22
+ let t = [0, 0], n = -Infinity;
23
+ for (let [r, i] of e.entries()) for (let [e, a] of i.entries()) a !== null && a > n && (n = a, t = [r, e]);
24
+ return t;
25
+ }, D = ({ rows: e, cols: t, g: n, hover: r, triangle: i }) => /* @__PURE__ */ S("g", { children: [t.map((e, a) => {
26
+ if (i && a === t.length - 1) return null;
27
+ let o = n.x0 + n.cell * a + n.size / 2 + 3, s = n.top + (i ? n.cell * a : 0) - 12;
28
+ return /* @__PURE__ */ x(c, {
29
+ className: r?.[1] === a ? "fill-ink" : "fill-muted",
30
+ order: a,
31
+ tier: "mark",
32
+ voice: "label",
33
+ x: o,
34
+ y: s,
35
+ transform: `rotate(-55 ${o} ${s})`,
36
+ children: e
37
+ }, `col-${e}`);
38
+ }), e.map((e, t) => i && t === 0 ? null : /* @__PURE__ */ x(c, {
39
+ anchor: "end",
40
+ className: r?.[0] === t ? "fill-ink" : "fill-muted",
41
+ middle: !0,
42
+ order: t,
43
+ tier: "mark",
44
+ voice: "label",
45
+ x: n.x0 - 14,
46
+ y: n.top + n.cell * (i ? t - 1 : t) + n.size / 2,
47
+ children: e
48
+ }, `row-${e}`))] }), O = ({ className: e, fill: t, size: n, x: r, y: i }) => /* @__PURE__ */ x("g", {
49
+ transform: `translate(${Math.round(r)} ${Math.round(i)})`,
50
+ children: /* @__PURE__ */ x("rect", {
51
+ className: `shape-crisp ${e ?? "stroke-l5"}`,
52
+ fill: t,
53
+ height: n - 1,
54
+ rx: C,
55
+ strokeWidth: 1,
56
+ width: n - 1,
57
+ x: .5,
58
+ y: .5
59
+ })
60
+ }), k = ({ labels: e, screens: t, x: a, y: s, span: l, wide: u }) => {
61
+ let f = e.map((e) => o.swatch + o.gap + n(e, 11) + o.entryGap), p = u ? t.length : 3, m = Math.min(l / p, Math.max(...f)), h = f.map((e, t) => u ? i(f.slice(0, t)) : t % p * m);
62
+ return /* @__PURE__ */ x("g", {
63
+ className: "fade",
64
+ style: r(10),
65
+ children: t.map((t, n) => /* @__PURE__ */ S("g", { children: [/* @__PURE__ */ x(g, {
66
+ fill: d(t),
67
+ x: a + (h[n] ?? 0),
68
+ y: s - 6 + Math.floor(n / p) * 20
69
+ }), /* @__PURE__ */ x(c, {
70
+ middle: !0,
71
+ voice: "axis",
72
+ x: a + (h[n] ?? 0) + o.swatch + o.gap,
73
+ y: s + Math.floor(n / p) * 20,
74
+ children: e[n]
75
+ })] }, t))
76
+ });
77
+ }, A = ({ at: e, bin: t, fills: n, format: i, g: a, hero: o, i: s, j: c, lit: l, onHover: u, v: f }) => {
78
+ let p = Math.round(a.x0 + a.cell * c), m = Math.round(a.top + a.cell * e);
79
+ return f === null ? /* @__PURE__ */ x("g", {
80
+ className: "fade",
81
+ children: /* @__PURE__ */ x(O, {
82
+ fill: d(n.empty),
83
+ size: a.size,
84
+ x: p,
85
+ y: m
86
+ })
87
+ }) : /* @__PURE__ */ S("g", {
88
+ className: `transition-opacity ${l ? "" : "opacity-30"}`,
89
+ onPointerEnter: () => {
90
+ u([s, c]);
91
+ },
92
+ children: [/* @__PURE__ */ x("g", {
93
+ className: "pop",
94
+ style: r(s + c, "mark"),
95
+ children: /* @__PURE__ */ x(O, {
96
+ className: o ? "stroke-hero" : "stroke-l5",
97
+ fill: d(o ? n.hero : n.screens[t(f)] ?? n.empty),
98
+ size: a.size,
99
+ x: p,
100
+ y: m
101
+ })
102
+ }), a.size >= 24 || o ? /* @__PURE__ */ x("g", {
103
+ className: "fade",
104
+ style: r(o ? 8 : s + c, "mark"),
105
+ children: /* @__PURE__ */ x(_, {
106
+ hero: o,
107
+ text: i(f),
108
+ x: p + a.size / 2,
109
+ y: m + a.size / 2
110
+ })
111
+ }) : null]
112
+ });
113
+ }, j = ({ fills: e, data: t, rows: n, cols: r, g: i, hover: a, keyCell: o, bin: s, format: c, onHover: l, triangle: u }) => /* @__PURE__ */ x("g", { children: t.values.map((t, d) => t.map((t, f) => u && f >= d ? null : /* @__PURE__ */ x(A, {
114
+ at: u ? d - 1 : d,
115
+ bin: s,
116
+ fills: e,
117
+ format: c,
118
+ g: i,
119
+ hero: o[0] === d && o[1] === f,
120
+ i: d,
121
+ j: f,
122
+ lit: a === null || a[0] === d || a[1] === f,
123
+ onHover: l,
124
+ v: t
125
+ }, `${n[d] ?? "row"}-${r[f] ?? "col"}`))) }), M = ({ fills: e }) => /* @__PURE__ */ S("defs", { children: [
126
+ /* @__PURE__ */ x(h, {
127
+ id: e.empty,
128
+ tone: "fill-l5"
129
+ }),
130
+ /* @__PURE__ */ x(p, {
131
+ id: e.hero,
132
+ tone: "fill-hero"
133
+ }),
134
+ l.map((t, n) => /* @__PURE__ */ x(m, {
135
+ id: e.screens[n] ?? "",
136
+ pitch: u.screen,
137
+ r: t,
138
+ tone: "fill-l3"
139
+ }, t))
140
+ ] }), N = (e, t, [n, r]) => `${e[n] ?? ""} then ${t[r] ?? ""}`, P = 55, F = (e, t, r, i, a) => {
141
+ let o = i ? t.slice(1) : t, s = i ? r.slice(0, -1) : r, c = Math.max(0, ...o.map((e) => n(e, 11))) + 14, l = P * Math.PI / 180, u = (e) => {
142
+ let t = Math.round(e - e * .16);
143
+ return Math.max(e * (s.length - 1) + t, a ?? 0, ...s.map((r, i) => e * i + t / 2 + 3 + n(r, 11) * Math.cos(l) + 3 * Math.sin(l)));
144
+ }, d = 56;
145
+ for (; d > 18 && c + u(d) > e;) d -= .25;
146
+ let f = u(d);
147
+ return {
148
+ g: {
149
+ cell: d,
150
+ size: Math.round(d - d * .16),
151
+ top: a === null ? 58 : 76,
152
+ x0: c + Math.max(0, (e - c - f) / 2)
153
+ },
154
+ left: c,
155
+ right: f
156
+ };
157
+ }, I = (r) => {
158
+ let o = r.data ?? y, { rows: c } = o, u = o.cols ?? o.rows, d = r.thresholds ?? [
159
+ 10,
160
+ 20,
161
+ 30,
162
+ 45
163
+ ], p = r.unit ?? "%", m = r.format ?? String, [h, g] = b(null), _ = f("matrix"), C = {
164
+ empty: _("empty"),
165
+ hero: _("hero"),
166
+ screens: l.map((e, t) => _(`screen-${t}`))
167
+ }, O = (e) => v(e, [
168
+ {
169
+ min: d[3],
170
+ out: 4
171
+ },
172
+ {
173
+ min: d[2],
174
+ out: 3
175
+ },
176
+ {
177
+ min: d[1],
178
+ out: 2
179
+ },
180
+ {
181
+ min: d[0],
182
+ out: 1
183
+ }
184
+ ], 0), A = w(o.values), P = (e) => A ? e - 1 : e, I = r.highlight ?? E(o.values), L = A ? T(I) : I, R = [
185
+ `<${d[0]}${p}`,
186
+ `${d[0]}–${d[1] - 1}${p}`,
187
+ `${d[1]}–${d[2] - 1}${p}`,
188
+ `${d[2]}–${d[3] - 1}${p}`,
189
+ `${d[3]}${p}+`
190
+ ];
191
+ return /* @__PURE__ */ x(e, { children: (e) => {
192
+ let l = e < 460, d = l ? null : i(R.map((e) => 18 + n(e, 11) + 20)) - 20, { g: f, left: _, right: v } = F(e, c, u, A, d), { cell: y, size: b, x0: w } = f, T = f.top + y * (P(c.length - 1) + 1) + 34, E = r.height ?? T + (l ? 32 : 14), I = h === null ? null : o.values[h[0]]?.[h[1]] ?? null, z = o.values[L[0]]?.[L[1]] ?? 0;
193
+ return /* @__PURE__ */ S("div", {
194
+ className: "relative",
195
+ children: [/* @__PURE__ */ S(s, {
196
+ height: E,
197
+ label: `${c.length} by ${u.length} matrix; strongest ${c[L[0]] ?? ""} then ${u[L[1]] ?? ""} at ${m(z)}${p}`,
198
+ leave: () => {
199
+ g(null);
200
+ },
201
+ title: "Letter pairs",
202
+ width: e,
203
+ children: [
204
+ /* @__PURE__ */ x(D, {
205
+ rows: c,
206
+ cols: u,
207
+ g: f,
208
+ hover: h,
209
+ triangle: A
210
+ }),
211
+ /* @__PURE__ */ x(M, { fills: C }),
212
+ /* @__PURE__ */ x(j, {
213
+ fills: C,
214
+ data: o,
215
+ rows: c,
216
+ cols: u,
217
+ g: f,
218
+ hover: h,
219
+ keyCell: L,
220
+ triangle: A,
221
+ bin: O,
222
+ format: m,
223
+ onHover: g
224
+ }),
225
+ /* @__PURE__ */ x(k, {
226
+ labels: R,
227
+ screens: C.screens,
228
+ x: l ? w - _ : w,
229
+ y: T,
230
+ span: l ? _ + v : y * u.length,
231
+ wide: !l
232
+ })
233
+ ]
234
+ }), h !== null && I !== null && /* @__PURE__ */ x(t, {
235
+ x: w + y * h[1] + b / 2,
236
+ y: f.top + y * P(h[0]) - 4,
237
+ children: /* @__PURE__ */ x(a, {
238
+ facts: [`${m(I)}${p}`],
239
+ lead: N(c, u, h)
240
+ })
241
+ })]
242
+ });
243
+ } });
244
+ };
245
+ //#endregion
246
+ export { I as MatrixHeat };
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ //#region src/charts/lupi/parallel-coordinates.data.ts
3
+ var e = (e, t, n, r, i) => ({
4
+ name: e,
5
+ values: {
6
+ calcium: r,
7
+ fat: t,
8
+ protein: n,
9
+ sodium: i
10
+ }
11
+ }), t = {
12
+ axes: [
13
+ {
14
+ domain: [0, 50],
15
+ key: "fat",
16
+ label: "Fat",
17
+ unit: "g"
18
+ },
19
+ {
20
+ domain: [0, 40],
21
+ key: "protein",
22
+ label: "Protein",
23
+ unit: "g"
24
+ },
25
+ {
26
+ domain: [0, 1200],
27
+ key: "calcium",
28
+ label: "Calcium",
29
+ unit: "mg"
30
+ },
31
+ {
32
+ domain: [0, 2e3],
33
+ key: "sodium",
34
+ label: "Sodium",
35
+ unit: "mg"
36
+ }
37
+ ],
38
+ rows: [
39
+ e("Cheddar", 34.9, 25.4, 739, 723),
40
+ e("Stilton", 35, 23.7, 326, 788),
41
+ e("Brie", 29.1, 20.3, 256, 556),
42
+ e("Camembert", 22.7, 21.5, 235, 605),
43
+ e("Edam", 26, 26.7, 795, 996),
44
+ e("Emmental", 30.9, 30.2, 1025, 187),
45
+ e("Parmesan", 29.7, 36.2, 1025, 660),
46
+ e("Feta", 20.2, 15.6, 360, 1e3),
47
+ e("Mozzarella", 20.3, 18.6, 362, 395),
48
+ e("Roquefort", 32.9, 19.7, 530, 1670),
49
+ e("Mascarpone", 44.5, 4.6, 161, 70),
50
+ e("Cottage", 6, 9.4, 127, 250)
51
+ ]
52
+ };
53
+ //#endregion
54
+ export { t as parallelDemo };