@howells/hairline 0.0.0-stage → 0.2.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 (456) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +148 -2
  4. package/lib/charts/axes.js +5 -0
  5. package/lib/charts/basics/candlestick.data.js +44 -0
  6. package/lib/charts/basics/candlestick.js +180 -0
  7. package/lib/charts/basics/daily-empty.js +24 -0
  8. package/lib/charts/basics/daily-readings.js +16 -0
  9. package/lib/charts/basics/dot-heat.data.js +225 -0
  10. package/lib/charts/basics/dot-heat.js +174 -0
  11. package/lib/charts/basics/dumbbell-queue.js +203 -0
  12. package/lib/charts/basics/hairline-area.js +208 -0
  13. package/lib/charts/basics/hairline-line.js +195 -0
  14. package/lib/charts/basics/nested-treemap.data.js +55 -0
  15. package/lib/charts/basics/nested-treemap.js +191 -0
  16. package/lib/charts/basics/paired-rungs.data.js +31 -0
  17. package/lib/charts/basics/paired-rungs.js +151 -0
  18. package/lib/charts/basics/plumb-scatter.js +229 -0
  19. package/lib/charts/basics/rung-bars.js +178 -0
  20. package/lib/charts/basics/rung-geometry.js +6 -0
  21. package/lib/charts/basics/rung-histogram.data.js +73 -0
  22. package/lib/charts/basics/rung-histogram.js +153 -0
  23. package/lib/charts/basics/rung-waterfall.data.js +30 -0
  24. package/lib/charts/basics/rung-waterfall.js +150 -0
  25. package/lib/charts/basics/rungs.js +22 -0
  26. package/lib/charts/basics/series-key.js +26 -0
  27. package/lib/charts/basics/stacked-rungs.data.js +42 -0
  28. package/lib/charts/basics/stacked-rungs.js +174 -0
  29. package/lib/charts/basics/stream-ribbon.data.js +124 -0
  30. package/lib/charts/basics/stream-ribbon.js +336 -0
  31. package/lib/charts/basics/tick-box.data.js +50 -0
  32. package/lib/charts/basics/tick-box.js +226 -0
  33. package/lib/charts/basics/tick-donut.data.js +30 -0
  34. package/lib/charts/basics/tick-donut.js +210 -0
  35. package/lib/charts/basics/tick-gauge.data.js +8 -0
  36. package/lib/charts/basics/tick-gauge.js +169 -0
  37. package/lib/charts/basics/tick-rows.data.js +30 -0
  38. package/lib/charts/basics/tick-rows.js +121 -0
  39. package/lib/charts/basics/util-a.js +15 -0
  40. package/lib/charts/basics/util-b.js +13 -0
  41. package/lib/charts/big/circular-graph.data.js +827 -0
  42. package/lib/charts/big/circular-graph.js +289 -0
  43. package/lib/charts/big/force-galaxy-model.js +167 -0
  44. package/lib/charts/big/force-galaxy.data.js +813 -0
  45. package/lib/charts/big/force-galaxy.js +276 -0
  46. package/lib/charts/big/thread-triptych.data.js +204 -0
  47. package/lib/charts/big/thread-triptych.js +334 -0
  48. package/lib/charts/board/room.js +6 -0
  49. package/lib/charts/board/slope.js +176 -0
  50. package/lib/charts/board/spread.js +28 -0
  51. package/lib/charts/control.js +18 -0
  52. package/lib/charts/core.js +84 -0
  53. package/lib/charts/data-table.js +34 -0
  54. package/lib/charts/fills.js +153 -0
  55. package/lib/charts/forms/area-difference.data.js +62 -0
  56. package/lib/charts/forms/area-difference.js +192 -0
  57. package/lib/charts/forms/brush-math.js +42 -0
  58. package/lib/charts/forms/brush-strip.js +199 -0
  59. package/lib/charts/forms/brushed-overview.data.js +374 -0
  60. package/lib/charts/forms/brushed-overview.js +162 -0
  61. package/lib/charts/forms/chord-ring.data.js +140 -0
  62. package/lib/charts/forms/chord-ring.js +167 -0
  63. package/lib/charts/forms/circle-pack.data.js +80 -0
  64. package/lib/charts/forms/circle-pack.js +99 -0
  65. package/lib/charts/forms/hatched-stack.data.js +71 -0
  66. package/lib/charts/forms/hatched-stack.js +228 -0
  67. package/lib/charts/forms/radial-year.data.js +13 -0
  68. package/lib/charts/forms/radial-year.js +156 -0
  69. package/lib/charts/frame.js +73 -0
  70. package/lib/charts/glance/aggregate-sankey.data.js +74 -0
  71. package/lib/charts/glance/aggregate-sankey.js +242 -0
  72. package/lib/charts/glance/bar-race.data.js +122 -0
  73. package/lib/charts/glance/bar-race.js +246 -0
  74. package/lib/charts/glance/big-slice.data.js +41 -0
  75. package/lib/charts/glance/big-slice.js +238 -0
  76. package/lib/charts/glance/chunky-bars.data.js +22 -0
  77. package/lib/charts/glance/chunky-bars.js +113 -0
  78. package/lib/charts/glance/circular-graph.data.js +146 -0
  79. package/lib/charts/glance/circular-graph.js +138 -0
  80. package/lib/charts/glance/control-slot.js +9 -0
  81. package/lib/charts/glance/diverging-bar.data.js +34 -0
  82. package/lib/charts/glance/diverging-bar.js +154 -0
  83. package/lib/charts/glance/dot-waffle.data.js +26 -0
  84. package/lib/charts/glance/dot-waffle.js +179 -0
  85. package/lib/charts/glance/draw-in.data.js +9 -0
  86. package/lib/charts/glance/draw-in.goals.json.js +289 -0
  87. package/lib/charts/glance/draw-in.js +214 -0
  88. package/lib/charts/glance/dynamic-stream.data.js +6 -0
  89. package/lib/charts/glance/dynamic-stream.js +189 -0
  90. package/lib/charts/glance/force-graph.data.js +77 -0
  91. package/lib/charts/glance/force-graph.js +211 -0
  92. package/lib/charts/glance/jitter-strip.data.js +10 -0
  93. package/lib/charts/glance/jitter-strip.easter.json.js +430 -0
  94. package/lib/charts/glance/jitter-strip.js +157 -0
  95. package/lib/charts/glance/link-bundle.js +51 -0
  96. package/lib/charts/glance/matrix-heat-glance.data.js +108 -0
  97. package/lib/charts/glance/matrix-heat-glance.js +170 -0
  98. package/lib/charts/glance/pictorial-bar.data.js +22 -0
  99. package/lib/charts/glance/pictorial-bar.js +180 -0
  100. package/lib/charts/glance/rainfall-dual-area.data.js +177 -0
  101. package/lib/charts/glance/rainfall-dual-area.js +192 -0
  102. package/lib/charts/glance/rank-strip.data.js +76 -0
  103. package/lib/charts/glance/rank-strip.js +172 -0
  104. package/lib/charts/glance/scatter-labels.js +60 -0
  105. package/lib/charts/glance/scatter-morph.data.js +78 -0
  106. package/lib/charts/glance/scatter-morph.js +338 -0
  107. package/lib/charts/glance/single-axis.data.js +6 -0
  108. package/lib/charts/glance/single-axis.js +150 -0
  109. package/lib/charts/glance/single-axis.tides.json.js +180 -0
  110. package/lib/charts/glance/stagger-wave.data.js +66 -0
  111. package/lib/charts/glance/stagger-wave.js +132 -0
  112. package/lib/charts/glance/tree-lr.data.js +41 -0
  113. package/lib/charts/glance/tree-lr.js +135 -0
  114. package/lib/charts/glance/util-a.js +49 -0
  115. package/lib/charts/glance/util-b.js +19 -0
  116. package/lib/charts/glance/violin.data.js +9 -0
  117. package/lib/charts/glance/violin.js +185 -0
  118. package/lib/charts/glance/violin.tenors.json.js +5 -0
  119. package/lib/charts/hooks.js +154 -0
  120. package/lib/charts/hover.js +19 -0
  121. package/lib/charts/lupi/arc-matrix.data.js +83 -0
  122. package/lib/charts/lupi/arc-matrix.js +146 -0
  123. package/lib/charts/lupi/ballot-tally.data.js +22 -0
  124. package/lib/charts/lupi/ballot-tally.js +125 -0
  125. package/lib/charts/lupi/barcode-lollipop.data.js +195 -0
  126. package/lib/charts/lupi/barcode-lollipop.js +161 -0
  127. package/lib/charts/lupi/brand-spectrum.data.js +70 -0
  128. package/lib/charts/lupi/brand-spectrum.js +233 -0
  129. package/lib/charts/lupi/bubble-almanac.data.js +689 -0
  130. package/lib/charts/lupi/bubble-almanac.js +164 -0
  131. package/lib/charts/lupi/calendar-heat.data.js +399 -0
  132. package/lib/charts/lupi/calendar-heat.js +175 -0
  133. package/lib/charts/lupi/cluster-field.data.js +83 -0
  134. package/lib/charts/lupi/cluster-field.js +173 -0
  135. package/lib/charts/lupi/dot-cascade.data.js +54 -0
  136. package/lib/charts/lupi/dot-cascade.js +124 -0
  137. package/lib/charts/lupi/dotty-matrix.data.js +170 -0
  138. package/lib/charts/lupi/dotty-matrix.js +126 -0
  139. package/lib/charts/lupi/hourglass-stream.data.js +30 -0
  140. package/lib/charts/lupi/hourglass-stream.js +158 -0
  141. package/lib/charts/lupi/hundred-field.data.js +38 -0
  142. package/lib/charts/lupi/hundred-field.js +237 -0
  143. package/lib/charts/lupi/launch-fan.data.js +315 -0
  144. package/lib/charts/lupi/launch-fan.js +198 -0
  145. package/lib/charts/lupi/matrix-heat.data.js +97 -0
  146. package/lib/charts/lupi/matrix-heat.js +246 -0
  147. package/lib/charts/lupi/parallel-coordinates.data.js +54 -0
  148. package/lib/charts/lupi/parallel-coordinates.js +218 -0
  149. package/lib/charts/lupi/radial-convergence.data.js +178 -0
  150. package/lib/charts/lupi/radial-convergence.js +208 -0
  151. package/lib/charts/lupi/radial-patchwork.data.js +454 -0
  152. package/lib/charts/lupi/radial-patchwork.js +181 -0
  153. package/lib/charts/lupi/ridgeline.data.js +1834 -0
  154. package/lib/charts/lupi/ridgeline.js +195 -0
  155. package/lib/charts/lupi/trend-lineage.data.js +51 -0
  156. package/lib/charts/lupi/trend-lineage.js +198 -0
  157. package/lib/charts/lupi/type-colonnade.data.js +18 -0
  158. package/lib/charts/lupi/type-colonnade.js +198 -0
  159. package/lib/charts/lupi/util-a.js +14 -0
  160. package/lib/charts/lupi/util-b.js +12 -0
  161. package/lib/charts/maps/choropleth.js +295 -0
  162. package/lib/charts/maps/geo.js +84 -0
  163. package/lib/charts/maps/legend.js +83 -0
  164. package/lib/charts/maps/step-fill.js +9 -0
  165. package/lib/charts/maps/us-choropleth.data.js +249 -0
  166. package/lib/charts/maps/us-choropleth.js +41 -0
  167. package/lib/charts/maps/world-choropleth.data.js +681 -0
  168. package/lib/charts/maps/world-choropleth.js +46 -0
  169. package/lib/charts/markers.js +35 -0
  170. package/lib/charts/marks.js +31 -0
  171. package/lib/charts/motion.js +11 -0
  172. package/lib/charts/originals/daily-users.data.js +101 -0
  173. package/lib/charts/originals/daily-users.js +203 -0
  174. package/lib/charts/originals/feature-rank.data.js +92 -0
  175. package/lib/charts/originals/feature-rank.js +167 -0
  176. package/lib/charts/originals/format.js +5 -0
  177. package/lib/charts/originals/key.js +26 -0
  178. package/lib/charts/originals/response-time.data.js +98 -0
  179. package/lib/charts/originals/response-time.js +187 -0
  180. package/lib/charts/originals/revenue-by-plan.data.js +26 -0
  181. package/lib/charts/originals/revenue-by-plan.js +248 -0
  182. package/lib/charts/playback.js +68 -0
  183. package/lib/charts/plot-note.js +27 -0
  184. package/lib/charts/roles.js +5 -0
  185. package/lib/charts/rules.js +66 -0
  186. package/lib/charts/scale-context.js +6 -0
  187. package/lib/charts/shapes.js +8 -0
  188. package/lib/charts/shared-options.js +25 -0
  189. package/lib/charts/svg.js +43 -0
  190. package/lib/charts/text.js +30 -0
  191. package/lib/charts/texture-ids.js +20 -0
  192. package/lib/charts/texture.js +286 -0
  193. package/lib/charts/util.js +43 -0
  194. package/lib/charts/value-grid.js +26 -0
  195. package/lib/draw.js +27 -0
  196. package/lib/entries/dumbbell-queue.js +2 -0
  197. package/lib/entries/hairline-area.js +2 -0
  198. package/lib/entries/hairline-line.js +2 -0
  199. package/lib/entries/plumb-scatter.js +2 -0
  200. package/lib/entries/rung-bars.js +2 -0
  201. package/lib/entries/slope.js +2 -0
  202. package/lib/frame.js +2 -0
  203. package/lib/hairline.css +1385 -0
  204. package/lib/index.js +72 -0
  205. package/lib/json-schema/dumbbell-queue.json +258 -0
  206. package/lib/json-schema/hairline-area.json +262 -0
  207. package/lib/json-schema/hairline-line.json +256 -0
  208. package/lib/json-schema/index.json +50 -0
  209. package/lib/json-schema/plumb-scatter.json +363 -0
  210. package/lib/json-schema/rung-bars.json +230 -0
  211. package/lib/json-schema/slope.json +333 -0
  212. package/lib/kit.js +16 -0
  213. package/lib/lib/format.js +29 -0
  214. package/lib/lib/random.js +8 -0
  215. package/lib/maps.js +4 -0
  216. package/lib/schema/daily.js +9 -0
  217. package/lib/schema/dumbbell-queue.js +28 -0
  218. package/lib/schema/format.js +72 -0
  219. package/lib/schema/hairline-area.js +24 -0
  220. package/lib/schema/hairline-line.js +23 -0
  221. package/lib/schema/key.js +4 -0
  222. package/lib/schema/metrics.js +26 -0
  223. package/lib/schema/motion.js +12 -0
  224. package/lib/schema/options.js +21 -0
  225. package/lib/schema/plumb-scatter.js +48 -0
  226. package/lib/schema/registry.js +132 -0
  227. package/lib/schema/rung-bars.js +25 -0
  228. package/lib/schema/scale.js +9 -0
  229. package/lib/schema/slope.js +28 -0
  230. package/lib/schema/validate.js +25 -0
  231. package/lib/schema.js +16 -0
  232. package/lib/theme/derive.js +98 -0
  233. package/lib/theme.css +443 -0
  234. package/lib/theme.js +1 -0
  235. package/lib/tokens.css +306 -0
  236. package/lib/types/charts/axes.d.ts +14 -0
  237. package/lib/types/charts/basics/candlestick.d.ts +22 -0
  238. package/lib/types/charts/basics/candlestick.data.d.ts +10 -0
  239. package/lib/types/charts/basics/daily-empty.d.ts +7 -0
  240. package/lib/types/charts/basics/daily-readings.d.ts +38 -0
  241. package/lib/types/charts/basics/dot-heat.d.ts +19 -0
  242. package/lib/types/charts/basics/dot-heat.data.d.ts +28 -0
  243. package/lib/types/charts/basics/dumbbell-queue.d.ts +15 -0
  244. package/lib/types/charts/basics/hairline-area.d.ts +18 -0
  245. package/lib/types/charts/basics/hairline-line.d.ts +18 -0
  246. package/lib/types/charts/basics/nested-treemap.d.ts +18 -0
  247. package/lib/types/charts/basics/nested-treemap.data.d.ts +30 -0
  248. package/lib/types/charts/basics/paired-rungs.d.ts +21 -0
  249. package/lib/types/charts/basics/paired-rungs.data.d.ts +43 -0
  250. package/lib/types/charts/basics/plumb-scatter.d.ts +14 -0
  251. package/lib/types/charts/basics/rung-bars.d.ts +16 -0
  252. package/lib/types/charts/basics/rung-geometry.d.ts +6 -0
  253. package/lib/types/charts/basics/rung-histogram.d.ts +22 -0
  254. package/lib/types/charts/basics/rung-histogram.data.d.ts +34 -0
  255. package/lib/types/charts/basics/rung-waterfall.d.ts +19 -0
  256. package/lib/types/charts/basics/rung-waterfall.data.d.ts +31 -0
  257. package/lib/types/charts/basics/rungs.d.ts +28 -0
  258. package/lib/types/charts/basics/series-key.d.ts +19 -0
  259. package/lib/types/charts/basics/stacked-rungs.d.ts +20 -0
  260. package/lib/types/charts/basics/stacked-rungs.data.d.ts +26 -0
  261. package/lib/types/charts/basics/stream-ribbon.d.ts +19 -0
  262. package/lib/types/charts/basics/stream-ribbon.data.d.ts +29 -0
  263. package/lib/types/charts/basics/tick-box.d.ts +19 -0
  264. package/lib/types/charts/basics/tick-box.data.d.ts +30 -0
  265. package/lib/types/charts/basics/tick-donut.d.ts +24 -0
  266. package/lib/types/charts/basics/tick-donut.data.d.ts +25 -0
  267. package/lib/types/charts/basics/tick-gauge.d.ts +22 -0
  268. package/lib/types/charts/basics/tick-gauge.data.d.ts +24 -0
  269. package/lib/types/charts/basics/tick-rows.d.ts +18 -0
  270. package/lib/types/charts/basics/tick-rows.data.d.ts +23 -0
  271. package/lib/types/charts/basics/util-a.d.ts +10 -0
  272. package/lib/types/charts/basics/util-b.d.ts +13 -0
  273. package/lib/types/charts/big/circular-graph.d.ts +20 -0
  274. package/lib/types/charts/big/circular-graph.data.d.ts +46 -0
  275. package/lib/types/charts/big/force-galaxy-model.d.ts +109 -0
  276. package/lib/types/charts/big/force-galaxy.d.ts +18 -0
  277. package/lib/types/charts/big/force-galaxy.data.d.ts +48 -0
  278. package/lib/types/charts/big/thread-triptych.d.ts +17 -0
  279. package/lib/types/charts/big/thread-triptych.data.d.ts +41 -0
  280. package/lib/types/charts/board/room.d.ts +18 -0
  281. package/lib/types/charts/board/slope.d.ts +14 -0
  282. package/lib/types/charts/board/spread.d.ts +5 -0
  283. package/lib/types/charts/control.d.ts +17 -0
  284. package/lib/types/charts/core.d.ts +77 -0
  285. package/lib/types/charts/data-table.d.ts +18 -0
  286. package/lib/types/charts/fills.d.ts +103 -0
  287. package/lib/types/charts/forms/area-difference.d.ts +9 -0
  288. package/lib/types/charts/forms/area-difference.data.d.ts +26 -0
  289. package/lib/types/charts/forms/brush-math.d.ts +19 -0
  290. package/lib/types/charts/forms/brush-strip.d.ts +19 -0
  291. package/lib/types/charts/forms/brushed-overview.d.ts +12 -0
  292. package/lib/types/charts/forms/brushed-overview.data.d.ts +16 -0
  293. package/lib/types/charts/forms/chord-ring.d.ts +12 -0
  294. package/lib/types/charts/forms/chord-ring.data.d.ts +29 -0
  295. package/lib/types/charts/forms/circle-pack.d.ts +9 -0
  296. package/lib/types/charts/forms/circle-pack.data.d.ts +23 -0
  297. package/lib/types/charts/forms/hatched-stack.d.ts +10 -0
  298. package/lib/types/charts/forms/hatched-stack.data.d.ts +36 -0
  299. package/lib/types/charts/forms/radial-year.d.ts +8 -0
  300. package/lib/types/charts/forms/radial-year.data.d.ts +17 -0
  301. package/lib/types/charts/frame.d.ts +21 -0
  302. package/lib/types/charts/glance/aggregate-sankey.d.ts +23 -0
  303. package/lib/types/charts/glance/aggregate-sankey.data.d.ts +32 -0
  304. package/lib/types/charts/glance/bar-race.d.ts +20 -0
  305. package/lib/types/charts/glance/bar-race.data.d.ts +32 -0
  306. package/lib/types/charts/glance/big-slice.d.ts +27 -0
  307. package/lib/types/charts/glance/big-slice.data.d.ts +30 -0
  308. package/lib/types/charts/glance/chunky-bars.d.ts +18 -0
  309. package/lib/types/charts/glance/chunky-bars.data.d.ts +24 -0
  310. package/lib/types/charts/glance/circular-graph.d.ts +19 -0
  311. package/lib/types/charts/glance/circular-graph.data.d.ts +43 -0
  312. package/lib/types/charts/glance/control-slot.d.ts +9 -0
  313. package/lib/types/charts/glance/diverging-bar.d.ts +19 -0
  314. package/lib/types/charts/glance/diverging-bar.data.d.ts +27 -0
  315. package/lib/types/charts/glance/dot-waffle.d.ts +19 -0
  316. package/lib/types/charts/glance/dot-waffle.data.d.ts +31 -0
  317. package/lib/types/charts/glance/draw-in.d.ts +20 -0
  318. package/lib/types/charts/glance/draw-in.data.d.ts +6 -0
  319. package/lib/types/charts/glance/dynamic-stream.d.ts +22 -0
  320. package/lib/types/charts/glance/dynamic-stream.data.d.ts +7 -0
  321. package/lib/types/charts/glance/force-graph.d.ts +16 -0
  322. package/lib/types/charts/glance/force-graph.data.d.ts +45 -0
  323. package/lib/types/charts/glance/jitter-strip.d.ts +24 -0
  324. package/lib/types/charts/glance/jitter-strip.data.d.ts +27 -0
  325. package/lib/types/charts/glance/link-bundle.d.ts +22 -0
  326. package/lib/types/charts/glance/matrix-heat-glance.d.ts +22 -0
  327. package/lib/types/charts/glance/matrix-heat-glance.data.d.ts +35 -0
  328. package/lib/types/charts/glance/pictorial-bar.d.ts +20 -0
  329. package/lib/types/charts/glance/pictorial-bar.data.d.ts +27 -0
  330. package/lib/types/charts/glance/rainfall-dual-area.d.ts +19 -0
  331. package/lib/types/charts/glance/rainfall-dual-area.data.d.ts +32 -0
  332. package/lib/types/charts/glance/rank-strip.d.ts +19 -0
  333. package/lib/types/charts/glance/rank-strip.data.d.ts +36 -0
  334. package/lib/types/charts/glance/scatter-labels.d.ts +23 -0
  335. package/lib/types/charts/glance/scatter-morph.d.ts +22 -0
  336. package/lib/types/charts/glance/scatter-morph.data.d.ts +30 -0
  337. package/lib/types/charts/glance/single-axis.d.ts +27 -0
  338. package/lib/types/charts/glance/single-axis.data.d.ts +6 -0
  339. package/lib/types/charts/glance/stagger-wave.d.ts +18 -0
  340. package/lib/types/charts/glance/stagger-wave.data.d.ts +26 -0
  341. package/lib/types/charts/glance/tree-lr.d.ts +16 -0
  342. package/lib/types/charts/glance/tree-lr.data.d.ts +27 -0
  343. package/lib/types/charts/glance/util-a.d.ts +31 -0
  344. package/lib/types/charts/glance/util-b.d.ts +12 -0
  345. package/lib/types/charts/glance/violin.d.ts +22 -0
  346. package/lib/types/charts/glance/violin.data.d.ts +24 -0
  347. package/lib/types/charts/hooks.d.ts +109 -0
  348. package/lib/types/charts/hover.d.ts +26 -0
  349. package/lib/types/charts/lupi/arc-matrix.d.ts +18 -0
  350. package/lib/types/charts/lupi/arc-matrix.data.d.ts +28 -0
  351. package/lib/types/charts/lupi/ballot-tally.d.ts +19 -0
  352. package/lib/types/charts/lupi/ballot-tally.data.d.ts +28 -0
  353. package/lib/types/charts/lupi/barcode-lollipop.d.ts +19 -0
  354. package/lib/types/charts/lupi/barcode-lollipop.data.d.ts +26 -0
  355. package/lib/types/charts/lupi/brand-spectrum.d.ts +28 -0
  356. package/lib/types/charts/lupi/brand-spectrum.data.d.ts +34 -0
  357. package/lib/types/charts/lupi/bubble-almanac.d.ts +22 -0
  358. package/lib/types/charts/lupi/bubble-almanac.data.d.ts +45 -0
  359. package/lib/types/charts/lupi/calendar-heat.d.ts +19 -0
  360. package/lib/types/charts/lupi/calendar-heat.data.d.ts +20 -0
  361. package/lib/types/charts/lupi/cluster-field.d.ts +21 -0
  362. package/lib/types/charts/lupi/cluster-field.data.d.ts +52 -0
  363. package/lib/types/charts/lupi/dot-cascade.d.ts +22 -0
  364. package/lib/types/charts/lupi/dot-cascade.data.d.ts +24 -0
  365. package/lib/types/charts/lupi/dotty-matrix.d.ts +17 -0
  366. package/lib/types/charts/lupi/dotty-matrix.data.d.ts +32 -0
  367. package/lib/types/charts/lupi/hourglass-stream.d.ts +18 -0
  368. package/lib/types/charts/lupi/hourglass-stream.data.d.ts +27 -0
  369. package/lib/types/charts/lupi/hundred-field.d.ts +18 -0
  370. package/lib/types/charts/lupi/hundred-field.data.d.ts +24 -0
  371. package/lib/types/charts/lupi/launch-fan.d.ts +37 -0
  372. package/lib/types/charts/lupi/launch-fan.data.d.ts +41 -0
  373. package/lib/types/charts/lupi/matrix-heat.d.ts +20 -0
  374. package/lib/types/charts/lupi/matrix-heat.data.d.ts +29 -0
  375. package/lib/types/charts/lupi/parallel-coordinates.d.ts +23 -0
  376. package/lib/types/charts/lupi/parallel-coordinates.data.d.ts +40 -0
  377. package/lib/types/charts/lupi/radial-convergence.d.ts +15 -0
  378. package/lib/types/charts/lupi/radial-convergence.data.d.ts +24 -0
  379. package/lib/types/charts/lupi/radial-patchwork.d.ts +16 -0
  380. package/lib/types/charts/lupi/radial-patchwork.data.d.ts +35 -0
  381. package/lib/types/charts/lupi/ridgeline.d.ts +23 -0
  382. package/lib/types/charts/lupi/ridgeline.data.d.ts +19 -0
  383. package/lib/types/charts/lupi/trend-lineage.d.ts +18 -0
  384. package/lib/types/charts/lupi/trend-lineage.data.d.ts +56 -0
  385. package/lib/types/charts/lupi/type-colonnade.d.ts +20 -0
  386. package/lib/types/charts/lupi/type-colonnade.data.d.ts +30 -0
  387. package/lib/types/charts/lupi/util-a.d.ts +9 -0
  388. package/lib/types/charts/lupi/util-b.d.ts +11 -0
  389. package/lib/types/charts/maps/choropleth.d.ts +33 -0
  390. package/lib/types/charts/maps/geo.d.ts +48 -0
  391. package/lib/types/charts/maps/legend.d.ts +14 -0
  392. package/lib/types/charts/maps/step-fill.d.ts +6 -0
  393. package/lib/types/charts/maps/us-choropleth.d.ts +25 -0
  394. package/lib/types/charts/maps/us-choropleth.data.d.ts +23 -0
  395. package/lib/types/charts/maps/world-choropleth.d.ts +22 -0
  396. package/lib/types/charts/maps/world-choropleth.data.d.ts +35 -0
  397. package/lib/types/charts/markers.d.ts +42 -0
  398. package/lib/types/charts/marks.d.ts +58 -0
  399. package/lib/types/charts/motion.d.ts +12 -0
  400. package/lib/types/charts/originals/daily-users.d.ts +13 -0
  401. package/lib/types/charts/originals/daily-users.data.d.ts +17 -0
  402. package/lib/types/charts/originals/feature-rank.d.ts +13 -0
  403. package/lib/types/charts/originals/feature-rank.data.d.ts +29 -0
  404. package/lib/types/charts/originals/format.d.ts +2 -0
  405. package/lib/types/charts/originals/key.d.ts +16 -0
  406. package/lib/types/charts/originals/response-time.d.ts +11 -0
  407. package/lib/types/charts/originals/response-time.data.d.ts +24 -0
  408. package/lib/types/charts/originals/revenue-by-plan.d.ts +12 -0
  409. package/lib/types/charts/originals/revenue-by-plan.data.d.ts +26 -0
  410. package/lib/types/charts/playback.d.ts +42 -0
  411. package/lib/types/charts/plot-note.d.ts +37 -0
  412. package/lib/types/charts/roles.d.ts +28 -0
  413. package/lib/types/charts/rules.d.ts +62 -0
  414. package/lib/types/charts/scale-context.d.ts +3 -0
  415. package/lib/types/charts/shapes.d.ts +9 -0
  416. package/lib/types/charts/shared-options.d.ts +25 -0
  417. package/lib/types/charts/svg.d.ts +24 -0
  418. package/lib/types/charts/text.d.ts +36 -0
  419. package/lib/types/charts/texture-ids.d.ts +24 -0
  420. package/lib/types/charts/texture.d.ts +185 -0
  421. package/lib/types/charts/util.d.ts +66 -0
  422. package/lib/types/charts/value-grid.d.ts +22 -0
  423. package/lib/types/draw.d.ts +279 -0
  424. package/lib/types/entries/dumbbell-queue.d.ts +2 -0
  425. package/lib/types/entries/hairline-area.d.ts +2 -0
  426. package/lib/types/entries/hairline-line.d.ts +2 -0
  427. package/lib/types/entries/plumb-scatter.d.ts +2 -0
  428. package/lib/types/entries/rung-bars.d.ts +2 -0
  429. package/lib/types/entries/slope.d.ts +2 -0
  430. package/lib/types/frame.d.ts +2 -0
  431. package/lib/types/index.d.ts +82 -0
  432. package/lib/types/kit.d.ts +22 -0
  433. package/lib/types/lib/format.d.ts +58 -0
  434. package/lib/types/lib/random.d.ts +5 -0
  435. package/lib/types/maps.d.ts +2 -0
  436. package/lib/types/schema/daily.d.ts +14 -0
  437. package/lib/types/schema/dumbbell-queue.d.ts +91 -0
  438. package/lib/types/schema/format.d.ts +101 -0
  439. package/lib/types/schema/hairline-area.d.ts +83 -0
  440. package/lib/types/schema/hairline-line.d.ts +85 -0
  441. package/lib/types/schema/key.d.ts +12 -0
  442. package/lib/types/schema/metrics.d.ts +26 -0
  443. package/lib/types/schema/motion.d.ts +22 -0
  444. package/lib/types/schema/options.d.ts +51 -0
  445. package/lib/types/schema/plumb-scatter.d.ts +124 -0
  446. package/lib/types/schema/registry.d.ts +309 -0
  447. package/lib/types/schema/rung-bars.d.ts +84 -0
  448. package/lib/types/schema/scale.d.ts +36 -0
  449. package/lib/types/schema/slope.d.ts +120 -0
  450. package/lib/types/schema/validate.d.ts +29 -0
  451. package/lib/types/schema.d.ts +30 -0
  452. package/lib/types/theme/derive.d.ts +23 -0
  453. package/lib/types/theme.d.ts +2 -0
  454. package/lib/vendor/us-atlas/states-10m.json.js +13855 -0
  455. package/lib/vendor/world-atlas/countries-110m.json.js +9357 -0
  456. package/package.json +160 -3
@@ -0,0 +1,167 @@
1
+ "use client";
2
+ import { useHover as e } from "../hooks.js";
3
+ import { Plot as t, Tooltip as n } from "../core.js";
4
+ import { sansWidth as r, stagger as i, sum as a } from "../util.js";
5
+ import { DimGroup as o, TipText as s } from "../hover.js";
6
+ import { ChartSvg as c } from "../svg.js";
7
+ import { Label as l } from "../text.js";
8
+ import { TEXTURE_PITCH as u, paint as d, useTextureIds as f } from "../texture-ids.js";
9
+ import { Hatch as p } from "../texture.js";
10
+ import { sharedWorkDemo as m } from "./chord-ring.data.js";
11
+ import { useMemo as h } from "react";
12
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
+ import { arc as v } from "d3-shape";
14
+ import { chord as y } from "d3-chord";
15
+ //#region src/charts/forms/chord-ring.tsx
16
+ var b = (e) => `£${(e / 1e3).toFixed(1)}bn`, x = 66, S = 3, C = 3, w = 40, T = (e, t) => ({
17
+ x: Math.sin(e) * t,
18
+ y: -Math.cos(e) * t
19
+ }), E = (e, t) => +(t - e > Math.PI), D = (e, t) => {
20
+ let n = T(e.source.startAngle, t), r = T(e.source.endAngle, t), i = T(e.target.startAngle, t), a = T(e.target.endAngle, t);
21
+ return [
22
+ `M${n.x} ${n.y}`,
23
+ `A${t} ${t} 0 ${E(e.source.startAngle, e.source.endAngle)} 1 ${r.x} ${r.y}`,
24
+ `Q0 0 ${i.x} ${i.y}`,
25
+ `A${t} ${t} 0 ${E(e.target.startAngle, e.target.endAngle)} 1 ${a.x} ${a.y}`,
26
+ `Q0 0 ${n.x} ${n.y}Z`
27
+ ].join("");
28
+ }, O = (e) => (e.startAngle + e.endAngle) / 2, k = (e, t, n) => {
29
+ let r = T(O(e.source), t), i = T(O(e.target), t);
30
+ return Array.from({ length: 41 }, (e, t) => {
31
+ let a = t / w, o = (1 - a) ** 2 * r.x + a ** 2 * i.x, s = (1 - a) ** 2 * r.y + a ** 2 * i.y, c = 2 * a * i.x - 2 * (1 - a) * r.x, l = 2 * a * i.y - 2 * (1 - a) * r.y, u = Math.hypot(c, l);
32
+ return {
33
+ x: o - l / u * n,
34
+ y: s + c / u * n
35
+ };
36
+ }).map((e, t) => `${t === 0 ? "M" : "L"}${e.x.toFixed(1)} ${e.y.toFixed(1)}`).join("");
37
+ }, A = (e, t) => Math.min(3, Math.ceil(e / t * 3)), j = (e) => Array.from({ length: e }, (t, n) => (n - (e - 1) / 2) * u.dense), M = (e) => {
38
+ let t = Math.sin(e);
39
+ return Math.abs(t) < .15 ? "middle" : t > 0 ? "start" : "end";
40
+ }, N = (e) => y().padAngle(.035).sortSubgroups((e, t) => t - e)(e), P = (e, t, n) => {
41
+ let i = -t, a = t;
42
+ for (let n of N(e.matrix).groups) {
43
+ let o = (n.startAngle + n.endAngle) / 2, s = Math.sin(o) * (t + 12), c = r(e.teams[n.index], 12), l = M(o);
44
+ l === "start" ? a = Math.max(a, s + c) : l === "end" ? i = Math.min(i, s - c) : (i = Math.min(i, s - c / 2), a = Math.max(a, s + c / 2));
45
+ }
46
+ return Math.round((n - (a - i)) / 2 - i);
47
+ }, F = (e) => {
48
+ let t = (e.group.startAngle + e.group.endAngle) / 2, n = T(t, e.r + 12), r = Math.cos(t), i = "0.34em";
49
+ return r > .85 ? i = "0" : r < -.85 && (i = "0.71em"), /* @__PURE__ */ g(l, {
50
+ anchor: M(t),
51
+ className: "fade",
52
+ dy: i,
53
+ voice: e.hot ? "value" : "label",
54
+ x: n.x,
55
+ y: n.y,
56
+ children: e.name
57
+ });
58
+ }, I = (e, t) => e.source.index === t || e.target.index === t, L = (e, t) => {
59
+ let n = N(e.matrix), r = t - S, i = Math.max(...n.map((e) => e.source.value)), a = n.map((t) => ({
60
+ chord: t,
61
+ key: `${e.teams[t.source.index]}-${e.teams[t.target.index]}`,
62
+ ribbon: D(t, r - C),
63
+ threads: j(A(t.source.value, i)).map((e) => ({
64
+ d: k(t, r - C, e),
65
+ shift: e
66
+ }))
67
+ })), o = v().innerRadius(r).outerRadius(t);
68
+ return {
69
+ groups: n.groups.map((e) => ({
70
+ d: o(e) ?? "",
71
+ group: e
72
+ })),
73
+ pairs: a
74
+ };
75
+ }, R = (e) => /* @__PURE__ */ _("g", { children: [
76
+ /* @__PURE__ */ g(o, {
77
+ dim: e.hovering,
78
+ children: e.geometry.pairs.map((t) => /* @__PURE__ */ g("g", {
79
+ className: "ease-enter transition-opacity",
80
+ opacity: +!I(t.chord, e.focus),
81
+ children: t.threads.map((e) => /* @__PURE__ */ g("path", {
82
+ className: "draw stroke-l4 fill-none",
83
+ d: e.d,
84
+ pathLength: 1,
85
+ strokeWidth: 1
86
+ }, e.shift))
87
+ }, t.key))
88
+ }),
89
+ e.geometry.pairs.map((t) => /* @__PURE__ */ g("g", {
90
+ className: "ease-enter transition-opacity",
91
+ opacity: +!!I(t.chord, e.focus),
92
+ children: /* @__PURE__ */ g("path", {
93
+ className: "fade stroke-l5",
94
+ d: t.ribbon,
95
+ fill: d(e.hatch),
96
+ strokeWidth: 1
97
+ })
98
+ }, t.key)),
99
+ e.geometry.groups.map(({ d: t, group: n }) => /* @__PURE__ */ _("g", { children: [/* @__PURE__ */ g("path", {
100
+ className: `pop transition-tone ${n.index === e.focus ? "fill-hero" : "fill-l3"}`,
101
+ d: t,
102
+ style: i(n.index, "mark")
103
+ }), /* @__PURE__ */ g(F, {
104
+ group: n,
105
+ hot: n.index === e.focus,
106
+ name: e.data.teams[n.index],
107
+ r: e.r
108
+ })] }, e.data.teams[n.index]))
109
+ ] }), z = (e, t) => {
110
+ let n = (t + Math.PI * 2) % (Math.PI * 2), r = (e) => {
111
+ if (n >= e.startAngle && n <= e.endAngle) return 0;
112
+ let t = Math.min(Math.abs(n - e.startAngle), Math.abs(n - e.endAngle));
113
+ return Math.min(t, Math.PI * 2 - t);
114
+ };
115
+ return e.groups.map(({ group: e }) => e).toSorted((e, t) => r(e) - r(t))[0];
116
+ }, B = (e) => {
117
+ let { data: t, hover: n, totals: r, width: i } = e, a = f("exports")("hatch"), o = r.indexOf(Math.max(...r)), s = Math.min(i, 460), l = s / 2 - x, u = P(t, l, i), d = Math.round(s / 2), m = h(() => L(t, l), [t, l]), v = `UK goods exports in 2025 between ${t.teams.length} partners and kinds of goods; ${t.teams[o]} is the largest, ${b(r[o])}`;
118
+ return /* @__PURE__ */ _(c, {
119
+ className: "touch-pan-y",
120
+ height: s,
121
+ label: v,
122
+ leave: n.clear,
123
+ onPointerMove: (e) => {
124
+ let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left - u, i = e.clientY - t.top - d;
125
+ if (Math.hypot(r, i) < l * .45) return;
126
+ let a = z(m, Math.atan2(r, -i));
127
+ if (a === void 0 || a.index === n.key) return;
128
+ let o = T(O(a), l);
129
+ n.show(a.index, u + o.x, d + o.y - 12);
130
+ },
131
+ width: i,
132
+ children: [/* @__PURE__ */ g("defs", { children: /* @__PURE__ */ g(p, {
133
+ id: a,
134
+ tone: "fill-hero"
135
+ }) }), /* @__PURE__ */ g("g", {
136
+ transform: `translate(${u} ${d})`,
137
+ children: /* @__PURE__ */ g(R, {
138
+ data: t,
139
+ focus: n.key ?? o,
140
+ geometry: m,
141
+ hatch: a,
142
+ hovering: n.key !== null,
143
+ r: l
144
+ })
145
+ })]
146
+ });
147
+ }, V = (r) => {
148
+ let i = r.data ?? m, o = e(), c = i.matrix.map((e) => a(e));
149
+ return /* @__PURE__ */ g(t, {
150
+ overlay: o.at === null ? null : /* @__PURE__ */ g(n, {
151
+ x: o.at.x,
152
+ y: o.at.y,
153
+ children: /* @__PURE__ */ g(s, {
154
+ facts: [b(c[o.at.key])],
155
+ lead: i.teams[o.at.key]
156
+ })
157
+ }),
158
+ children: (e) => /* @__PURE__ */ g(B, {
159
+ data: i,
160
+ hover: o,
161
+ totals: c,
162
+ width: e
163
+ })
164
+ });
165
+ };
166
+ //#endregion
167
+ export { V as ChordRing };
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ //#region src/charts/forms/circle-pack.data.ts
3
+ var e = {
4
+ children: [
5
+ {
6
+ children: [
7
+ {
8
+ name: "Devon",
9
+ value: 415
10
+ },
11
+ {
12
+ name: "Somerset",
13
+ value: 384
14
+ },
15
+ {
16
+ name: "Lincolnshire",
17
+ value: 347
18
+ },
19
+ {
20
+ name: "Suffolk",
21
+ value: 279
22
+ },
23
+ {
24
+ name: "Norfolk",
25
+ value: 251
26
+ },
27
+ {
28
+ name: "Kent",
29
+ value: 238
30
+ }
31
+ ],
32
+ name: "England"
33
+ },
34
+ {
35
+ children: [
36
+ {
37
+ name: "Powys",
38
+ value: 54
39
+ },
40
+ {
41
+ name: "Monmouthshire",
42
+ value: 30
43
+ },
44
+ {
45
+ name: "The Vale of Glamorgan",
46
+ value: 21
47
+ },
48
+ {
49
+ name: "Carmarthenshire",
50
+ value: 13
51
+ }
52
+ ],
53
+ name: "Wales"
54
+ },
55
+ {
56
+ children: [
57
+ {
58
+ name: "New South Wales",
59
+ value: 36
60
+ },
61
+ {
62
+ name: "Victoria",
63
+ value: 12
64
+ },
65
+ {
66
+ name: "Western Australia",
67
+ value: 8
68
+ },
69
+ {
70
+ name: "South Australia",
71
+ value: 5
72
+ }
73
+ ],
74
+ name: "Australia"
75
+ }
76
+ ],
77
+ name: "Dove"
78
+ };
79
+ //#endregion
80
+ export { e as orgDemo };
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ import { Plot as e, Tooltip as t } from "../core.js";
3
+ import { sansWidth as n, stagger as r } from "../util.js";
4
+ import { TipText as i } from "../hover.js";
5
+ import { ChartSvg as a } from "../svg.js";
6
+ import { Label as o } from "../text.js";
7
+ import { paint as s, useTextureIds as c } from "../texture-ids.js";
8
+ import { PlateLabel as l, Stipple as u } from "../texture.js";
9
+ import { orgDemo as d } from "./circle-pack.data.js";
10
+ import { useState as f } from "react";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ import { hierarchy as h, pack as g } from "d3-hierarchy";
13
+ //#region src/charts/forms/circle-pack.tsx
14
+ var _ = (e) => e.ancestors().map((e) => e.data.name).join("/"), v = (e, t) => t ? "stroke-ink" : e.children === void 0 ? "stroke-l3" : "stroke-l5", y = (e) => e.depth === 0 ? "fill-transparent" : e.children === void 0 ? "fill-paper" : "", b = (e) => {
15
+ let { n: t } = e;
16
+ return n(t.data.name, 11) + 8 < t.r * 2 && t.r > 13 ? e.hero ? /* @__PURE__ */ m("g", {
17
+ className: "fade pointer-events-none",
18
+ style: r(6, "mark"),
19
+ children: [/* @__PURE__ */ p(l, {
20
+ className: "t-label",
21
+ hero: !0,
22
+ text: t.data.name,
23
+ x: t.x,
24
+ y: t.y - 7.5
25
+ }), /* @__PURE__ */ p(l, {
26
+ hero: !0,
27
+ text: String(t.value ?? 0),
28
+ x: t.x,
29
+ y: t.y + 7.5
30
+ })]
31
+ }) : /* @__PURE__ */ p(o, {
32
+ anchor: "middle",
33
+ className: "pointer-events-none",
34
+ middle: !0,
35
+ order: 6,
36
+ tier: "mark",
37
+ voice: "axis",
38
+ x: t.x,
39
+ y: t.y,
40
+ children: t.data.name
41
+ }) : null;
42
+ }, x = (e, t) => g().size([t, t]).padding((e) => e.depth === 0 ? 10 : 4)(h(e).sum((e) => e.value ?? 0)), S = (n) => {
43
+ let o = n.data ?? d, [l, h] = f(null), g = c("towers")("stipple");
44
+ return /* @__PURE__ */ p(e, {
45
+ overlay: l === null ? null : /* @__PURE__ */ p(t, {
46
+ x: l.x,
47
+ y: l.y,
48
+ children: /* @__PURE__ */ p(i, {
49
+ facts: [`${l.value} towers`],
50
+ lead: l.name
51
+ })
52
+ }),
53
+ children: (e) => {
54
+ let t = Math.min(e, 460), n = x(o, t), i = n.descendants(), c = n.leaves(), [d] = c;
55
+ for (let e of c) (e.value ?? 0) > (d.value ?? 0) && (d = e);
56
+ let f = Math.round((e - t) / 2), S = `Towers with a ring of bells, by county, ${n.value} in all; most in ${d.data.name}, ${d.value}`;
57
+ return /* @__PURE__ */ m(a, {
58
+ height: t,
59
+ label: S,
60
+ leave: () => {
61
+ h(null);
62
+ },
63
+ width: e,
64
+ children: [/* @__PURE__ */ p("defs", { children: /* @__PURE__ */ p(u, {
65
+ id: g,
66
+ tone: "fill-l4"
67
+ }) }), /* @__PURE__ */ m("g", {
68
+ transform: `translate(${f} 0)`,
69
+ children: [i.map((e, t) => {
70
+ let n = _(e), i = e === d;
71
+ return /* @__PURE__ */ p("circle", {
72
+ className: `pop transition-tone ${i ? "fill-hero" : `${y(e)} ${v(e, l?.key === n)}`}`,
73
+ cx: e.x,
74
+ cy: e.y,
75
+ fill: e.depth === 1 ? s(g) : void 0,
76
+ onPointerEnter: () => {
77
+ h({
78
+ key: n,
79
+ name: e.data.name,
80
+ value: e.value ?? 0,
81
+ x: f + e.x,
82
+ y: e.y - e.r - 4
83
+ });
84
+ },
85
+ r: e.r - .5,
86
+ strokeWidth: +!i,
87
+ style: r(t, "fine")
88
+ }, n);
89
+ }), c.map((e) => /* @__PURE__ */ p(b, {
90
+ hero: e === d,
91
+ n: e
92
+ }, `label-${_(e)}`))]
93
+ })]
94
+ });
95
+ }
96
+ });
97
+ };
98
+ //#endregion
99
+ export { S as CirclePack };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ //#region src/charts/forms/hatched-stack.data.ts
3
+ var e = {
4
+ kinds: [
5
+ {
6
+ name: "Farmland",
7
+ texture: "upright"
8
+ },
9
+ {
10
+ name: "Woodland",
11
+ texture: "cross"
12
+ },
13
+ {
14
+ name: "Built",
15
+ texture: "dots"
16
+ },
17
+ {
18
+ name: "Other",
19
+ texture: "level"
20
+ }
21
+ ],
22
+ rows: [
23
+ {
24
+ shares: [
25
+ 61.2,
26
+ 11.4,
27
+ 13.4,
28
+ 14
29
+ ],
30
+ team: "England"
31
+ },
32
+ {
33
+ shares: [
34
+ 24.1,
35
+ 18.2,
36
+ 2.9,
37
+ 54.8
38
+ ],
39
+ team: "Scotland"
40
+ },
41
+ {
42
+ shares: [
43
+ 41.1,
44
+ 19,
45
+ 7.3,
46
+ 32.6
47
+ ],
48
+ team: "Wales"
49
+ },
50
+ {
51
+ shares: [
52
+ 46.8,
53
+ 10,
54
+ 6.1,
55
+ 37.1
56
+ ],
57
+ team: "Northern Ireland"
58
+ },
59
+ {
60
+ shares: [
61
+ 46.8,
62
+ 14.1,
63
+ 9.1,
64
+ 30
65
+ ],
66
+ team: "UK"
67
+ }
68
+ ]
69
+ };
70
+ //#endregion
71
+ export { e as timeSharesDemo };
@@ -0,0 +1,228 @@
1
+ "use client";
2
+ import { Plot as e, Tooltip as t } from "../core.js";
3
+ import { dimClass as n, sansWidth as r, stagger as i, sum as a } from "../util.js";
4
+ import { DimGroup as o, HitRect as s, TipText as c } from "../hover.js";
5
+ import { KEY as l } from "../marks.js";
6
+ import { ChartSvg as u } from "../svg.js";
7
+ import { Label as d } from "../text.js";
8
+ import { HALFTONE_R as f, TEXTURE_PITCH as p, paint as m, useTextureIds as h } from "../texture-ids.js";
9
+ import { CrossHatch as g, DotScreen as _, EngravedRect as v, KeySwatch as y, Rules as b } from "../texture.js";
10
+ import { timeSharesDemo as x } from "./hatched-stack.data.js";
11
+ import { useState as S } from "react";
12
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
13
+ //#region src/charts/forms/hatched-stack.tsx
14
+ var T = 55, E = 88, D = 20, O = 12, k = l.swatch, A = l.gap, j = (e) => {
15
+ let t = {
16
+ kind: 0,
17
+ row: 0
18
+ };
19
+ for (let [n, r] of e.rows.entries()) for (let [i, a] of r.shares.entries()) a > e.rows[t.row].shares[t.kind] && (t = {
20
+ kind: i,
21
+ row: n
22
+ });
23
+ return t;
24
+ }, M = {
25
+ cross: "fill-l4",
26
+ dots: "fill-l3",
27
+ level: "fill-l5",
28
+ upright: "fill-l2"
29
+ }, N = [
30
+ "cross",
31
+ "dots",
32
+ "level",
33
+ "upright"
34
+ ], P = {
35
+ cross: {
36
+ x: 0,
37
+ y: 0
38
+ },
39
+ dots: {
40
+ x: 0,
41
+ y: 0
42
+ },
43
+ level: {
44
+ x: 0,
45
+ y: 1
46
+ },
47
+ upright: {
48
+ x: 1,
49
+ y: 0
50
+ }
51
+ }, F = {
52
+ cross: void 0,
53
+ dots: {
54
+ clear: 1,
55
+ pitch: p.screen
56
+ },
57
+ level: void 0,
58
+ upright: {
59
+ clear: 0,
60
+ pitch: p.dense
61
+ }
62
+ }, I = (e, t, n) => e === "cross" ? /* @__PURE__ */ C(g, {
63
+ id: t,
64
+ tone: n
65
+ }, t) : e === "dots" ? /* @__PURE__ */ C(_, {
66
+ id: t,
67
+ r: f[2],
68
+ tone: n
69
+ }, t) : e === "level" ? /* @__PURE__ */ C(b, {
70
+ id: t,
71
+ tone: n
72
+ }, t) : /* @__PURE__ */ C(b, {
73
+ angle: "upright",
74
+ id: t,
75
+ tone: n
76
+ }, t), L = (e) => /* @__PURE__ */ w("defs", { children: [N.map((t) => I(t, e.tex(t), M[t])), I(e.heroTexture, e.tex("hero"), "fill-hero")] }), R = (e, t, n) => {
77
+ let r = a(e), i = 0;
78
+ return e.map((a, o) => {
79
+ let s = Math.round(t + (n - t) * i / r);
80
+ return i += a, {
81
+ k: o,
82
+ w: Math.round(t + (n - t) * i / r) - s - (o === e.length - 1 ? 0 : 1),
83
+ x: s
84
+ };
85
+ });
86
+ }, z = (e, t, n) => {
87
+ let i = t, a = 0, o = [];
88
+ for (let [s, c] of e.entries()) {
89
+ let e = k + A + r(c.name, 11) + l.entryGap;
90
+ i + e - l.entryGap > n && i > t && (i = t, a += D), o.push({
91
+ k: s,
92
+ kind: c,
93
+ w: e,
94
+ x: i,
95
+ y: a
96
+ }), i += e;
97
+ }
98
+ return {
99
+ height: a + D + 8,
100
+ items: o
101
+ };
102
+ }, B = (e) => /* @__PURE__ */ C("g", { children: e.items.map(({ k: t, kind: n, w: r, x: i, y: a }) => /* @__PURE__ */ w(o, {
103
+ dim: e.hover !== null && e.hover !== t,
104
+ onPointerEnter: () => {
105
+ e.onHover(t);
106
+ },
107
+ children: [
108
+ /* @__PURE__ */ C(s, {
109
+ height: D,
110
+ width: r,
111
+ x: i,
112
+ y: a
113
+ }),
114
+ /* @__PURE__ */ C(y, {
115
+ fill: m(e.tex(n.texture)),
116
+ x: i,
117
+ y: a + D / 2 - k / 2
118
+ }),
119
+ /* @__PURE__ */ C(d, {
120
+ middle: !0,
121
+ voice: "axis",
122
+ x: i + k + A,
123
+ y: a + D / 2,
124
+ children: n.name
125
+ })
126
+ ]
127
+ }, n.name)) }), V = (e) => {
128
+ let t = e.labelW, r = e.width - 40;
129
+ return /* @__PURE__ */ C("g", { children: e.data.rows.map((a, o) => {
130
+ let s = e.top + o * E, c = o === e.hero.row;
131
+ return /* @__PURE__ */ w("g", { children: [
132
+ /* @__PURE__ */ C(d, {
133
+ middle: !0,
134
+ muted: !c,
135
+ voice: "label",
136
+ x: 0,
137
+ y: s + T / 2,
138
+ children: a.team
139
+ }),
140
+ R(a.shares, t, r).map((t) => {
141
+ let r = c && t.k === e.hero.kind, { texture: a } = e.data.kinds[t.k];
142
+ return /* @__PURE__ */ C(v, {
143
+ className: `grow-x ${r ? "stroke-ink" : "stroke-l5"} ${n(e.hover !== null && e.hover.kind !== t.k)}`,
144
+ fill: m(e.tex(r ? "hero" : a)),
145
+ height: T,
146
+ lead: P[a],
147
+ onPointerEnter: () => {
148
+ e.setHover({
149
+ kind: t.k,
150
+ row: o,
151
+ x: t.x + t.w / 2,
152
+ y: s - 4
153
+ });
154
+ },
155
+ style: i(o * 2 + t.k, "mark"),
156
+ whole: F[a],
157
+ width: t.w,
158
+ x: t.x,
159
+ y: s
160
+ }, e.data.kinds[t.k].name);
161
+ }),
162
+ /* @__PURE__ */ C(d, {
163
+ anchor: "end",
164
+ className: "fade",
165
+ middle: !0,
166
+ muted: !c,
167
+ voice: "value",
168
+ x: e.width,
169
+ y: s + T / 2,
170
+ children: `${a.shares[e.hero.kind]}%`
171
+ })
172
+ ] }, a.team);
173
+ }) });
174
+ }, H = (n) => {
175
+ let i = n.data ?? x, a = h("shares"), [o, s] = S(null), l = j(i), d = Math.max(...i.rows.map((e) => r(e.team, 12))) + 16, f = o?.row ?? null, p = i.kinds[l.kind].name.toLowerCase();
176
+ return /* @__PURE__ */ C(e, {
177
+ overlay: o === null || f === null ? null : /* @__PURE__ */ C(t, {
178
+ x: o.x,
179
+ y: o.y,
180
+ children: /* @__PURE__ */ C(c, {
181
+ facts: [`${i.kinds[o.kind].name.toLowerCase()} ${i.rows[f].shares[o.kind]}%`],
182
+ lead: i.rows[f].team
183
+ })
184
+ }),
185
+ children: (e) => {
186
+ let t = z(i.kinds, e < 480 ? 0 : d, e), n = t.height + O, r = n + i.rows.length * E - 33, c = `Share of land by nation, 2021: ${i.rows.map((e) => `${e.team} ${e.shares[l.kind]}% ${p}`).join(", ")}`;
187
+ return /* @__PURE__ */ w(u, {
188
+ height: r,
189
+ label: c,
190
+ leave: () => {
191
+ s(null);
192
+ },
193
+ width: e,
194
+ children: [
195
+ /* @__PURE__ */ C(L, {
196
+ heroTexture: i.kinds[l.kind].texture,
197
+ tex: a
198
+ }),
199
+ /* @__PURE__ */ C(B, {
200
+ hover: o?.kind ?? null,
201
+ items: t.items,
202
+ onHover: (e) => {
203
+ s(e === null ? null : {
204
+ kind: e,
205
+ row: null,
206
+ x: 0,
207
+ y: 0
208
+ });
209
+ },
210
+ tex: a
211
+ }),
212
+ /* @__PURE__ */ C(V, {
213
+ data: i,
214
+ hero: l,
215
+ hover: o,
216
+ labelW: d,
217
+ setHover: s,
218
+ tex: a,
219
+ top: n,
220
+ width: e
221
+ })
222
+ ]
223
+ });
224
+ }
225
+ });
226
+ };
227
+ //#endregion
228
+ export { H as HatchedStack };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { activeDaysDemo as e } from "./brushed-overview.data.js";
3
+ //#region src/charts/forms/radial-year.data.ts
4
+ var t = Array.from({ length: 12 }, (t, n) => {
5
+ let r = 0, i = 0;
6
+ for (let t of e) t.date.getUTCMonth() === n && (r += t.value, i += 1);
7
+ return {
8
+ date: new Date(Date.UTC(2022, n, 1)),
9
+ value: Math.round(r / i * 10) / 10
10
+ };
11
+ });
12
+ //#endregion
13
+ export { t as signupMonthsDemo };