@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,180 @@
1
+ "use client";
2
+ //#region src/charts/glance/single-axis.tides.json
3
+ var e = [
4
+ {
5
+ label: "Sandy Hook",
6
+ values: [
7
+ 1.189,
8
+ 1.118,
9
+ .931,
10
+ .712,
11
+ .548,
12
+ .471,
13
+ .479,
14
+ .59,
15
+ .796,
16
+ 1.028,
17
+ 1.213,
18
+ 1.336,
19
+ 1.396,
20
+ 1.353,
21
+ 1.177,
22
+ .921,
23
+ .685,
24
+ .519,
25
+ .424,
26
+ .414,
27
+ .515,
28
+ .696,
29
+ .881,
30
+ 1.029
31
+ ]
32
+ },
33
+ {
34
+ label: "Battery",
35
+ values: [
36
+ 1.149,
37
+ 1.155,
38
+ 1.04,
39
+ .823,
40
+ .619,
41
+ .512,
42
+ .489,
43
+ .533,
44
+ .681,
45
+ .913,
46
+ 1.13,
47
+ 1.274,
48
+ 1.356,
49
+ 1.373,
50
+ 1.279,
51
+ 1.059,
52
+ .795,
53
+ .598,
54
+ .484,
55
+ .421,
56
+ .443,
57
+ .584,
58
+ .779,
59
+ .945
60
+ ]
61
+ },
62
+ {
63
+ label: "Haverstraw",
64
+ values: [
65
+ .587,
66
+ .719,
67
+ .806,
68
+ .845,
69
+ .805,
70
+ .671,
71
+ .488,
72
+ .337,
73
+ .261,
74
+ .246,
75
+ .302,
76
+ .464,
77
+ .689,
78
+ .883,
79
+ 1.003,
80
+ 1.055,
81
+ 1.03,
82
+ .914,
83
+ .732,
84
+ .552,
85
+ .422,
86
+ .334,
87
+ .278,
88
+ .3
89
+ ]
90
+ },
91
+ {
92
+ label: "Hyde Park",
93
+ values: [
94
+ .218,
95
+ .344,
96
+ .525,
97
+ .677,
98
+ .78,
99
+ .824,
100
+ .785,
101
+ .665,
102
+ .519,
103
+ .416,
104
+ .357,
105
+ .305,
106
+ .306,
107
+ .437,
108
+ .657,
109
+ .862,
110
+ 1.007,
111
+ 1.087,
112
+ 1.078,
113
+ .965,
114
+ .782,
115
+ .603,
116
+ .468,
117
+ .344
118
+ ]
119
+ },
120
+ {
121
+ label: "Coxsackie",
122
+ values: [
123
+ .666,
124
+ .441,
125
+ .277,
126
+ .297,
127
+ .494,
128
+ .706,
129
+ .889,
130
+ 1.083,
131
+ 1.193,
132
+ 1.125,
133
+ .961,
134
+ .802,
135
+ .662,
136
+ .523,
137
+ .403,
138
+ .412,
139
+ .618,
140
+ .89,
141
+ 1.106,
142
+ 1.309,
143
+ 1.468,
144
+ 1.451,
145
+ 1.272,
146
+ 1.054
147
+ ]
148
+ },
149
+ {
150
+ label: "Albany",
151
+ values: [
152
+ .733,
153
+ .543,
154
+ .392,
155
+ .267,
156
+ .26,
157
+ .487,
158
+ .822,
159
+ 1.045,
160
+ 1.168,
161
+ 1.243,
162
+ 1.167,
163
+ .924,
164
+ .647,
165
+ .436,
166
+ .319,
167
+ .29,
168
+ .369,
169
+ .65,
170
+ 1.076,
171
+ 1.386,
172
+ 1.49,
173
+ 1.507,
174
+ 1.432,
175
+ 1.208
176
+ ]
177
+ }
178
+ ];
179
+ //#endregion
180
+ export { e as default };
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ //#region src/charts/glance/stagger-wave.data.ts
3
+ var e = Date.UTC(2010, 10, 2), t = 864e5, n = [
4
+ 11,
5
+ 12.7,
6
+ 13.5,
7
+ 13.6,
8
+ 8.1,
9
+ 5.2,
10
+ 4.4,
11
+ 5.8,
12
+ 5.4,
13
+ 6.7,
14
+ 9.8,
15
+ 7.5,
16
+ 4.9,
17
+ 2.9,
18
+ 3.5,
19
+ 3.1,
20
+ 7.1,
21
+ 6.1,
22
+ 5.2,
23
+ 4.7,
24
+ 5.4,
25
+ 5.1,
26
+ 1.6,
27
+ .2,
28
+ -.5,
29
+ -1.6,
30
+ -4,
31
+ -2.5,
32
+ -1,
33
+ -2,
34
+ -1.3,
35
+ -2.6,
36
+ -1.5,
37
+ .4,
38
+ -3.8,
39
+ -3.5,
40
+ -2.7,
41
+ .5,
42
+ 3.8,
43
+ 6,
44
+ .8,
45
+ 1.5,
46
+ 1.9,
47
+ 3.3,
48
+ 4.2,
49
+ -2.1,
50
+ -3,
51
+ -6.8,
52
+ -7,
53
+ -5.9,
54
+ -2.1,
55
+ -2.2,
56
+ -2.8,
57
+ -5.9,
58
+ -3.6,
59
+ -1.7
60
+ ], r = n.map((n, r) => ({
61
+ date: new Date(e + r * t),
62
+ value: n
63
+ }));
64
+ n.indexOf(Math.min(...n));
65
+ //#endregion
66
+ export { r as staggerWaveDemo };
@@ -0,0 +1,132 @@
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 { cx as i, noteOf as a, noteSpace as o, stagger as s } from "../util.js";
6
+ import { DimGroup as c, HitRect as l, TipText as u } from "../hover.js";
7
+ import { Bar as d } from "../markers.js";
8
+ import { FootNote as f } from "../plot-note.js";
9
+ import { HRule as p } from "../rules.js";
10
+ import { ChartSvg as m } from "../svg.js";
11
+ import { Label as h } from "../text.js";
12
+ import { paint as g, useTextureIds as _ } from "../texture-ids.js";
13
+ import { Hatch as v } from "../texture.js";
14
+ import { labelRoom as y } from "./util-a.js";
15
+ import { staggerWaveDemo as b } from "./stagger-wave.data.js";
16
+ import { scaleBand as x, scaleLinear as S } from "d3-scale";
17
+ import { utcFormat as C } from "d3-time-format";
18
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
19
+ //#region src/charts/glance/stagger-wave.tsx
20
+ var E = (e) => {
21
+ let t = e.top <= e.zero;
22
+ return /* @__PURE__ */ w(d, {
23
+ className: i("grow-y", t ? null : "from-top", e.hero && "fill-hero"),
24
+ dir: t ? "up" : "down",
25
+ fill: e.hero ? void 0 : g(e.hatch),
26
+ h: t ? e.zero - e.top : e.top - e.zero,
27
+ style: s(e.i, "fine"),
28
+ w: e.bw,
29
+ x: e.left,
30
+ y: t ? e.top : e.zero
31
+ });
32
+ }, D = (e) => /* @__PURE__ */ w("g", { children: e.y.ticks(6).map((t) => /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w(p, {
33
+ kind: t === 0 ? "hairline" : "grid",
34
+ x0: e.left,
35
+ x1: e.right,
36
+ y: e.y(t)
37
+ }), /* @__PURE__ */ w(h, {
38
+ anchor: "end",
39
+ dy: "0.35em",
40
+ voice: "axis",
41
+ x: e.left - 10,
42
+ y: e.y(t),
43
+ children: e.format(t)
44
+ })] }, t)) }), O = C("%-d %b"), k = C("%-d"), A = C("%a %-d %b"), j = (e) => e.map((t, n) => {
45
+ let r = e[n - 1];
46
+ return r === void 0 || r.getUTCMonth() !== t.getUTCMonth() ? O(t) : k(t);
47
+ }), M = (t) => e(t), N = (e) => `${e < 0 ? "−" : ""}${Math.abs(e)} °C`, P = (e) => y(e.map(N), "t-axis") + 10, F = (e) => e.ticks.map((t, n) => /* @__PURE__ */ w(h, {
48
+ anchor: n === 0 ? "start" : "middle",
49
+ dx: n === 0 ? -e.bw / 2 : 0,
50
+ voice: "axis",
51
+ x: t.at + e.bw / 2,
52
+ y: e.y,
53
+ children: e.labels[n]
54
+ }, t.d.date.toISOString())), I = (e) => {
55
+ let i = e.data ?? b, s = e.height ?? 340, d = e.format ?? M, p = t(), h = Math.max(...i.map((e) => e.value)), g = e.highlight ?? i.findIndex((e) => e.value === h), y = _("wave")("hatch"), C = Math.min(...i.map((e) => e.value)), O = `Daily mean temperature over ${i.length} days, from ${d(C)} to ${d(h)}.`;
56
+ return /* @__PURE__ */ w(n, {
57
+ overlay: p.at === null ? null : /* @__PURE__ */ w(r, {
58
+ x: p.at.x,
59
+ y: p.at.y,
60
+ children: /* @__PURE__ */ w(u, {
61
+ facts: [d(i[p.at.key].value)],
62
+ lead: A(i[p.at.key].date)
63
+ })
64
+ }),
65
+ children: (t) => {
66
+ let n = 24 + o(a(e), t - 16, 16), r = s - n, u = S().domain([Math.min(0, C), Math.max(0, h)]).nice(6).range([r, 8]), d = {
67
+ bottom: n,
68
+ left: P(u.ticks(6)),
69
+ right: 0,
70
+ top: 8
71
+ }, _ = x().domain(i.map((e, t) => t)).range([d.left, t - d.right]).paddingInner(t < 460 ? .25 : .32).paddingOuter(.1), b = _.bandwidth(), k = t < 460 ? 14 : 7, A = i.flatMap((e, t) => t % k === 0 ? [{
72
+ d: e,
73
+ i: t
74
+ }] : []), M = j(A.map((e) => e.d.date));
75
+ return /* @__PURE__ */ T(m, {
76
+ height: s,
77
+ label: O,
78
+ leave: p.clear,
79
+ width: t,
80
+ children: [
81
+ /* @__PURE__ */ w("defs", { children: /* @__PURE__ */ w(v, {
82
+ id: y,
83
+ tone: "fill-l4"
84
+ }) }),
85
+ /* @__PURE__ */ w(D, {
86
+ format: N,
87
+ left: d.left,
88
+ right: t - d.right,
89
+ y: u
90
+ }),
91
+ /* @__PURE__ */ w("g", { children: i.map((e, t) => {
92
+ let n = _(t) ?? 0, i = u(e.value), a = u(0);
93
+ return /* @__PURE__ */ T(c, {
94
+ dim: p.dim(t),
95
+ onPointerEnter: p.enter(t, n + b / 2, Math.min(i, a) - 4),
96
+ children: [/* @__PURE__ */ w(l, {
97
+ x: n - (_.step() - b) / 2,
98
+ y: d.top,
99
+ width: _.step(),
100
+ height: r - d.top
101
+ }), /* @__PURE__ */ w(E, {
102
+ bw: b,
103
+ zero: a,
104
+ hatch: y,
105
+ hero: g === t,
106
+ i: t,
107
+ left: n,
108
+ top: i
109
+ })]
110
+ }, e.date.toISOString());
111
+ }) }),
112
+ /* @__PURE__ */ w(F, {
113
+ bw: b,
114
+ labels: M,
115
+ ticks: A.map((e) => ({
116
+ at: _(e.i) ?? 0,
117
+ d: e.d
118
+ })),
119
+ y: r + 16
120
+ }),
121
+ /* @__PURE__ */ w(f, {
122
+ height: s,
123
+ text: a(e),
124
+ width: t
125
+ })
126
+ ]
127
+ });
128
+ }
129
+ });
130
+ };
131
+ //#endregion
132
+ export { I as StaggerWave };
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ //#region src/charts/glance/tree-lr.data.ts
3
+ var e = {
4
+ children: [
5
+ {
6
+ children: [
7
+ { name: "English" },
8
+ { name: "German" },
9
+ { name: "Icelandic" }
10
+ ],
11
+ name: "Germanic"
12
+ },
13
+ {
14
+ children: [
15
+ { name: "French" },
16
+ { name: "Italian" },
17
+ { name: "Romanian" }
18
+ ],
19
+ name: "Romance"
20
+ },
21
+ {
22
+ children: [
23
+ { name: "Irish" },
24
+ { name: "Welsh" },
25
+ { name: "Breton" }
26
+ ],
27
+ name: "Celtic"
28
+ },
29
+ {
30
+ children: [
31
+ { name: "Russian" },
32
+ { name: "Polish" },
33
+ { name: "Bulgarian" }
34
+ ],
35
+ name: "Slavic"
36
+ }
37
+ ],
38
+ name: "Indo-European"
39
+ };
40
+ //#endregion
41
+ export { e as treeLRDemo };
@@ -0,0 +1,135 @@
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, stagger as a } from "../util.js";
4
+ import { DimGroup as o, HitRect as s, TipText as c } from "../hover.js";
5
+ import { Dot as l } from "../markers.js";
6
+ import { FootNote as u } from "../plot-note.js";
7
+ import { ChartSvg as d } from "../svg.js";
8
+ import { Label as f } from "../text.js";
9
+ import { fillFor as p, labelRoom as m, strokeFor as h } from "./util-a.js";
10
+ import { treeLRDemo as g } from "./tree-lr.data.js";
11
+ import { useState as _ } from "react";
12
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
+ import { linkHorizontal as b } from "d3-shape";
14
+ import { hierarchy as x, tree as S } from "d3-hierarchy";
15
+ //#region src/charts/glance/tree-lr.tsx
16
+ var C = 4, w = (e) => e.ancestors().toReversed().map((e) => e.data.name).join(" › "), T = (e) => e.children === void 0 ? [e.name] : e.children.flatMap(T), E = (e) => {
17
+ let t = e.ancestors().find((e) => e.depth === 1), n = e.ancestors().at(-1)?.children ?? [];
18
+ return t === void 0 ? -1 : n.indexOf(t);
19
+ }, D = {
20
+ leaf: "fill-muted",
21
+ mid: "fill-text t-halo",
22
+ root: "fill-ink"
23
+ }, O = (e, t, n, r) => e === "leaf" ? {
24
+ anchor: "start",
25
+ x: t + 6,
26
+ y: n
27
+ } : e === "mid" ? {
28
+ anchor: "middle",
29
+ x: t,
30
+ y: r ? n - 14 : n + 14
31
+ } : {
32
+ anchor: "end",
33
+ x: t - 10,
34
+ y: n
35
+ }, k = ({ n: e, x: t, y: n, k: r, tone: i, lit: c, hitRight: u, onEnter: d }) => {
36
+ let p = e.children === void 0, m = "mid";
37
+ e.depth === 0 ? m = "root" : p && (m = "leaf");
38
+ let h = e.x <= (e.ancestors().at(-1)?.x ?? e.x), g = O(m, t, n, h);
39
+ return /* @__PURE__ */ y(o, {
40
+ dim: !c,
41
+ onPointerEnter: d,
42
+ children: [
43
+ /* @__PURE__ */ v(s, {
44
+ x: p ? t - 8 : t - 40,
45
+ y: p || !h ? n - 10 : n - 24,
46
+ width: p ? u + 8 : 80,
47
+ height: p ? 20 : 34
48
+ }),
49
+ p ? null : /* @__PURE__ */ v(l, {
50
+ className: `pop ${i}`,
51
+ style: a(e.depth * 4 + r * .2, "series"),
52
+ cx: t,
53
+ cy: n,
54
+ size: "md"
55
+ }),
56
+ /* @__PURE__ */ v(f, {
57
+ anchor: g.anchor,
58
+ className: D[m],
59
+ dy: "0.35em",
60
+ order: e.depth * 4 + r * .2,
61
+ tier: "series",
62
+ voice: "label",
63
+ x: g.x,
64
+ y: g.y,
65
+ children: e.data.name
66
+ })
67
+ ]
68
+ });
69
+ }, A = (o) => {
70
+ let s = o.data ?? g, l = o.height ?? 360, [f, D] = _(null), O = `Language family: ${(s.children ?? []).map((e) => `${e.name} (${(e.children ?? []).map((e) => e.name).join(", ")})`).join("; ")}`;
71
+ return /* @__PURE__ */ v(e, {
72
+ overlay: f === null ? null : /* @__PURE__ */ v(t, {
73
+ x: f.x,
74
+ y: f.y,
75
+ children: /* @__PURE__ */ v(c, {
76
+ facts: f.node.children === void 0 ? [] : [`${f.node.leaves().length} languages`],
77
+ lead: w(f.node)
78
+ })
79
+ }),
80
+ children: (e) => {
81
+ let t = {
82
+ bottom: 10 + i(r(o), e - 16, 20),
83
+ left: m([s.name], "t-label") + 10,
84
+ right: m(T(s), "t-label") + 6,
85
+ top: 10
86
+ }, c = S().size([l - t.top - t.bottom, e - t.left - t.right]).separation((e, t) => e.parent === t.parent ? 1 : 1.9)(x(s)), g = (e) => t.left + e.y, _ = (e) => t.top + e.x, A = b().x(g).y(_), j = o.highlight ?? c.children?.[0]?.data.name, M = (e) => {
87
+ let t = E(e);
88
+ return t >= 0 && c.children?.[t].data.name === j;
89
+ }, N = (e) => E(e) < 0 ? 0 : C, P = new Set(f === null ? [] : [...f.node.ancestors(), ...f.node.descendants()].map(w)), F = (e) => f === null || P.has(w(e));
90
+ return /* @__PURE__ */ y(d, {
91
+ height: l,
92
+ label: O,
93
+ leave: () => {
94
+ D(null);
95
+ },
96
+ width: e,
97
+ children: [
98
+ /* @__PURE__ */ v("g", {
99
+ fill: "none",
100
+ strokeWidth: 1,
101
+ children: c.links().map((e) => /* @__PURE__ */ v("path", {
102
+ className: `draw ${h(N(e.target), M(e.target))} ${n(!F(e.target))}`,
103
+ pathLength: 1,
104
+ style: a((e.target.depth - 1 + (e.target.parent?.children?.indexOf(e.target) ?? 0) * .15) * 4, "series"),
105
+ d: A(e) ?? ""
106
+ }, w(e.target)))
107
+ }),
108
+ c.descendants().map((e, n) => /* @__PURE__ */ v(k, {
109
+ n: e,
110
+ x: g(e),
111
+ y: _(e),
112
+ k: n,
113
+ tone: p(N(e), M(e)),
114
+ lit: F(e),
115
+ hitRight: t.right,
116
+ onEnter: () => {
117
+ D({
118
+ node: e,
119
+ x: g(e),
120
+ y: _(e) - 8
121
+ });
122
+ }
123
+ }, w(e))),
124
+ /* @__PURE__ */ v(u, {
125
+ height: l,
126
+ text: r(o),
127
+ width: e
128
+ })
129
+ ]
130
+ });
131
+ }
132
+ });
133
+ };
134
+ //#endregion
135
+ export { A as TreeLR };
@@ -0,0 +1,49 @@
1
+ "use client";
2
+ import { ranks as e, sansWidth as t } from "../util.js";
3
+ //#region src/charts/glance/util-a.ts
4
+ var n = /* @__PURE__ */ new Map(), r = null, i = (e, i) => {
5
+ let a = `${i}|${e}`, o = n.get(a);
6
+ if (o !== void 0) return o;
7
+ if (typeof document > "u" || document.fonts.status !== "loaded") return t(e);
8
+ if (r === null) {
9
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
10
+ e.setAttribute("aria-hidden", "true"), e.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none", r = document.createElementNS("http://www.w3.org/2000/svg", "text"), e.append(r), document.body.append(e);
11
+ }
12
+ r.setAttribute("class", i), r.textContent = e;
13
+ let s = r.getComputedTextLength();
14
+ return n.set(a, s), s;
15
+ }, a = (e, t = "t-label") => Math.ceil(Math.max(0, ...e.map((e) => i(e, t)))), o = [
16
+ "fill-hero",
17
+ "fill-l2",
18
+ "fill-l2",
19
+ "fill-l3",
20
+ "fill-l4",
21
+ "fill-l5",
22
+ "fill-l5"
23
+ ], s = [
24
+ "stroke-l0",
25
+ "stroke-l1",
26
+ "stroke-l2",
27
+ "stroke-l3",
28
+ "stroke-l4",
29
+ "stroke-l5",
30
+ "stroke-l6"
31
+ ], c = (e) => Math.max(0, Math.min(6, Math.round(e))), l = (e, t = !1) => t ? "fill-hero" : o[c(e)], u = (e, t = !1) => t ? "stroke-hero" : s[c(e)], d = (t, n) => e(t).map((e) => n[Math.min(n.length - 1, e)]), f = 16, p = Array.from({ length: f }, (e, t) => t / f), m = (e, t, n, r) => [
32
+ ...p.map((r) => [e + (n - e) * r, t]),
33
+ ...p.map((e) => [n, t + (r - t) * e]),
34
+ ...p.map((t) => [n - (n - e) * t, r]),
35
+ ...p.map((n) => [e, r - (r - t) * n])
36
+ ], h = (e, t, n) => Array.from({ length: 64 }, (r, i) => {
37
+ let a = -3 * Math.PI / 4 + i / 64 * Math.PI * 2;
38
+ return [e + n * Math.cos(a), t + n * Math.sin(a)];
39
+ }), g = (e, t, n, r, i, a, o) => {
40
+ let s = (n, r) => [e + n * Math.sin(r), t - n * Math.cos(r)], c = (e) => i + Math.min(o / e, (a - i) / 2.2), l = (e) => a - Math.min(o / e, (a - i) / 2.2);
41
+ return [
42
+ ...p.map((e) => s(r, c(r) + (l(r) - c(r)) * e)),
43
+ ...p.map((e) => s(r - (r - n) * e, l(r - (r - n) * e))),
44
+ ...p.map((e) => s(n, l(n) - (l(n) - c(n)) * e)),
45
+ ...p.map((e) => s(n + (r - n) * e, c(n + (r - n) * e)))
46
+ ];
47
+ }, _ = (e) => `M${e.map((e) => `${e[0].toFixed(1)},${e[1].toFixed(1)}`).join("L")}Z`, v = (e, t, n) => e.map((e, r) => [e[0] + (t[r][0] - e[0]) * n, e[1] + (t[r][1] - e[1]) * n]);
48
+ //#endregion
49
+ export { o as LADDER_FILL, s as LADDER_STROKE, v as blendPts, h as circlePts, l as fillFor, a as labelRoom, _ as ptsPath, d as rankTones, m as rectPts, g as sectorPts, u as strokeFor, i as textWidth };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ //#region src/charts/glance/util-b.ts
3
+ var e = (e, t, n = 5) => {
4
+ if (t <= 1) return 0;
5
+ let r = Math.round(e / (t - 1) * n);
6
+ return Math.max(0, Math.min(n, r));
7
+ }, t = 1 / Math.sqrt(2 * Math.PI), n = (e, n, r) => n.map((n) => {
8
+ let i = 0;
9
+ for (let a of e) {
10
+ let e = (n - a) / r;
11
+ i += t * Math.exp(-.5 * e * e);
12
+ }
13
+ return i / (e.length * r);
14
+ }), r = (e) => {
15
+ let t = e.length, n = e.reduce((e, t) => e + t, 0) / t;
16
+ return 1.06 * Math.sqrt(e.reduce((e, t) => e + (t - n) ** 2, 0) / Math.max(1, t - 1)) * t ** -.2;
17
+ }, i = 4, a = (e, t) => Math.max(1, Math.min(i, Math.ceil(e / t * i)));
18
+ //#endregion
19
+ export { a as bundleLines, n as density, e as ladderStep, r as silverman };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import e from "./violin.tenors.json.js";
3
+ //#region src/charts/glance/violin.data.ts
4
+ var t = 112, n = e.map((e) => ({
5
+ label: e.label,
6
+ values: e.lb.map((e) => e / t)
7
+ }));
8
+ //#endregion
9
+ export { n as violinDemo };