@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.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +148 -2
- package/lib/charts/axes.js +5 -0
- package/lib/charts/basics/candlestick.data.js +44 -0
- package/lib/charts/basics/candlestick.js +180 -0
- package/lib/charts/basics/daily-empty.js +24 -0
- package/lib/charts/basics/daily-readings.js +16 -0
- package/lib/charts/basics/dot-heat.data.js +225 -0
- package/lib/charts/basics/dot-heat.js +174 -0
- package/lib/charts/basics/dumbbell-queue.js +203 -0
- package/lib/charts/basics/hairline-area.js +208 -0
- package/lib/charts/basics/hairline-line.js +195 -0
- package/lib/charts/basics/nested-treemap.data.js +55 -0
- package/lib/charts/basics/nested-treemap.js +191 -0
- package/lib/charts/basics/paired-rungs.data.js +31 -0
- package/lib/charts/basics/paired-rungs.js +151 -0
- package/lib/charts/basics/plumb-scatter.js +229 -0
- package/lib/charts/basics/rung-bars.js +178 -0
- package/lib/charts/basics/rung-geometry.js +6 -0
- package/lib/charts/basics/rung-histogram.data.js +73 -0
- package/lib/charts/basics/rung-histogram.js +153 -0
- package/lib/charts/basics/rung-waterfall.data.js +30 -0
- package/lib/charts/basics/rung-waterfall.js +150 -0
- package/lib/charts/basics/rungs.js +22 -0
- package/lib/charts/basics/series-key.js +26 -0
- package/lib/charts/basics/stacked-rungs.data.js +42 -0
- package/lib/charts/basics/stacked-rungs.js +174 -0
- package/lib/charts/basics/stream-ribbon.data.js +124 -0
- package/lib/charts/basics/stream-ribbon.js +336 -0
- package/lib/charts/basics/tick-box.data.js +50 -0
- package/lib/charts/basics/tick-box.js +226 -0
- package/lib/charts/basics/tick-donut.data.js +30 -0
- package/lib/charts/basics/tick-donut.js +210 -0
- package/lib/charts/basics/tick-gauge.data.js +8 -0
- package/lib/charts/basics/tick-gauge.js +169 -0
- package/lib/charts/basics/tick-rows.data.js +30 -0
- package/lib/charts/basics/tick-rows.js +121 -0
- package/lib/charts/basics/util-a.js +15 -0
- package/lib/charts/basics/util-b.js +13 -0
- package/lib/charts/big/circular-graph.data.js +827 -0
- package/lib/charts/big/circular-graph.js +289 -0
- package/lib/charts/big/force-galaxy-model.js +167 -0
- package/lib/charts/big/force-galaxy.data.js +813 -0
- package/lib/charts/big/force-galaxy.js +276 -0
- package/lib/charts/big/thread-triptych.data.js +204 -0
- package/lib/charts/big/thread-triptych.js +334 -0
- package/lib/charts/board/room.js +6 -0
- package/lib/charts/board/slope.js +176 -0
- package/lib/charts/board/spread.js +28 -0
- package/lib/charts/control.js +18 -0
- package/lib/charts/core.js +84 -0
- package/lib/charts/data-table.js +34 -0
- package/lib/charts/fills.js +153 -0
- package/lib/charts/forms/area-difference.data.js +62 -0
- package/lib/charts/forms/area-difference.js +192 -0
- package/lib/charts/forms/brush-math.js +42 -0
- package/lib/charts/forms/brush-strip.js +199 -0
- package/lib/charts/forms/brushed-overview.data.js +374 -0
- package/lib/charts/forms/brushed-overview.js +162 -0
- package/lib/charts/forms/chord-ring.data.js +140 -0
- package/lib/charts/forms/chord-ring.js +167 -0
- package/lib/charts/forms/circle-pack.data.js +80 -0
- package/lib/charts/forms/circle-pack.js +99 -0
- package/lib/charts/forms/hatched-stack.data.js +71 -0
- package/lib/charts/forms/hatched-stack.js +228 -0
- package/lib/charts/forms/radial-year.data.js +13 -0
- package/lib/charts/forms/radial-year.js +156 -0
- package/lib/charts/frame.js +73 -0
- package/lib/charts/glance/aggregate-sankey.data.js +74 -0
- package/lib/charts/glance/aggregate-sankey.js +242 -0
- package/lib/charts/glance/bar-race.data.js +122 -0
- package/lib/charts/glance/bar-race.js +246 -0
- package/lib/charts/glance/big-slice.data.js +41 -0
- package/lib/charts/glance/big-slice.js +238 -0
- package/lib/charts/glance/chunky-bars.data.js +22 -0
- package/lib/charts/glance/chunky-bars.js +113 -0
- package/lib/charts/glance/circular-graph.data.js +146 -0
- package/lib/charts/glance/circular-graph.js +138 -0
- package/lib/charts/glance/control-slot.js +9 -0
- package/lib/charts/glance/diverging-bar.data.js +34 -0
- package/lib/charts/glance/diverging-bar.js +154 -0
- package/lib/charts/glance/dot-waffle.data.js +26 -0
- package/lib/charts/glance/dot-waffle.js +179 -0
- package/lib/charts/glance/draw-in.data.js +9 -0
- package/lib/charts/glance/draw-in.goals.json.js +289 -0
- package/lib/charts/glance/draw-in.js +214 -0
- package/lib/charts/glance/dynamic-stream.data.js +6 -0
- package/lib/charts/glance/dynamic-stream.js +189 -0
- package/lib/charts/glance/force-graph.data.js +77 -0
- package/lib/charts/glance/force-graph.js +211 -0
- package/lib/charts/glance/jitter-strip.data.js +10 -0
- package/lib/charts/glance/jitter-strip.easter.json.js +430 -0
- package/lib/charts/glance/jitter-strip.js +157 -0
- package/lib/charts/glance/link-bundle.js +51 -0
- package/lib/charts/glance/matrix-heat-glance.data.js +108 -0
- package/lib/charts/glance/matrix-heat-glance.js +170 -0
- package/lib/charts/glance/pictorial-bar.data.js +22 -0
- package/lib/charts/glance/pictorial-bar.js +180 -0
- package/lib/charts/glance/rainfall-dual-area.data.js +177 -0
- package/lib/charts/glance/rainfall-dual-area.js +192 -0
- package/lib/charts/glance/rank-strip.data.js +76 -0
- package/lib/charts/glance/rank-strip.js +172 -0
- package/lib/charts/glance/scatter-labels.js +60 -0
- package/lib/charts/glance/scatter-morph.data.js +78 -0
- package/lib/charts/glance/scatter-morph.js +338 -0
- package/lib/charts/glance/single-axis.data.js +6 -0
- package/lib/charts/glance/single-axis.js +150 -0
- package/lib/charts/glance/single-axis.tides.json.js +180 -0
- package/lib/charts/glance/stagger-wave.data.js +66 -0
- package/lib/charts/glance/stagger-wave.js +132 -0
- package/lib/charts/glance/tree-lr.data.js +41 -0
- package/lib/charts/glance/tree-lr.js +135 -0
- package/lib/charts/glance/util-a.js +49 -0
- package/lib/charts/glance/util-b.js +19 -0
- package/lib/charts/glance/violin.data.js +9 -0
- package/lib/charts/glance/violin.js +185 -0
- package/lib/charts/glance/violin.tenors.json.js +5 -0
- package/lib/charts/hooks.js +154 -0
- package/lib/charts/hover.js +19 -0
- package/lib/charts/lupi/arc-matrix.data.js +83 -0
- package/lib/charts/lupi/arc-matrix.js +146 -0
- package/lib/charts/lupi/ballot-tally.data.js +22 -0
- package/lib/charts/lupi/ballot-tally.js +125 -0
- package/lib/charts/lupi/barcode-lollipop.data.js +195 -0
- package/lib/charts/lupi/barcode-lollipop.js +161 -0
- package/lib/charts/lupi/brand-spectrum.data.js +70 -0
- package/lib/charts/lupi/brand-spectrum.js +233 -0
- package/lib/charts/lupi/bubble-almanac.data.js +689 -0
- package/lib/charts/lupi/bubble-almanac.js +164 -0
- package/lib/charts/lupi/calendar-heat.data.js +399 -0
- package/lib/charts/lupi/calendar-heat.js +175 -0
- package/lib/charts/lupi/cluster-field.data.js +83 -0
- package/lib/charts/lupi/cluster-field.js +173 -0
- package/lib/charts/lupi/dot-cascade.data.js +54 -0
- package/lib/charts/lupi/dot-cascade.js +124 -0
- package/lib/charts/lupi/dotty-matrix.data.js +170 -0
- package/lib/charts/lupi/dotty-matrix.js +126 -0
- package/lib/charts/lupi/hourglass-stream.data.js +30 -0
- package/lib/charts/lupi/hourglass-stream.js +158 -0
- package/lib/charts/lupi/hundred-field.data.js +38 -0
- package/lib/charts/lupi/hundred-field.js +237 -0
- package/lib/charts/lupi/launch-fan.data.js +315 -0
- package/lib/charts/lupi/launch-fan.js +198 -0
- package/lib/charts/lupi/matrix-heat.data.js +97 -0
- package/lib/charts/lupi/matrix-heat.js +246 -0
- package/lib/charts/lupi/parallel-coordinates.data.js +54 -0
- package/lib/charts/lupi/parallel-coordinates.js +218 -0
- package/lib/charts/lupi/radial-convergence.data.js +178 -0
- package/lib/charts/lupi/radial-convergence.js +208 -0
- package/lib/charts/lupi/radial-patchwork.data.js +454 -0
- package/lib/charts/lupi/radial-patchwork.js +181 -0
- package/lib/charts/lupi/ridgeline.data.js +1834 -0
- package/lib/charts/lupi/ridgeline.js +195 -0
- package/lib/charts/lupi/trend-lineage.data.js +51 -0
- package/lib/charts/lupi/trend-lineage.js +198 -0
- package/lib/charts/lupi/type-colonnade.data.js +18 -0
- package/lib/charts/lupi/type-colonnade.js +198 -0
- package/lib/charts/lupi/util-a.js +14 -0
- package/lib/charts/lupi/util-b.js +12 -0
- package/lib/charts/maps/choropleth.js +295 -0
- package/lib/charts/maps/geo.js +84 -0
- package/lib/charts/maps/legend.js +83 -0
- package/lib/charts/maps/step-fill.js +9 -0
- package/lib/charts/maps/us-choropleth.data.js +249 -0
- package/lib/charts/maps/us-choropleth.js +41 -0
- package/lib/charts/maps/world-choropleth.data.js +681 -0
- package/lib/charts/maps/world-choropleth.js +46 -0
- package/lib/charts/markers.js +35 -0
- package/lib/charts/marks.js +31 -0
- package/lib/charts/motion.js +11 -0
- package/lib/charts/originals/daily-users.data.js +101 -0
- package/lib/charts/originals/daily-users.js +203 -0
- package/lib/charts/originals/feature-rank.data.js +92 -0
- package/lib/charts/originals/feature-rank.js +167 -0
- package/lib/charts/originals/format.js +5 -0
- package/lib/charts/originals/key.js +26 -0
- package/lib/charts/originals/response-time.data.js +98 -0
- package/lib/charts/originals/response-time.js +187 -0
- package/lib/charts/originals/revenue-by-plan.data.js +26 -0
- package/lib/charts/originals/revenue-by-plan.js +248 -0
- package/lib/charts/playback.js +68 -0
- package/lib/charts/plot-note.js +27 -0
- package/lib/charts/roles.js +5 -0
- package/lib/charts/rules.js +66 -0
- package/lib/charts/scale-context.js +6 -0
- package/lib/charts/shapes.js +8 -0
- package/lib/charts/shared-options.js +25 -0
- package/lib/charts/svg.js +43 -0
- package/lib/charts/text.js +30 -0
- package/lib/charts/texture-ids.js +20 -0
- package/lib/charts/texture.js +286 -0
- package/lib/charts/util.js +43 -0
- package/lib/charts/value-grid.js +26 -0
- package/lib/draw.js +27 -0
- package/lib/entries/dumbbell-queue.js +2 -0
- package/lib/entries/hairline-area.js +2 -0
- package/lib/entries/hairline-line.js +2 -0
- package/lib/entries/plumb-scatter.js +2 -0
- package/lib/entries/rung-bars.js +2 -0
- package/lib/entries/slope.js +2 -0
- package/lib/frame.js +2 -0
- package/lib/hairline.css +1385 -0
- package/lib/index.js +72 -0
- package/lib/json-schema/dumbbell-queue.json +258 -0
- package/lib/json-schema/hairline-area.json +262 -0
- package/lib/json-schema/hairline-line.json +256 -0
- package/lib/json-schema/index.json +50 -0
- package/lib/json-schema/plumb-scatter.json +363 -0
- package/lib/json-schema/rung-bars.json +230 -0
- package/lib/json-schema/slope.json +333 -0
- package/lib/kit.js +16 -0
- package/lib/lib/format.js +29 -0
- package/lib/lib/random.js +8 -0
- package/lib/maps.js +4 -0
- package/lib/schema/daily.js +9 -0
- package/lib/schema/dumbbell-queue.js +28 -0
- package/lib/schema/format.js +72 -0
- package/lib/schema/hairline-area.js +24 -0
- package/lib/schema/hairline-line.js +23 -0
- package/lib/schema/key.js +4 -0
- package/lib/schema/metrics.js +26 -0
- package/lib/schema/motion.js +12 -0
- package/lib/schema/options.js +21 -0
- package/lib/schema/plumb-scatter.js +48 -0
- package/lib/schema/registry.js +132 -0
- package/lib/schema/rung-bars.js +25 -0
- package/lib/schema/scale.js +9 -0
- package/lib/schema/slope.js +28 -0
- package/lib/schema/validate.js +25 -0
- package/lib/schema.js +16 -0
- package/lib/theme/derive.js +98 -0
- package/lib/theme.css +443 -0
- package/lib/theme.js +1 -0
- package/lib/tokens.css +306 -0
- package/lib/types/charts/axes.d.ts +14 -0
- package/lib/types/charts/basics/candlestick.d.ts +22 -0
- package/lib/types/charts/basics/candlestick.data.d.ts +10 -0
- package/lib/types/charts/basics/daily-empty.d.ts +7 -0
- package/lib/types/charts/basics/daily-readings.d.ts +38 -0
- package/lib/types/charts/basics/dot-heat.d.ts +19 -0
- package/lib/types/charts/basics/dot-heat.data.d.ts +28 -0
- package/lib/types/charts/basics/dumbbell-queue.d.ts +15 -0
- package/lib/types/charts/basics/hairline-area.d.ts +18 -0
- package/lib/types/charts/basics/hairline-line.d.ts +18 -0
- package/lib/types/charts/basics/nested-treemap.d.ts +18 -0
- package/lib/types/charts/basics/nested-treemap.data.d.ts +30 -0
- package/lib/types/charts/basics/paired-rungs.d.ts +21 -0
- package/lib/types/charts/basics/paired-rungs.data.d.ts +43 -0
- package/lib/types/charts/basics/plumb-scatter.d.ts +14 -0
- package/lib/types/charts/basics/rung-bars.d.ts +16 -0
- package/lib/types/charts/basics/rung-geometry.d.ts +6 -0
- package/lib/types/charts/basics/rung-histogram.d.ts +22 -0
- package/lib/types/charts/basics/rung-histogram.data.d.ts +34 -0
- package/lib/types/charts/basics/rung-waterfall.d.ts +19 -0
- package/lib/types/charts/basics/rung-waterfall.data.d.ts +31 -0
- package/lib/types/charts/basics/rungs.d.ts +28 -0
- package/lib/types/charts/basics/series-key.d.ts +19 -0
- package/lib/types/charts/basics/stacked-rungs.d.ts +20 -0
- package/lib/types/charts/basics/stacked-rungs.data.d.ts +26 -0
- package/lib/types/charts/basics/stream-ribbon.d.ts +19 -0
- package/lib/types/charts/basics/stream-ribbon.data.d.ts +29 -0
- package/lib/types/charts/basics/tick-box.d.ts +19 -0
- package/lib/types/charts/basics/tick-box.data.d.ts +30 -0
- package/lib/types/charts/basics/tick-donut.d.ts +24 -0
- package/lib/types/charts/basics/tick-donut.data.d.ts +25 -0
- package/lib/types/charts/basics/tick-gauge.d.ts +22 -0
- package/lib/types/charts/basics/tick-gauge.data.d.ts +24 -0
- package/lib/types/charts/basics/tick-rows.d.ts +18 -0
- package/lib/types/charts/basics/tick-rows.data.d.ts +23 -0
- package/lib/types/charts/basics/util-a.d.ts +10 -0
- package/lib/types/charts/basics/util-b.d.ts +13 -0
- package/lib/types/charts/big/circular-graph.d.ts +20 -0
- package/lib/types/charts/big/circular-graph.data.d.ts +46 -0
- package/lib/types/charts/big/force-galaxy-model.d.ts +109 -0
- package/lib/types/charts/big/force-galaxy.d.ts +18 -0
- package/lib/types/charts/big/force-galaxy.data.d.ts +48 -0
- package/lib/types/charts/big/thread-triptych.d.ts +17 -0
- package/lib/types/charts/big/thread-triptych.data.d.ts +41 -0
- package/lib/types/charts/board/room.d.ts +18 -0
- package/lib/types/charts/board/slope.d.ts +14 -0
- package/lib/types/charts/board/spread.d.ts +5 -0
- package/lib/types/charts/control.d.ts +17 -0
- package/lib/types/charts/core.d.ts +77 -0
- package/lib/types/charts/data-table.d.ts +18 -0
- package/lib/types/charts/fills.d.ts +103 -0
- package/lib/types/charts/forms/area-difference.d.ts +9 -0
- package/lib/types/charts/forms/area-difference.data.d.ts +26 -0
- package/lib/types/charts/forms/brush-math.d.ts +19 -0
- package/lib/types/charts/forms/brush-strip.d.ts +19 -0
- package/lib/types/charts/forms/brushed-overview.d.ts +12 -0
- package/lib/types/charts/forms/brushed-overview.data.d.ts +16 -0
- package/lib/types/charts/forms/chord-ring.d.ts +12 -0
- package/lib/types/charts/forms/chord-ring.data.d.ts +29 -0
- package/lib/types/charts/forms/circle-pack.d.ts +9 -0
- package/lib/types/charts/forms/circle-pack.data.d.ts +23 -0
- package/lib/types/charts/forms/hatched-stack.d.ts +10 -0
- package/lib/types/charts/forms/hatched-stack.data.d.ts +36 -0
- package/lib/types/charts/forms/radial-year.d.ts +8 -0
- package/lib/types/charts/forms/radial-year.data.d.ts +17 -0
- package/lib/types/charts/frame.d.ts +21 -0
- package/lib/types/charts/glance/aggregate-sankey.d.ts +23 -0
- package/lib/types/charts/glance/aggregate-sankey.data.d.ts +32 -0
- package/lib/types/charts/glance/bar-race.d.ts +20 -0
- package/lib/types/charts/glance/bar-race.data.d.ts +32 -0
- package/lib/types/charts/glance/big-slice.d.ts +27 -0
- package/lib/types/charts/glance/big-slice.data.d.ts +30 -0
- package/lib/types/charts/glance/chunky-bars.d.ts +18 -0
- package/lib/types/charts/glance/chunky-bars.data.d.ts +24 -0
- package/lib/types/charts/glance/circular-graph.d.ts +19 -0
- package/lib/types/charts/glance/circular-graph.data.d.ts +43 -0
- package/lib/types/charts/glance/control-slot.d.ts +9 -0
- package/lib/types/charts/glance/diverging-bar.d.ts +19 -0
- package/lib/types/charts/glance/diverging-bar.data.d.ts +27 -0
- package/lib/types/charts/glance/dot-waffle.d.ts +19 -0
- package/lib/types/charts/glance/dot-waffle.data.d.ts +31 -0
- package/lib/types/charts/glance/draw-in.d.ts +20 -0
- package/lib/types/charts/glance/draw-in.data.d.ts +6 -0
- package/lib/types/charts/glance/dynamic-stream.d.ts +22 -0
- package/lib/types/charts/glance/dynamic-stream.data.d.ts +7 -0
- package/lib/types/charts/glance/force-graph.d.ts +16 -0
- package/lib/types/charts/glance/force-graph.data.d.ts +45 -0
- package/lib/types/charts/glance/jitter-strip.d.ts +24 -0
- package/lib/types/charts/glance/jitter-strip.data.d.ts +27 -0
- package/lib/types/charts/glance/link-bundle.d.ts +22 -0
- package/lib/types/charts/glance/matrix-heat-glance.d.ts +22 -0
- package/lib/types/charts/glance/matrix-heat-glance.data.d.ts +35 -0
- package/lib/types/charts/glance/pictorial-bar.d.ts +20 -0
- package/lib/types/charts/glance/pictorial-bar.data.d.ts +27 -0
- package/lib/types/charts/glance/rainfall-dual-area.d.ts +19 -0
- package/lib/types/charts/glance/rainfall-dual-area.data.d.ts +32 -0
- package/lib/types/charts/glance/rank-strip.d.ts +19 -0
- package/lib/types/charts/glance/rank-strip.data.d.ts +36 -0
- package/lib/types/charts/glance/scatter-labels.d.ts +23 -0
- package/lib/types/charts/glance/scatter-morph.d.ts +22 -0
- package/lib/types/charts/glance/scatter-morph.data.d.ts +30 -0
- package/lib/types/charts/glance/single-axis.d.ts +27 -0
- package/lib/types/charts/glance/single-axis.data.d.ts +6 -0
- package/lib/types/charts/glance/stagger-wave.d.ts +18 -0
- package/lib/types/charts/glance/stagger-wave.data.d.ts +26 -0
- package/lib/types/charts/glance/tree-lr.d.ts +16 -0
- package/lib/types/charts/glance/tree-lr.data.d.ts +27 -0
- package/lib/types/charts/glance/util-a.d.ts +31 -0
- package/lib/types/charts/glance/util-b.d.ts +12 -0
- package/lib/types/charts/glance/violin.d.ts +22 -0
- package/lib/types/charts/glance/violin.data.d.ts +24 -0
- package/lib/types/charts/hooks.d.ts +109 -0
- package/lib/types/charts/hover.d.ts +26 -0
- package/lib/types/charts/lupi/arc-matrix.d.ts +18 -0
- package/lib/types/charts/lupi/arc-matrix.data.d.ts +28 -0
- package/lib/types/charts/lupi/ballot-tally.d.ts +19 -0
- package/lib/types/charts/lupi/ballot-tally.data.d.ts +28 -0
- package/lib/types/charts/lupi/barcode-lollipop.d.ts +19 -0
- package/lib/types/charts/lupi/barcode-lollipop.data.d.ts +26 -0
- package/lib/types/charts/lupi/brand-spectrum.d.ts +28 -0
- package/lib/types/charts/lupi/brand-spectrum.data.d.ts +34 -0
- package/lib/types/charts/lupi/bubble-almanac.d.ts +22 -0
- package/lib/types/charts/lupi/bubble-almanac.data.d.ts +45 -0
- package/lib/types/charts/lupi/calendar-heat.d.ts +19 -0
- package/lib/types/charts/lupi/calendar-heat.data.d.ts +20 -0
- package/lib/types/charts/lupi/cluster-field.d.ts +21 -0
- package/lib/types/charts/lupi/cluster-field.data.d.ts +52 -0
- package/lib/types/charts/lupi/dot-cascade.d.ts +22 -0
- package/lib/types/charts/lupi/dot-cascade.data.d.ts +24 -0
- package/lib/types/charts/lupi/dotty-matrix.d.ts +17 -0
- package/lib/types/charts/lupi/dotty-matrix.data.d.ts +32 -0
- package/lib/types/charts/lupi/hourglass-stream.d.ts +18 -0
- package/lib/types/charts/lupi/hourglass-stream.data.d.ts +27 -0
- package/lib/types/charts/lupi/hundred-field.d.ts +18 -0
- package/lib/types/charts/lupi/hundred-field.data.d.ts +24 -0
- package/lib/types/charts/lupi/launch-fan.d.ts +37 -0
- package/lib/types/charts/lupi/launch-fan.data.d.ts +41 -0
- package/lib/types/charts/lupi/matrix-heat.d.ts +20 -0
- package/lib/types/charts/lupi/matrix-heat.data.d.ts +29 -0
- package/lib/types/charts/lupi/parallel-coordinates.d.ts +23 -0
- package/lib/types/charts/lupi/parallel-coordinates.data.d.ts +40 -0
- package/lib/types/charts/lupi/radial-convergence.d.ts +15 -0
- package/lib/types/charts/lupi/radial-convergence.data.d.ts +24 -0
- package/lib/types/charts/lupi/radial-patchwork.d.ts +16 -0
- package/lib/types/charts/lupi/radial-patchwork.data.d.ts +35 -0
- package/lib/types/charts/lupi/ridgeline.d.ts +23 -0
- package/lib/types/charts/lupi/ridgeline.data.d.ts +19 -0
- package/lib/types/charts/lupi/trend-lineage.d.ts +18 -0
- package/lib/types/charts/lupi/trend-lineage.data.d.ts +56 -0
- package/lib/types/charts/lupi/type-colonnade.d.ts +20 -0
- package/lib/types/charts/lupi/type-colonnade.data.d.ts +30 -0
- package/lib/types/charts/lupi/util-a.d.ts +9 -0
- package/lib/types/charts/lupi/util-b.d.ts +11 -0
- package/lib/types/charts/maps/choropleth.d.ts +33 -0
- package/lib/types/charts/maps/geo.d.ts +48 -0
- package/lib/types/charts/maps/legend.d.ts +14 -0
- package/lib/types/charts/maps/step-fill.d.ts +6 -0
- package/lib/types/charts/maps/us-choropleth.d.ts +25 -0
- package/lib/types/charts/maps/us-choropleth.data.d.ts +23 -0
- package/lib/types/charts/maps/world-choropleth.d.ts +22 -0
- package/lib/types/charts/maps/world-choropleth.data.d.ts +35 -0
- package/lib/types/charts/markers.d.ts +42 -0
- package/lib/types/charts/marks.d.ts +58 -0
- package/lib/types/charts/motion.d.ts +12 -0
- package/lib/types/charts/originals/daily-users.d.ts +13 -0
- package/lib/types/charts/originals/daily-users.data.d.ts +17 -0
- package/lib/types/charts/originals/feature-rank.d.ts +13 -0
- package/lib/types/charts/originals/feature-rank.data.d.ts +29 -0
- package/lib/types/charts/originals/format.d.ts +2 -0
- package/lib/types/charts/originals/key.d.ts +16 -0
- package/lib/types/charts/originals/response-time.d.ts +11 -0
- package/lib/types/charts/originals/response-time.data.d.ts +24 -0
- package/lib/types/charts/originals/revenue-by-plan.d.ts +12 -0
- package/lib/types/charts/originals/revenue-by-plan.data.d.ts +26 -0
- package/lib/types/charts/playback.d.ts +42 -0
- package/lib/types/charts/plot-note.d.ts +37 -0
- package/lib/types/charts/roles.d.ts +28 -0
- package/lib/types/charts/rules.d.ts +62 -0
- package/lib/types/charts/scale-context.d.ts +3 -0
- package/lib/types/charts/shapes.d.ts +9 -0
- package/lib/types/charts/shared-options.d.ts +25 -0
- package/lib/types/charts/svg.d.ts +24 -0
- package/lib/types/charts/text.d.ts +36 -0
- package/lib/types/charts/texture-ids.d.ts +24 -0
- package/lib/types/charts/texture.d.ts +185 -0
- package/lib/types/charts/util.d.ts +66 -0
- package/lib/types/charts/value-grid.d.ts +22 -0
- package/lib/types/draw.d.ts +279 -0
- package/lib/types/entries/dumbbell-queue.d.ts +2 -0
- package/lib/types/entries/hairline-area.d.ts +2 -0
- package/lib/types/entries/hairline-line.d.ts +2 -0
- package/lib/types/entries/plumb-scatter.d.ts +2 -0
- package/lib/types/entries/rung-bars.d.ts +2 -0
- package/lib/types/entries/slope.d.ts +2 -0
- package/lib/types/frame.d.ts +2 -0
- package/lib/types/index.d.ts +82 -0
- package/lib/types/kit.d.ts +22 -0
- package/lib/types/lib/format.d.ts +58 -0
- package/lib/types/lib/random.d.ts +5 -0
- package/lib/types/maps.d.ts +2 -0
- package/lib/types/schema/daily.d.ts +14 -0
- package/lib/types/schema/dumbbell-queue.d.ts +91 -0
- package/lib/types/schema/format.d.ts +101 -0
- package/lib/types/schema/hairline-area.d.ts +83 -0
- package/lib/types/schema/hairline-line.d.ts +85 -0
- package/lib/types/schema/key.d.ts +12 -0
- package/lib/types/schema/metrics.d.ts +26 -0
- package/lib/types/schema/motion.d.ts +22 -0
- package/lib/types/schema/options.d.ts +51 -0
- package/lib/types/schema/plumb-scatter.d.ts +124 -0
- package/lib/types/schema/registry.d.ts +309 -0
- package/lib/types/schema/rung-bars.d.ts +84 -0
- package/lib/types/schema/scale.d.ts +36 -0
- package/lib/types/schema/slope.d.ts +120 -0
- package/lib/types/schema/validate.d.ts +29 -0
- package/lib/types/schema.d.ts +30 -0
- package/lib/types/theme/derive.d.ts +23 -0
- package/lib/types/theme.d.ts +2 -0
- package/lib/vendor/us-atlas/states-10m.json.js +13855 -0
- package/lib/vendor/world-atlas/countries-110m.json.js +9357 -0
- package/package.json +160 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export { Candlestick } from "./charts/basics/candlestick.js";
|
|
2
|
+
export { DotHeat } from "./charts/basics/dot-heat.js";
|
|
3
|
+
export { DumbbellQueue } from "./charts/basics/dumbbell-queue.js";
|
|
4
|
+
export { HairlineArea } from "./charts/basics/hairline-area.js";
|
|
5
|
+
export { HairlineLine } from "./charts/basics/hairline-line.js";
|
|
6
|
+
export { NestedTreemap } from "./charts/basics/nested-treemap.js";
|
|
7
|
+
export { PairedRungs } from "./charts/basics/paired-rungs.js";
|
|
8
|
+
export { PlumbScatter } from "./charts/basics/plumb-scatter.js";
|
|
9
|
+
export { RungBars } from "./charts/basics/rung-bars.js";
|
|
10
|
+
export { RungHistogram } from "./charts/basics/rung-histogram.js";
|
|
11
|
+
export { RungWaterfall } from "./charts/basics/rung-waterfall.js";
|
|
12
|
+
export { StackedRungs } from "./charts/basics/stacked-rungs.js";
|
|
13
|
+
export { StreamRibbon } from "./charts/basics/stream-ribbon.js";
|
|
14
|
+
export { TickBox } from "./charts/basics/tick-box.js";
|
|
15
|
+
export { TickDonut } from "./charts/basics/tick-donut.js";
|
|
16
|
+
export { TickGauge } from "./charts/basics/tick-gauge.js";
|
|
17
|
+
export { TickRows } from "./charts/basics/tick-rows.js";
|
|
18
|
+
export { CircularGraph as CircularBeadGraph } from "./charts/big/circular-graph.js";
|
|
19
|
+
export { ForceGalaxy } from "./charts/big/force-galaxy.js";
|
|
20
|
+
export { ThreadTriptych } from "./charts/big/thread-triptych.js";
|
|
21
|
+
export { Slope } from "./charts/board/slope.js";
|
|
22
|
+
export { AreaDifference } from "./charts/forms/area-difference.js";
|
|
23
|
+
export { BrushedOverview } from "./charts/forms/brushed-overview.js";
|
|
24
|
+
export { ChordRing } from "./charts/forms/chord-ring.js";
|
|
25
|
+
export { CirclePack } from "./charts/forms/circle-pack.js";
|
|
26
|
+
export { HatchedStack } from "./charts/forms/hatched-stack.js";
|
|
27
|
+
export { RadialYear } from "./charts/forms/radial-year.js";
|
|
28
|
+
export { AggregateSankey } from "./charts/glance/aggregate-sankey.js";
|
|
29
|
+
export { BarRace } from "./charts/glance/bar-race.js";
|
|
30
|
+
export { BigSlice } from "./charts/glance/big-slice.js";
|
|
31
|
+
export { ChunkyBars } from "./charts/glance/chunky-bars.js";
|
|
32
|
+
export { CircularGraph } from "./charts/glance/circular-graph.js";
|
|
33
|
+
export { DivergingBar } from "./charts/glance/diverging-bar.js";
|
|
34
|
+
export { DotWaffle } from "./charts/glance/dot-waffle.js";
|
|
35
|
+
export { DrawIn } from "./charts/glance/draw-in.js";
|
|
36
|
+
export { DynamicStream } from "./charts/glance/dynamic-stream.js";
|
|
37
|
+
export { ForceGraph } from "./charts/glance/force-graph.js";
|
|
38
|
+
export { JitterStrip } from "./charts/glance/jitter-strip.js";
|
|
39
|
+
export { MatrixHeatGlance } from "./charts/glance/matrix-heat-glance.js";
|
|
40
|
+
export { PictorialBar } from "./charts/glance/pictorial-bar.js";
|
|
41
|
+
export { RainfallDualArea } from "./charts/glance/rainfall-dual-area.js";
|
|
42
|
+
export { RankStrip } from "./charts/glance/rank-strip.js";
|
|
43
|
+
export { ScatterMorph } from "./charts/glance/scatter-morph.js";
|
|
44
|
+
export { SingleAxis } from "./charts/glance/single-axis.js";
|
|
45
|
+
export { StaggerWave } from "./charts/glance/stagger-wave.js";
|
|
46
|
+
export { TreeLR } from "./charts/glance/tree-lr.js";
|
|
47
|
+
export { Violin } from "./charts/glance/violin.js";
|
|
48
|
+
export { ArcMatrix } from "./charts/lupi/arc-matrix.js";
|
|
49
|
+
export { BallotTally } from "./charts/lupi/ballot-tally.js";
|
|
50
|
+
export { BarcodeLollipop } from "./charts/lupi/barcode-lollipop.js";
|
|
51
|
+
export { BrandSpectrum } from "./charts/lupi/brand-spectrum.js";
|
|
52
|
+
export { BubbleAlmanac } from "./charts/lupi/bubble-almanac.js";
|
|
53
|
+
export { CalendarHeat } from "./charts/lupi/calendar-heat.js";
|
|
54
|
+
export { ClusterField } from "./charts/lupi/cluster-field.js";
|
|
55
|
+
export { DotCascade } from "./charts/lupi/dot-cascade.js";
|
|
56
|
+
export { DottyMatrix } from "./charts/lupi/dotty-matrix.js";
|
|
57
|
+
export { HourglassStream } from "./charts/lupi/hourglass-stream.js";
|
|
58
|
+
export { HundredField } from "./charts/lupi/hundred-field.js";
|
|
59
|
+
export { LaunchFan } from "./charts/lupi/launch-fan.js";
|
|
60
|
+
export { MatrixHeat } from "./charts/lupi/matrix-heat.js";
|
|
61
|
+
export { ParallelCoordinates } from "./charts/lupi/parallel-coordinates.js";
|
|
62
|
+
export { RadialConvergence } from "./charts/lupi/radial-convergence.js";
|
|
63
|
+
export { RadialPatchwork } from "./charts/lupi/radial-patchwork.js";
|
|
64
|
+
export { Ridgeline } from "./charts/lupi/ridgeline.js";
|
|
65
|
+
export { TrendLineage } from "./charts/lupi/trend-lineage.js";
|
|
66
|
+
export { TypeColonnade } from "./charts/lupi/type-colonnade.js";
|
|
67
|
+
export { DailyUsers } from "./charts/originals/daily-users.js";
|
|
68
|
+
export { FeatureRank } from "./charts/originals/feature-rank.js";
|
|
69
|
+
export { ResponseTime } from "./charts/originals/response-time.js";
|
|
70
|
+
export { RevenueByPlan } from "./charts/originals/revenue-by-plan.js";
|
|
71
|
+
export type { DailyDatum } from "./schema/daily.js";
|
|
72
|
+
export type { DumbbellDatum, DumbbellQueueData, DumbbellQueueProps, } from "./schema/dumbbell-queue.js";
|
|
73
|
+
export type { HairlineAreaData, HairlineAreaProps, } from "./schema/hairline-area.js";
|
|
74
|
+
export type { HairlineLineData, HairlineLineProps, } from "./schema/hairline-line.js";
|
|
75
|
+
export type { Keyed } from "./schema/key.js";
|
|
76
|
+
export type { FontMetrics } from "./schema/metrics.js";
|
|
77
|
+
export type { MotionCallbacks } from "./schema/motion.js";
|
|
78
|
+
export type { NoteNames, NoteProps, SharedCallbacks } from "./schema/options.js";
|
|
79
|
+
export type { PlumbDatum, PlumbScatterData, PlumbScatterProps, } from "./schema/plumb-scatter.js";
|
|
80
|
+
export type { RungDatum, RungBarsData, RungBarsProps, } from "./schema/rung-bars.js";
|
|
81
|
+
export type { ScaleOptions } from "./schema/scale.js";
|
|
82
|
+
export type { SlopeRow, SlopeData, SlopeProps } from "./schema/slope.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { phase, crisp } from "./charts/axes.js";
|
|
2
|
+
export type { Margin, TickMark } from "./charts/axes.js";
|
|
3
|
+
export { Chart, Plot, Tooltip, SplitClips } from "./charts/core.js";
|
|
4
|
+
export type { LegendItem } from "./charts/core.js";
|
|
5
|
+
export { FILL_TONES, FILL_FAMILIES, FILL_LADDERS, toneClass, } from "./charts/fills.js";
|
|
6
|
+
export type { FillTone, FillFamily } from "./charts/fills.js";
|
|
7
|
+
export { useMeasure, useReveal, useMotionPreference, useReducedMotion, IdScope, useSvgId, useEntry, useScrub, useHover, } from "./charts/hooks.js";
|
|
8
|
+
export type { Animate, Sync, HoverAt, Hover } from "./charts/hooks.js";
|
|
9
|
+
export { DimGroup, HitRect, HitCircle, HitPath, TipText } from "./charts/hover.js";
|
|
10
|
+
export { Dot, Ring, Bar } from "./charts/markers.js";
|
|
11
|
+
export { DOT, RING_WEIGHT, TICK, MARK_WEIGHT, STEM, LABEL_TICK, RING_STEP, KEY, } from "./charts/marks.js";
|
|
12
|
+
export type { DotSize, RingWeight, TickSize } from "./charts/marks.js";
|
|
13
|
+
export { easeTravel, DURATION } from "./charts/motion.js";
|
|
14
|
+
export type { StaggerTier } from "./charts/motion.js";
|
|
15
|
+
export { PlotNote, FootNote } from "./charts/plot-note.js";
|
|
16
|
+
export { HRule, VRule, Stem, Tick, HGrid, VGrid, Cursor } from "./charts/rules.js";
|
|
17
|
+
export type { RuleKind } from "./charts/rules.js";
|
|
18
|
+
export { ChartSvg } from "./charts/svg.js";
|
|
19
|
+
export { Label, XLabels } from "./charts/text.js";
|
|
20
|
+
export type { Voice } from "./charts/text.js";
|
|
21
|
+
export { Hatch, CrossHatch, Rules, Stipple, DotScreen, Beads, DottedLine, DotRing, DottedPath, PixelLine, KeySwatch, EngravedRect, PlateLabel, } from "./charts/texture.js";
|
|
22
|
+
export { TEXTURE_PITCH, HALFTONE_R, paint, useTextureIds, } from "./charts/texture-ids.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const fmtInt: (n: number | {
|
|
2
|
+
valueOf(): number;
|
|
3
|
+
}) => string;
|
|
4
|
+
/** Thousands-grouped, to a fixed number of decimals. */
|
|
5
|
+
export declare const fixedFormat: (decimals: number) => (n: number | {
|
|
6
|
+
valueOf(): number;
|
|
7
|
+
}) => string;
|
|
8
|
+
/**
|
|
9
|
+
* A value axis's labels: the chart's format, or, when it is the default whole
|
|
10
|
+
* number, one with just the decimals the ticks need, so a narrow range does
|
|
11
|
+
* not print 8, 8, 7, 7 and a tick at 0.25 does not round to 0.3.
|
|
12
|
+
*/
|
|
13
|
+
export declare const axisFormat: (fmt: (v: number) => string, whole: boolean, ticks: number[]) => (v: number) => string;
|
|
14
|
+
export declare const fmtMs: (v: number) => string;
|
|
15
|
+
export declare const fmtK: (v: number) => string;
|
|
16
|
+
export declare const fmtKInt: (v: number) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Money in the house style: lowercase k and m, no space, and only the decimals
|
|
19
|
+
* the magnitude needs ($940, $512k, $8.92m, $18.4m). Every chart uses this.
|
|
20
|
+
*/
|
|
21
|
+
export declare const fmtMoney: (v: number) => string;
|
|
22
|
+
/** A price to the cent, in the same house style ($21.30, −$0.45). */
|
|
23
|
+
export declare const fmtPrice: (v: number) => string;
|
|
24
|
+
/** Signed percent with a true minus sign: +4%, −10%, 0%. */
|
|
25
|
+
export declare const fmtSignedPct: (v: number, digits?: number) => string;
|
|
26
|
+
/** Signed delta with a true minus sign: +31 ms, −41 ms. */
|
|
27
|
+
export declare const fmtSignedMs: (v: number) => string;
|
|
28
|
+
export declare const fmtMonth: (d: Date) => string;
|
|
29
|
+
export declare const fmtDay: (d: Date) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Month ticks in the broadsheet style: the year is printed on the first tick
|
|
32
|
+
* and wherever it changes, nowhere else ("Jul 2024 · Jan 2025 · Jul · Jan 2026").
|
|
33
|
+
*/
|
|
34
|
+
export declare const monthTickLabels: (dates: readonly Date[]) => string[];
|
|
35
|
+
/**
|
|
36
|
+
* Year ticks in the broadsheet style: the first year in full and later years
|
|
37
|
+
* abbreviated, except at a new century ("2000 05 10 15").
|
|
38
|
+
*/
|
|
39
|
+
export declare const yearTickLabels: (dates: readonly Date[]) => string[];
|
|
40
|
+
/**
|
|
41
|
+
* Day ticks in the broadsheet style: the month is printed on the first tick
|
|
42
|
+
* and wherever it changes, nowhere else ("24 Aug · 31 · 7 Sep · 14").
|
|
43
|
+
*/
|
|
44
|
+
export declare const dayTickLabels: (dates: readonly Date[]) => string[];
|
|
45
|
+
/** Temperature in degrees Celsius to one decimal place ("12.3 °C", "−2.2 °C"). */
|
|
46
|
+
export declare const fmtDegC: (v: number) => string;
|
|
47
|
+
/** Mains frequency as published, to three decimal places ("49.275 Hz"). */
|
|
48
|
+
export declare const fmtHz: (v: number) => string;
|
|
49
|
+
/** Carbon intensity, grams of CO₂ per kilowatt hour, whole grams ("142 g/kWh"). */
|
|
50
|
+
export declare const fmtGCO2: (v: number) => string;
|
|
51
|
+
/** Signed change in carbon intensity with a true minus sign ("−85 g/kWh", "+12 g/kWh"). */
|
|
52
|
+
export declare const fmtSignedGCO2: (v: number) => string;
|
|
53
|
+
/** Energy in gigawatt hours, whole ("3,521 GWh"). */
|
|
54
|
+
export declare const fmtGWh: (v: number) => string;
|
|
55
|
+
/** Energy in terawatt hours (the input is TWh), to one decimal place ("87.4 TWh"). */
|
|
56
|
+
export declare const fmtTWh: (v: number) => string;
|
|
57
|
+
/** A count with its noun: "1 bar", "3 bars". */
|
|
58
|
+
export declare const plural: (n: number, noun: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const mulberry32: (seed: number) => () => number;
|
|
2
|
+
/** Stable value in [0, 1) for a pair of integers. */
|
|
3
|
+
export declare const rnd: (i: number, k?: number) => number;
|
|
4
|
+
/** Stable value in [-1, 1). */
|
|
5
|
+
export declare const rndSigned: (i: number, k?: number) => number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A calendar day ("2024-03-04") or an instant ("2024-03-04T09:00:00Z"). */
|
|
3
|
+
export declare const isoDateSchema: z.ZodUnion<readonly [z.ZodISODate, z.ZodISODateTime]>;
|
|
4
|
+
/**
|
|
5
|
+
* One reading. `value` is null (or, from TypeScript, NaN or infinite) for a
|
|
6
|
+
* day with no reading: the chart draws a gap there, not a zero.
|
|
7
|
+
*/
|
|
8
|
+
export declare const dailyDatumSchema: z.ZodObject<{
|
|
9
|
+
date: z.ZodUnion<readonly [z.ZodISODate, z.ZodISODateTime]>;
|
|
10
|
+
id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
/** One reading. */
|
|
14
|
+
export type DailyDatum = z.infer<typeof dailyDatumSchema>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { FormatInput } from "./format.js";
|
|
3
|
+
import type { NoteProps, SharedCallbacks } from "./options.js";
|
|
4
|
+
/** One row: a label, the value before and the value after. */
|
|
5
|
+
export declare const dumbbellDatumSchema: z.ZodObject<{
|
|
6
|
+
after: z.ZodNumber;
|
|
7
|
+
before: z.ZodNumber;
|
|
8
|
+
id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
label: z.ZodString;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export declare const dumbbellQueueSchema: z.ZodObject<{
|
|
12
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
mount: "mount";
|
|
14
|
+
off: "off";
|
|
15
|
+
scroll: "scroll";
|
|
16
|
+
}>>;
|
|
17
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
18
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
device: "device";
|
|
22
|
+
proportional: "proportional";
|
|
23
|
+
}>>;
|
|
24
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
25
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
27
|
+
fallback: z.ZodNumber;
|
|
28
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
table: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
title: z.ZodOptional<z.ZodString>;
|
|
32
|
+
note: z.ZodOptional<z.ZodString>;
|
|
33
|
+
unitNote: z.ZodOptional<z.ZodString>;
|
|
34
|
+
alert: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
fall: "fall";
|
|
36
|
+
rise: "rise";
|
|
37
|
+
}>>;
|
|
38
|
+
data: z.ZodArray<z.ZodObject<{
|
|
39
|
+
after: z.ZodNumber;
|
|
40
|
+
before: z.ZodNumber;
|
|
41
|
+
id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
}, z.core.$strict>>;
|
|
44
|
+
emphasis: z.ZodOptional<z.ZodString>;
|
|
45
|
+
ends: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
46
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
47
|
+
compact: "compact";
|
|
48
|
+
decimal: "decimal";
|
|
49
|
+
integer: "integer";
|
|
50
|
+
percent: "percent";
|
|
51
|
+
}>, z.ZodObject<{
|
|
52
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
long: "long";
|
|
54
|
+
short: "short";
|
|
55
|
+
}>>;
|
|
56
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
57
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
58
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
compact: "compact";
|
|
62
|
+
standard: "standard";
|
|
63
|
+
}>>;
|
|
64
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
always: "always";
|
|
66
|
+
auto: "auto";
|
|
67
|
+
exceptZero: "exceptZero";
|
|
68
|
+
never: "never";
|
|
69
|
+
}>>;
|
|
70
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
currency: "currency";
|
|
72
|
+
decimal: "decimal";
|
|
73
|
+
percent: "percent";
|
|
74
|
+
unit: "unit";
|
|
75
|
+
}>>;
|
|
76
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
77
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
}, z.core.$strict>]>>;
|
|
79
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
initialWidth: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
unit: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
/** One row. */
|
|
85
|
+
export type DumbbellDatum = z.infer<typeof dumbbellDatumSchema>;
|
|
86
|
+
/** The validated payload. */
|
|
87
|
+
export type DumbbellQueueData = z.infer<typeof dumbbellQueueSchema>;
|
|
88
|
+
/** What `<DumbbellQueue>` takes: the payload, with `format` also allowed as a function. */
|
|
89
|
+
export type DumbbellQueueProps = SharedCallbacks & Omit<z.input<typeof dumbbellQueueSchema>, "format" | "note"> & {
|
|
90
|
+
format?: FormatInput;
|
|
91
|
+
} & NoteProps;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Named presets. All print with the en-US locale unless the descriptor says
|
|
4
|
+
* otherwise, so the server, headless Chromium and the browser agree.
|
|
5
|
+
*
|
|
6
|
+
* - `integer`: 12,345
|
|
7
|
+
* - `decimal`: 12,345.6 (one decimal)
|
|
8
|
+
* - `compact`: 12k, 1.2m
|
|
9
|
+
* - `percent`: a fraction as a percentage, 0.12 prints 12%
|
|
10
|
+
*/
|
|
11
|
+
export declare const FORMAT_PRESETS: readonly ["integer", "decimal", "compact", "percent"];
|
|
12
|
+
/** The Intl.NumberFormat options a descriptor may carry (plus `locale`). */
|
|
13
|
+
export declare const intlFormatSchema: z.ZodObject<{
|
|
14
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
long: "long";
|
|
16
|
+
short: "short";
|
|
17
|
+
}>>;
|
|
18
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
19
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
20
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
compact: "compact";
|
|
24
|
+
standard: "standard";
|
|
25
|
+
}>>;
|
|
26
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
always: "always";
|
|
28
|
+
auto: "auto";
|
|
29
|
+
exceptZero: "exceptZero";
|
|
30
|
+
never: "never";
|
|
31
|
+
}>>;
|
|
32
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
currency: "currency";
|
|
34
|
+
decimal: "decimal";
|
|
35
|
+
percent: "percent";
|
|
36
|
+
unit: "unit";
|
|
37
|
+
}>>;
|
|
38
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
39
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
/** A formatter as data: a preset name or Intl number-format options. */
|
|
42
|
+
export declare const formatSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
43
|
+
compact: "compact";
|
|
44
|
+
decimal: "decimal";
|
|
45
|
+
integer: "integer";
|
|
46
|
+
percent: "percent";
|
|
47
|
+
}>, z.ZodObject<{
|
|
48
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
long: "long";
|
|
50
|
+
short: "short";
|
|
51
|
+
}>>;
|
|
52
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
53
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
54
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
compact: "compact";
|
|
58
|
+
standard: "standard";
|
|
59
|
+
}>>;
|
|
60
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
always: "always";
|
|
62
|
+
auto: "auto";
|
|
63
|
+
exceptZero: "exceptZero";
|
|
64
|
+
never: "never";
|
|
65
|
+
}>>;
|
|
66
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
currency: "currency";
|
|
68
|
+
decimal: "decimal";
|
|
69
|
+
percent: "percent";
|
|
70
|
+
unit: "unit";
|
|
71
|
+
}>>;
|
|
72
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
73
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
}, z.core.$strict>]>;
|
|
75
|
+
export type FormatDescriptor = z.infer<typeof formatSchema>;
|
|
76
|
+
/** What a chart prop accepts: a descriptor, or (TypeScript only) a function. */
|
|
77
|
+
export type FormatInput = FormatDescriptor | ((value: number) => string);
|
|
78
|
+
/**
|
|
79
|
+
* Turn any `FormatInput` into a function; `undefined` prints with `String`.
|
|
80
|
+
* Throws on a descriptor the schema would reject: validate payloads first.
|
|
81
|
+
*/
|
|
82
|
+
export declare const resolveFormat: (input: FormatInput | undefined) => ((value: number) => string);
|
|
83
|
+
/**
|
|
84
|
+
* Named date presets, printed in UTC so a day is the same day everywhere.
|
|
85
|
+
*
|
|
86
|
+
* - `day-month`: 4 Mar
|
|
87
|
+
* - `day-month-year`: 4 Mar 2024
|
|
88
|
+
* - `month-year`: Mar 2024
|
|
89
|
+
*/
|
|
90
|
+
export declare const DATE_FORMAT_PRESETS: readonly ["day-month", "day-month-year", "month-year"];
|
|
91
|
+
/** A date formatter as data: a preset name. */
|
|
92
|
+
export declare const dateFormatSchema: z.ZodEnum<{
|
|
93
|
+
"day-month": "day-month";
|
|
94
|
+
"day-month-year": "day-month-year";
|
|
95
|
+
"month-year": "month-year";
|
|
96
|
+
}>;
|
|
97
|
+
export type DateFormatDescriptor = z.infer<typeof dateFormatSchema>;
|
|
98
|
+
/** What a chart prop accepts: a preset, or (TypeScript only) a function. */
|
|
99
|
+
export type DateFormatInput = DateFormatDescriptor | ((date: Date) => string);
|
|
100
|
+
/** Turn any `DateFormatInput` into a function; `undefined` is `day-month`. */
|
|
101
|
+
export declare const resolveDateFormat: (input: DateFormatInput | undefined) => ((date: Date) => string);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { DateFormatInput, FormatInput } from "./format.js";
|
|
3
|
+
import type { NoteProps, SharedCallbacks } from "./options.js";
|
|
4
|
+
export declare const hairlineAreaSchema: z.ZodObject<{
|
|
5
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
mount: "mount";
|
|
7
|
+
off: "off";
|
|
8
|
+
scroll: "scroll";
|
|
9
|
+
}>>;
|
|
10
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
11
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
device: "device";
|
|
15
|
+
proportional: "proportional";
|
|
16
|
+
}>>;
|
|
17
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
18
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
20
|
+
fallback: z.ZodNumber;
|
|
21
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
table: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
note: z.ZodOptional<z.ZodString>;
|
|
26
|
+
unitNote: z.ZodOptional<z.ZodString>;
|
|
27
|
+
data: z.ZodArray<z.ZodObject<{
|
|
28
|
+
date: z.ZodUnion<readonly [z.ZodISODate, z.ZodISODateTime]>;
|
|
29
|
+
id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
dateFormat: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
"day-month": "day-month";
|
|
34
|
+
"day-month-year": "day-month-year";
|
|
35
|
+
"month-year": "month-year";
|
|
36
|
+
}>>;
|
|
37
|
+
emphasis: z.ZodOptional<z.ZodString>;
|
|
38
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
39
|
+
compact: "compact";
|
|
40
|
+
decimal: "decimal";
|
|
41
|
+
integer: "integer";
|
|
42
|
+
percent: "percent";
|
|
43
|
+
}>, z.ZodObject<{
|
|
44
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
long: "long";
|
|
46
|
+
short: "short";
|
|
47
|
+
}>>;
|
|
48
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
49
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
50
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
compact: "compact";
|
|
54
|
+
standard: "standard";
|
|
55
|
+
}>>;
|
|
56
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
always: "always";
|
|
58
|
+
auto: "auto";
|
|
59
|
+
exceptZero: "exceptZero";
|
|
60
|
+
never: "never";
|
|
61
|
+
}>>;
|
|
62
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
63
|
+
currency: "currency";
|
|
64
|
+
decimal: "decimal";
|
|
65
|
+
percent: "percent";
|
|
66
|
+
unit: "unit";
|
|
67
|
+
}>>;
|
|
68
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
69
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
}, z.core.$strict>]>>;
|
|
71
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
initialWidth: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
ticks: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
75
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
/** The validated payload. */
|
|
78
|
+
export type HairlineAreaData = z.infer<typeof hairlineAreaSchema>;
|
|
79
|
+
/** What `<HairlineArea>` takes: the payload, with both formats also allowed as functions. */
|
|
80
|
+
export type HairlineAreaProps = SharedCallbacks & Omit<z.input<typeof hairlineAreaSchema>, "dateFormat" | "format" | "note"> & {
|
|
81
|
+
dateFormat?: DateFormatInput;
|
|
82
|
+
format?: FormatInput;
|
|
83
|
+
} & NoteProps;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { DateFormatInput, FormatInput } from "./format.js";
|
|
3
|
+
import type { NoteProps, SharedCallbacks } from "./options.js";
|
|
4
|
+
export declare const hairlineLineSchema: z.ZodObject<{
|
|
5
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
mount: "mount";
|
|
7
|
+
off: "off";
|
|
8
|
+
scroll: "scroll";
|
|
9
|
+
}>>;
|
|
10
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
11
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
device: "device";
|
|
15
|
+
proportional: "proportional";
|
|
16
|
+
}>>;
|
|
17
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
18
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
20
|
+
fallback: z.ZodNumber;
|
|
21
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
table: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
note: z.ZodOptional<z.ZodString>;
|
|
26
|
+
unitNote: z.ZodOptional<z.ZodString>;
|
|
27
|
+
data: z.ZodArray<z.ZodObject<{
|
|
28
|
+
date: z.ZodUnion<readonly [z.ZodISODate, z.ZodISODateTime]>;
|
|
29
|
+
id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
dateFormat: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
"day-month": "day-month";
|
|
34
|
+
"day-month-year": "day-month-year";
|
|
35
|
+
"month-year": "month-year";
|
|
36
|
+
}>>;
|
|
37
|
+
emphasis: z.ZodOptional<z.ZodString>;
|
|
38
|
+
extreme: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
peak: "peak";
|
|
40
|
+
trough: "trough";
|
|
41
|
+
}>>;
|
|
42
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
43
|
+
compact: "compact";
|
|
44
|
+
decimal: "decimal";
|
|
45
|
+
integer: "integer";
|
|
46
|
+
percent: "percent";
|
|
47
|
+
}>, z.ZodObject<{
|
|
48
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
long: "long";
|
|
50
|
+
short: "short";
|
|
51
|
+
}>>;
|
|
52
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
53
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
54
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
compact: "compact";
|
|
58
|
+
standard: "standard";
|
|
59
|
+
}>>;
|
|
60
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
always: "always";
|
|
62
|
+
auto: "auto";
|
|
63
|
+
exceptZero: "exceptZero";
|
|
64
|
+
never: "never";
|
|
65
|
+
}>>;
|
|
66
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
currency: "currency";
|
|
68
|
+
decimal: "decimal";
|
|
69
|
+
percent: "percent";
|
|
70
|
+
unit: "unit";
|
|
71
|
+
}>>;
|
|
72
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
73
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
}, z.core.$strict>]>>;
|
|
75
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
initialWidth: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
/** The validated payload. */
|
|
80
|
+
export type HairlineLineData = z.infer<typeof hairlineLineSchema>;
|
|
81
|
+
/** What `<HairlineLine>` takes: the payload, with both formats also allowed as functions. */
|
|
82
|
+
export type HairlineLineProps = SharedCallbacks & Omit<z.input<typeof hairlineLineSchema>, "dateFormat" | "format" | "note"> & {
|
|
83
|
+
dateFormat?: DateFormatInput;
|
|
84
|
+
format?: FormatInput;
|
|
85
|
+
} & NoteProps;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A datum that can be addressed by key. */
|
|
2
|
+
export type Keyed = {
|
|
3
|
+
id?: string;
|
|
4
|
+
} & ({
|
|
5
|
+
date: string;
|
|
6
|
+
} | {
|
|
7
|
+
label: string;
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
});
|
|
11
|
+
/** The key a datum is addressed by: `id`, else its label, name or date. */
|
|
12
|
+
export declare const keyOf: (datum: Keyed) => string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* A face's glyph advances, in em. `advances` maps a character to its width;
|
|
4
|
+
* any character not listed takes `fallback`. `tabular`, when given, is the
|
|
5
|
+
* width of every digit in text set with tabular figures (it overrides the
|
|
6
|
+
* digits listed in `advances` there).
|
|
7
|
+
*/
|
|
8
|
+
export declare const fontMetricsSchema: z.ZodObject<{
|
|
9
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
10
|
+
fallback: z.ZodNumber;
|
|
11
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type FontMetrics = z.infer<typeof fontMetricsSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Inter, bucketed from measurements and rounded up so a label that "fits"
|
|
16
|
+
* really does: narrow punctuation, slim brackets and `1`, wide `m` and `w`,
|
|
17
|
+
* widest `%@MW—…`, then 0.63em lower case and 0.76em capitals (the fallback
|
|
18
|
+
* is applied per case, see `advance`). Tabular figures are 0.65em.
|
|
19
|
+
*/
|
|
20
|
+
export declare const INTER_METRICS: FontMetrics;
|
|
21
|
+
/**
|
|
22
|
+
* Width of a string at `size` px, from a metrics table: the same answer
|
|
23
|
+
* everywhere, because nothing is measured. `tabular` sets digits at the
|
|
24
|
+
* table's tabular width.
|
|
25
|
+
*/
|
|
26
|
+
export declare const textWidth: (text: string, size: number, metrics?: FontMetrics, tabular?: boolean) => number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const motionShape: {
|
|
3
|
+
/**
|
|
4
|
+
* When the entry draws in. "scroll": when the chart scrolls into view.
|
|
5
|
+
* "mount": at once, without scrolling. "off": never; the chart is drawn, and
|
|
6
|
+
* ready, in the first HTML. The default is "off" for a fixed-size chart
|
|
7
|
+
* (`width` and `height` given) and "scroll" for a responsive one. Under
|
|
8
|
+
* reduced motion the chart is drawn in the first paint whatever this says.
|
|
9
|
+
*/
|
|
10
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
mount: "mount";
|
|
12
|
+
off: "off";
|
|
13
|
+
scroll: "scroll";
|
|
14
|
+
}>>;
|
|
15
|
+
/** Change it to replay the entry without remounting the chart. */
|
|
16
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
17
|
+
};
|
|
18
|
+
/** What a chart's props add to its payload for motion. */
|
|
19
|
+
export interface MotionCallbacks {
|
|
20
|
+
/** Called when the chart has settled: the same moment `data-hl-ready` turns "true". */
|
|
21
|
+
onReady?: () => void;
|
|
22
|
+
}
|