@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,230 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "note": {
6
+ "deprecated": true,
7
+ "description": "Deprecated: use `unitNote`.",
8
+ "type": "string"
9
+ },
10
+ "unitNote": {
11
+ "description": "The in-plot key under the axis.",
12
+ "type": "string"
13
+ },
14
+ "animate": {
15
+ "description": "When the entry draws in: \"scroll\" as the chart scrolls into view, \"mount\" at once, \"off\" never (drawn, and ready, in the first HTML). The default is \"off\" for a fixed-size chart and \"scroll\" for a responsive one. Under reduced motion the chart is drawn in the first paint.",
16
+ "type": "string",
17
+ "enum": [
18
+ "scroll",
19
+ "mount",
20
+ "off"
21
+ ]
22
+ },
23
+ "replayKey": {
24
+ "description": "Change it to replay the entry without remounting the chart.",
25
+ "type": [
26
+ "string",
27
+ "number"
28
+ ]
29
+ },
30
+ "fit": {
31
+ "description": "Fill the container's width at the chart's aspect ratio. Wins over `scale`.",
32
+ "type": "boolean"
33
+ },
34
+ "scale": {
35
+ "description": "Slides: draw at the logical width, then show the composition this many times larger, type and textures with it.",
36
+ "type": "number",
37
+ "exclusiveMinimum": 0
38
+ },
39
+ "strokes": {
40
+ "description": "\"device\" keeps every stroke at one device pixel, and is the default when the chart is scaled (`scale` or `fit`); \"proportional\" scales strokes with the composition. It acts on stroked geometry only (rules, lines, rings, outlines): filled marks, such as the bars of RungBars, scale either way.",
41
+ "type": "string",
42
+ "enum": [
43
+ "proportional",
44
+ "device"
45
+ ]
46
+ },
47
+ "idPrefix": {
48
+ "description": "Leads every SVG id, to separate charts rendered in separate React roots on one page.",
49
+ "type": "string",
50
+ "pattern": "^[A-Za-z][\\w-]*$"
51
+ },
52
+ "metrics": {
53
+ "description": "Glyph widths of a face other than Inter, so notes wrap and reserve room for it.",
54
+ "type": "object",
55
+ "properties": {
56
+ "advances": {
57
+ "type": "object",
58
+ "propertyNames": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "maxLength": 1
62
+ },
63
+ "additionalProperties": {
64
+ "type": "number",
65
+ "exclusiveMinimum": 0
66
+ }
67
+ },
68
+ "fallback": {
69
+ "type": "number",
70
+ "exclusiveMinimum": 0
71
+ },
72
+ "tabular": {
73
+ "type": "number",
74
+ "exclusiveMinimum": 0
75
+ }
76
+ },
77
+ "required": [
78
+ "advances",
79
+ "fallback"
80
+ ],
81
+ "additionalProperties": false
82
+ },
83
+ "table": {
84
+ "description": "Show the data table to sighted readers too. It is always there for screen readers.",
85
+ "type": "boolean"
86
+ },
87
+ "title": {
88
+ "description": "The chart's accessible name. Each chart has a default that reads the data.",
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "data": {
93
+ "minItems": 1,
94
+ "maxItems": 24,
95
+ "type": "array",
96
+ "items": {
97
+ "type": "object",
98
+ "properties": {
99
+ "id": {
100
+ "description": "A unique key, for when two bars share a label.",
101
+ "type": "string",
102
+ "minLength": 1
103
+ },
104
+ "label": {
105
+ "type": "string",
106
+ "description": "Names the bar, and is its key unless `id` is given."
107
+ },
108
+ "value": {
109
+ "type": "number",
110
+ "description": "The bar's value, counted off in rungs of `unit`."
111
+ }
112
+ },
113
+ "required": [
114
+ "label",
115
+ "value"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ "description": "The bars, 1 to 24."
120
+ },
121
+ "emphasis": {
122
+ "description": "The bar to draw in the hero colour, by key. Defaults to the largest.",
123
+ "type": "string"
124
+ },
125
+ "format": {
126
+ "description": "How values print: a preset name or Intl number-format options.",
127
+ "anyOf": [
128
+ {
129
+ "type": "string",
130
+ "enum": [
131
+ "integer",
132
+ "decimal",
133
+ "compact",
134
+ "percent"
135
+ ]
136
+ },
137
+ {
138
+ "type": "object",
139
+ "properties": {
140
+ "compactDisplay": {
141
+ "type": "string",
142
+ "enum": [
143
+ "short",
144
+ "long"
145
+ ]
146
+ },
147
+ "currency": {
148
+ "type": "string",
149
+ "minLength": 3,
150
+ "maxLength": 3
151
+ },
152
+ "locale": {
153
+ "type": "string",
154
+ "minLength": 2
155
+ },
156
+ "maximumFractionDigits": {
157
+ "type": "integer",
158
+ "minimum": 0,
159
+ "maximum": 20
160
+ },
161
+ "minimumFractionDigits": {
162
+ "type": "integer",
163
+ "minimum": 0,
164
+ "maximum": 20
165
+ },
166
+ "notation": {
167
+ "type": "string",
168
+ "enum": [
169
+ "standard",
170
+ "compact"
171
+ ]
172
+ },
173
+ "signDisplay": {
174
+ "type": "string",
175
+ "enum": [
176
+ "auto",
177
+ "always",
178
+ "exceptZero",
179
+ "never"
180
+ ]
181
+ },
182
+ "style": {
183
+ "type": "string",
184
+ "enum": [
185
+ "decimal",
186
+ "percent",
187
+ "currency",
188
+ "unit"
189
+ ]
190
+ },
191
+ "unit": {
192
+ "type": "string"
193
+ },
194
+ "useGrouping": {
195
+ "type": "boolean"
196
+ }
197
+ },
198
+ "additionalProperties": false
199
+ }
200
+ ]
201
+ },
202
+ "height": {
203
+ "description": "Fixed height in px. Without it a bar chart is 460 tall.",
204
+ "type": "integer",
205
+ "exclusiveMinimum": 0,
206
+ "maximum": 9007199254740991
207
+ },
208
+ "initialWidth": {
209
+ "description": "Responsive mode only: the width of the first render, before measuring.",
210
+ "type": "integer",
211
+ "exclusiveMinimum": 0,
212
+ "maximum": 9007199254740991
213
+ },
214
+ "unit": {
215
+ "description": "Units per rung.",
216
+ "type": "number",
217
+ "exclusiveMinimum": 0
218
+ },
219
+ "width": {
220
+ "description": "Fixed width in px. Giving it turns measuring off.",
221
+ "type": "integer",
222
+ "exclusiveMinimum": 0,
223
+ "maximum": 9007199254740991
224
+ }
225
+ },
226
+ "required": [
227
+ "data"
228
+ ],
229
+ "additionalProperties": false
230
+ }
@@ -0,0 +1,333 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "animate": {
6
+ "description": "When the entry draws in: \"scroll\" as the chart scrolls into view, \"mount\" at once, \"off\" never (drawn, and ready, in the first HTML). The default is \"off\" for a fixed-size chart and \"scroll\" for a responsive one. Under reduced motion the chart is drawn in the first paint.",
7
+ "type": "string",
8
+ "enum": [
9
+ "scroll",
10
+ "mount",
11
+ "off"
12
+ ]
13
+ },
14
+ "replayKey": {
15
+ "description": "Change it to replay the entry without remounting the chart.",
16
+ "type": [
17
+ "string",
18
+ "number"
19
+ ]
20
+ },
21
+ "fit": {
22
+ "description": "Fill the container's width at the chart's aspect ratio. Wins over `scale`.",
23
+ "type": "boolean"
24
+ },
25
+ "scale": {
26
+ "description": "Slides: draw at the logical width, then show the composition this many times larger, type and textures with it.",
27
+ "type": "number",
28
+ "exclusiveMinimum": 0
29
+ },
30
+ "strokes": {
31
+ "description": "\"device\" keeps every stroke at one device pixel, and is the default when the chart is scaled (`scale` or `fit`); \"proportional\" scales strokes with the composition. It acts on stroked geometry only (rules, lines, rings, outlines): filled marks, such as the bars of RungBars, scale either way.",
32
+ "type": "string",
33
+ "enum": [
34
+ "proportional",
35
+ "device"
36
+ ]
37
+ },
38
+ "idPrefix": {
39
+ "description": "Leads every SVG id, to separate charts rendered in separate React roots on one page.",
40
+ "type": "string",
41
+ "pattern": "^[A-Za-z][\\w-]*$"
42
+ },
43
+ "metrics": {
44
+ "description": "Glyph widths of a face other than Inter, so notes wrap and reserve room for it.",
45
+ "type": "object",
46
+ "properties": {
47
+ "advances": {
48
+ "type": "object",
49
+ "propertyNames": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 1
53
+ },
54
+ "additionalProperties": {
55
+ "type": "number",
56
+ "exclusiveMinimum": 0
57
+ }
58
+ },
59
+ "fallback": {
60
+ "type": "number",
61
+ "exclusiveMinimum": 0
62
+ },
63
+ "tabular": {
64
+ "type": "number",
65
+ "exclusiveMinimum": 0
66
+ }
67
+ },
68
+ "required": [
69
+ "advances",
70
+ "fallback"
71
+ ],
72
+ "additionalProperties": false
73
+ },
74
+ "table": {
75
+ "description": "Show the data table to sighted readers too. It is always there for screen readers.",
76
+ "type": "boolean"
77
+ },
78
+ "title": {
79
+ "description": "The chart's accessible name. Each chart has a default that reads the data.",
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "domain": {
84
+ "description": "The y range as [lowest, highest]. Defaults to the extent of the rows.",
85
+ "type": "array",
86
+ "prefixItems": [
87
+ {
88
+ "type": "number"
89
+ },
90
+ {
91
+ "type": "number"
92
+ }
93
+ ],
94
+ "items": false,
95
+ "minItems": 2,
96
+ "maxItems": 2
97
+ },
98
+ "emphasis": {
99
+ "description": "The row to draw in the hero colour, by key. Defaults to the biggest fall.",
100
+ "type": "string"
101
+ },
102
+ "format": {
103
+ "description": "How values print: a preset name or Intl number-format options.",
104
+ "anyOf": [
105
+ {
106
+ "type": "string",
107
+ "enum": [
108
+ "integer",
109
+ "decimal",
110
+ "compact",
111
+ "percent"
112
+ ]
113
+ },
114
+ {
115
+ "type": "object",
116
+ "properties": {
117
+ "compactDisplay": {
118
+ "type": "string",
119
+ "enum": [
120
+ "short",
121
+ "long"
122
+ ]
123
+ },
124
+ "currency": {
125
+ "type": "string",
126
+ "minLength": 3,
127
+ "maxLength": 3
128
+ },
129
+ "locale": {
130
+ "type": "string",
131
+ "minLength": 2
132
+ },
133
+ "maximumFractionDigits": {
134
+ "type": "integer",
135
+ "minimum": 0,
136
+ "maximum": 20
137
+ },
138
+ "minimumFractionDigits": {
139
+ "type": "integer",
140
+ "minimum": 0,
141
+ "maximum": 20
142
+ },
143
+ "notation": {
144
+ "type": "string",
145
+ "enum": [
146
+ "standard",
147
+ "compact"
148
+ ]
149
+ },
150
+ "signDisplay": {
151
+ "type": "string",
152
+ "enum": [
153
+ "auto",
154
+ "always",
155
+ "exceptZero",
156
+ "never"
157
+ ]
158
+ },
159
+ "style": {
160
+ "type": "string",
161
+ "enum": [
162
+ "decimal",
163
+ "percent",
164
+ "currency",
165
+ "unit"
166
+ ]
167
+ },
168
+ "unit": {
169
+ "type": "string"
170
+ },
171
+ "useGrouping": {
172
+ "type": "boolean"
173
+ }
174
+ },
175
+ "additionalProperties": false
176
+ }
177
+ ]
178
+ },
179
+ "height": {
180
+ "description": "Fixed height in px. Without it a slope chart is 420 tall.",
181
+ "type": "integer",
182
+ "exclusiveMinimum": 0,
183
+ "maximum": 9007199254740991
184
+ },
185
+ "initialWidth": {
186
+ "description": "Responsive mode only: the width of the first render, before measuring.",
187
+ "type": "integer",
188
+ "exclusiveMinimum": 0,
189
+ "maximum": 9007199254740991
190
+ },
191
+ "label": {
192
+ "description": "The accessible name. Defaults to a reading of the rows.",
193
+ "type": "string"
194
+ },
195
+ "labels": {
196
+ "type": "array",
197
+ "prefixItems": [
198
+ {
199
+ "type": "string"
200
+ },
201
+ {
202
+ "type": "string"
203
+ }
204
+ ],
205
+ "items": false,
206
+ "minItems": 2,
207
+ "maxItems": 2,
208
+ "description": "Names the two points, left then right, e.g. [\"Jan 2023\", \"Dec 2024\"]."
209
+ },
210
+ "narrowFormat": {
211
+ "description": "The same on a phone (under 520px wide), where a unit would crowd the columns.",
212
+ "anyOf": [
213
+ {
214
+ "type": "string",
215
+ "enum": [
216
+ "integer",
217
+ "decimal",
218
+ "compact",
219
+ "percent"
220
+ ]
221
+ },
222
+ {
223
+ "type": "object",
224
+ "properties": {
225
+ "compactDisplay": {
226
+ "type": "string",
227
+ "enum": [
228
+ "short",
229
+ "long"
230
+ ]
231
+ },
232
+ "currency": {
233
+ "type": "string",
234
+ "minLength": 3,
235
+ "maxLength": 3
236
+ },
237
+ "locale": {
238
+ "type": "string",
239
+ "minLength": 2
240
+ },
241
+ "maximumFractionDigits": {
242
+ "type": "integer",
243
+ "minimum": 0,
244
+ "maximum": 20
245
+ },
246
+ "minimumFractionDigits": {
247
+ "type": "integer",
248
+ "minimum": 0,
249
+ "maximum": 20
250
+ },
251
+ "notation": {
252
+ "type": "string",
253
+ "enum": [
254
+ "standard",
255
+ "compact"
256
+ ]
257
+ },
258
+ "signDisplay": {
259
+ "type": "string",
260
+ "enum": [
261
+ "auto",
262
+ "always",
263
+ "exceptZero",
264
+ "never"
265
+ ]
266
+ },
267
+ "style": {
268
+ "type": "string",
269
+ "enum": [
270
+ "decimal",
271
+ "percent",
272
+ "currency",
273
+ "unit"
274
+ ]
275
+ },
276
+ "unit": {
277
+ "type": "string"
278
+ },
279
+ "useGrouping": {
280
+ "type": "boolean"
281
+ }
282
+ },
283
+ "additionalProperties": false
284
+ }
285
+ ]
286
+ },
287
+ "rows": {
288
+ "minItems": 1,
289
+ "maxItems": 12,
290
+ "type": "array",
291
+ "items": {
292
+ "type": "object",
293
+ "properties": {
294
+ "from": {
295
+ "type": "number",
296
+ "description": "The value at the left point."
297
+ },
298
+ "id": {
299
+ "description": "A unique key, for when two rows share a name.",
300
+ "type": "string",
301
+ "minLength": 1
302
+ },
303
+ "name": {
304
+ "type": "string",
305
+ "description": "Names the row, and is its key unless `id` is given."
306
+ },
307
+ "to": {
308
+ "type": "number",
309
+ "description": "The value at the right point."
310
+ }
311
+ },
312
+ "required": [
313
+ "from",
314
+ "name",
315
+ "to"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ "description": "The rows, 1 to 12."
320
+ },
321
+ "width": {
322
+ "description": "Fixed width in px. Giving it turns measuring off.",
323
+ "type": "integer",
324
+ "exclusiveMinimum": 0,
325
+ "maximum": 9007199254740991
326
+ }
327
+ },
328
+ "required": [
329
+ "labels",
330
+ "rows"
331
+ ],
332
+ "additionalProperties": false
333
+ }
package/lib/kit.js ADDED
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { IdScope as e, useEntry as t, useHover as n, useMeasure as r, useMotionPreference as i, useReducedMotion as a, useReveal as o, useScrub as s, useSvgId as c } from "./charts/hooks.js";
3
+ import { Chart as l, Plot as u, SplitClips as d, Tooltip as f } from "./charts/core.js";
4
+ import { DimGroup as p, HitCircle as m, HitPath as h, HitRect as g, TipText as _ } from "./charts/hover.js";
5
+ import { crisp as v, phase as y } from "./charts/axes.js";
6
+ import { DOT as b, KEY as x, LABEL_TICK as S, MARK_WEIGHT as C, RING_STEP as w, RING_WEIGHT as T, STEM as E, TICK as D } from "./charts/marks.js";
7
+ import { Bar as O, Dot as k, Ring as A } from "./charts/markers.js";
8
+ import { FootNote as j, PlotNote as M } from "./charts/plot-note.js";
9
+ import { Cursor as N, HGrid as P, HRule as F, Stem as I, Tick as L, VGrid as R, VRule as z } from "./charts/rules.js";
10
+ import { ChartSvg as B } from "./charts/svg.js";
11
+ import { Label as V, XLabels as H } from "./charts/text.js";
12
+ import { HALFTONE_R as U, TEXTURE_PITCH as W, paint as G, useTextureIds as K } from "./charts/texture-ids.js";
13
+ import { Beads as q, CrossHatch as J, DotRing as Y, DotScreen as X, DottedLine as Z, DottedPath as Q, EngravedRect as $, Hatch as ee, KeySwatch as te, PixelLine as ne, PlateLabel as re, Rules as ie, Stipple as ae } from "./charts/texture.js";
14
+ import { DURATION as oe, easeTravel as se } from "./charts/motion.js";
15
+ import { FILL_FAMILIES as ce, FILL_LADDERS as le, FILL_TONES as ue, toneClass as de } from "./charts/fills.js";
16
+ export { O as Bar, q as Beads, l as Chart, B as ChartSvg, J as CrossHatch, N as Cursor, b as DOT, oe as DURATION, p as DimGroup, k as Dot, Y as DotRing, X as DotScreen, Z as DottedLine, Q as DottedPath, $ as EngravedRect, ce as FILL_FAMILIES, le as FILL_LADDERS, ue as FILL_TONES, j as FootNote, U as HALFTONE_R, P as HGrid, F as HRule, ee as Hatch, m as HitCircle, h as HitPath, g as HitRect, e as IdScope, x as KEY, te as KeySwatch, S as LABEL_TICK, V as Label, C as MARK_WEIGHT, ne as PixelLine, re as PlateLabel, u as Plot, M as PlotNote, w as RING_STEP, T as RING_WEIGHT, A as Ring, ie as Rules, E as STEM, d as SplitClips, I as Stem, ae as Stipple, W as TEXTURE_PITCH, D as TICK, L as Tick, _ as TipText, f as Tooltip, R as VGrid, z as VRule, H as XLabels, v as crisp, se as easeTravel, G as paint, y as phase, de as toneClass, t as useEntry, n as useHover, r as useMeasure, i as useMotionPreference, a as useReducedMotion, o as useReveal, s as useScrub, c as useSvgId, K as useTextureIds };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { format as e, precisionFixed as t } from "d3-format";
3
+ import { utcFormat as n } from "d3-time-format";
4
+ //#region src/lib/format.ts
5
+ var r = e(",.0f"), i = (t) => e(`,.${t}f`), a = 6, o = (e, t, n) => e.every((e) => Math.abs(Number(e.toFixed(t)) - e) <= n * 1e-9), s = (e, n, r) => {
6
+ let s = r.length > 1 ? Math.abs(r[1] - r[0]) : 1;
7
+ if (!n || s >= 1) return e;
8
+ let c = Math.min(t(s), a);
9
+ for (; c < a && !o(r, c, s);) c += 1;
10
+ return i(c);
11
+ }, c = (e) => `${r(e / 1e3)}k`, l = (e) => {
12
+ let t = Math.abs(e), n = e < 0 ? "−" : "";
13
+ if (t >= 1e6) {
14
+ let e = t / 1e6;
15
+ return `${n}$${e >= 10 ? e.toFixed(1) : e.toFixed(2)}m`.replace(/\.?0+m$/u, "m");
16
+ }
17
+ return t >= 1e3 ? `${n}$${Math.round(t / 1e3)}k` : `${n}$${Math.round(t)}`;
18
+ }, u = (e) => `${e < 0 ? "−" : ""}$${Math.abs(e).toFixed(2)}`, d = (e, t = 0) => e === 0 ? "0%" : `${e > 0 ? "+" : "−"}${Math.abs(e).toFixed(t)}%`, f = n("%b %Y"), p = n("%-d %b %Y"), m = (e) => f(e), h = (e) => p(e), g = n("%b"), _ = n("%Y"), v = n("%y"), y = (e) => e.map((t, n) => {
19
+ let r = e[n - 1];
20
+ return r === void 0 || r.getUTCFullYear() !== t.getUTCFullYear() ? f(t) : g(t);
21
+ }), b = (e) => e.map((e, t) => t === 0 || e.getUTCFullYear() % 100 == 0 ? _(e) : v(e)), x = n("%-d %b"), S = n("%-d"), C = (e) => e.map((t, n) => {
22
+ let r = e[n - 1];
23
+ return r === void 0 || r.getUTCMonth() !== t.getUTCMonth() || r.getUTCFullYear() !== t.getUTCFullYear() ? x(t) : S(t);
24
+ }), w = (e) => {
25
+ let t = Math.abs(e).toFixed(1);
26
+ return `${e < 0 && t !== "0.0" ? "−" : ""}${t} °C`;
27
+ }, T = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`;
28
+ //#endregion
29
+ export { s as axisFormat, C as dayTickLabels, i as fixedFormat, h as fmtDay, w as fmtDegC, r as fmtInt, c as fmtKInt, l as fmtMoney, m as fmtMonth, u as fmtPrice, d as fmtSignedPct, y as monthTickLabels, T as plural, b as yearTickLabels };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ //#region src/lib/random.ts
3
+ var e = (e, t = 0) => {
4
+ let n = Math.sin(e * 127.1 + t * 311.7) * 43758.5453;
5
+ return n - Math.floor(n);
6
+ }, t = (t, n = 0) => e(t, n) * 2 - 1;
7
+ //#endregion
8
+ export { e as rnd, t as rndSigned };
package/lib/maps.js ADDED
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import { USChoropleth as e } from "./charts/maps/us-choropleth.js";
3
+ import { WorldChoropleth as t } from "./charts/maps/world-choropleth.js";
4
+ export { e as USChoropleth, t as WorldChoropleth };
@@ -0,0 +1,9 @@
1
+ import { z as e } from "zod";
2
+ //#region src/schema/daily.ts
3
+ var t = e.union([e.iso.date(), e.iso.datetime()]), n = e.strictObject({
4
+ date: t.describe("The day of the reading, as an ISO date or date-time."),
5
+ id: e.string().min(1).optional().describe("Names the reading, and is its key; without it the date is."),
6
+ value: e.number().nullable().describe("The reading. Null is a day with no reading, drawn as a gap.")
7
+ });
8
+ //#endregion
9
+ export { n as dailyDatumSchema, t as isoDateSchema };
@@ -0,0 +1,28 @@
1
+ import { formatSchema as e } from "./format.js";
2
+ import { keyOf as t } from "./key.js";
3
+ import { noteShape as n, sharedShape as r } from "./options.js";
4
+ import { z as i } from "zod";
5
+ //#region src/schema/dumbbell-queue.ts
6
+ var a = i.strictObject({
7
+ after: i.number().describe("The later value."),
8
+ before: i.number().describe("The earlier value."),
9
+ id: i.string().min(1).optional().describe("A unique key, for when two rows share a label."),
10
+ label: i.string().describe("Names the row, and is its key unless `id` is given.")
11
+ }), o = i.strictObject({
12
+ ...n,
13
+ ...r,
14
+ alert: i.enum(["fall", "rise"]).optional().describe("Which direction of change is drawn in the alert colour. Defaults to a rise."),
15
+ data: i.array(a).min(1).max(12).describe("The rows, 1 to 12."),
16
+ emphasis: i.string().optional().describe("The row to draw in the hero colour, by key. Defaults to the biggest change."),
17
+ ends: i.tuple([i.string(), i.string()]).optional().describe("Axis end labels: [low end, high end]."),
18
+ format: e.optional().describe("How values print: a preset name or Intl number-format options."),
19
+ height: i.number().int().positive().optional().describe("Fixed height in px. Without it the chart is 380 tall."),
20
+ initialWidth: i.number().int().positive().optional().describe("Responsive mode only: the width of the first render, before measuring."),
21
+ unit: i.number().positive().optional().describe("Size of one rung in data units: the gap counts off in these."),
22
+ width: i.number().int().positive().optional().describe("Fixed width in px. Giving it turns measuring off.")
23
+ }).refine((e) => e.emphasis === void 0 || e.data.some((n) => t(n) === e.emphasis), {
24
+ message: "emphasis names no row: it must equal a datum's id or label",
25
+ path: ["emphasis"]
26
+ });
27
+ //#endregion
28
+ export { a as dumbbellDatumSchema, o as dumbbellQueueSchema };