@howells/hairline 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +34 -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 +162 -4
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { MotionCallbacks } from "./motion.js";
|
|
3
|
+
export declare const sharedShape: {
|
|
4
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
mount: "mount";
|
|
6
|
+
off: "off";
|
|
7
|
+
scroll: "scroll";
|
|
8
|
+
}>>;
|
|
9
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
10
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
device: "device";
|
|
14
|
+
proportional: "proportional";
|
|
15
|
+
}>>;
|
|
16
|
+
/** Leads every SVG id, to separate charts rendered in separate React roots on one page. */
|
|
17
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
18
|
+
/** Glyph widths of a face other than Inter, so notes wrap and reserve room for it. */
|
|
19
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
21
|
+
fallback: z.ZodNumber;
|
|
22
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
/** Show the data table to sighted readers too. It is always there for screen readers. */
|
|
25
|
+
table: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
/** The chart's accessible name. Each chart has a default that reads the data. */
|
|
27
|
+
title: z.ZodOptional<z.ZodString>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The in-plot note, as one shape: spread `noteShape` into the chart's
|
|
31
|
+
* strictObject and add `NoteProps` to its props type. `note` is the old name
|
|
32
|
+
* for `unitNote`, kept so existing callers still work.
|
|
33
|
+
*/
|
|
34
|
+
export declare const noteShape: {
|
|
35
|
+
/** The old name for `unitNote`; JSON Schema marks it deprecated. */
|
|
36
|
+
note: z.ZodOptional<z.ZodString>;
|
|
37
|
+
/** The in-plot key under the axis. */
|
|
38
|
+
unitNote: z.ZodOptional<z.ZodString>;
|
|
39
|
+
};
|
|
40
|
+
/** The two names an in-plot note goes by, for code that reads them (a deprecation would flag the read). */
|
|
41
|
+
export interface NoteNames {
|
|
42
|
+
note?: string;
|
|
43
|
+
unitNote?: string;
|
|
44
|
+
}
|
|
45
|
+
/** A chart's props for the in-plot note: `unitNote`, and the `note` it replaces. */
|
|
46
|
+
export interface NoteProps extends Omit<NoteNames, "note"> {
|
|
47
|
+
/** @deprecated Use `unitNote`. */
|
|
48
|
+
note?: string;
|
|
49
|
+
}
|
|
50
|
+
/** What a chart's props add to its payload: functions cannot be JSON. */
|
|
51
|
+
export type SharedCallbacks = MotionCallbacks;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { FormatInput } from "./format.js";
|
|
3
|
+
import type { NoteProps, SharedCallbacks } from "./options.js";
|
|
4
|
+
/** One point: a name, where it sits, and an optional key for when names repeat. */
|
|
5
|
+
export declare const plumbDatumSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodOptional<z.ZodString>;
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
x: z.ZodNumber;
|
|
9
|
+
y: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export declare const plumbScatterSchema: 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
|
+
data: z.ZodArray<z.ZodObject<{
|
|
35
|
+
id: z.ZodOptional<z.ZodString>;
|
|
36
|
+
label: z.ZodString;
|
|
37
|
+
x: z.ZodNumber;
|
|
38
|
+
y: z.ZodNumber;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
emphasis: z.ZodOptional<z.ZodString>;
|
|
41
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
42
|
+
compact: "compact";
|
|
43
|
+
decimal: "decimal";
|
|
44
|
+
integer: "integer";
|
|
45
|
+
percent: "percent";
|
|
46
|
+
}>, z.ZodObject<{
|
|
47
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
long: "long";
|
|
49
|
+
short: "short";
|
|
50
|
+
}>>;
|
|
51
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
52
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
53
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
compact: "compact";
|
|
57
|
+
standard: "standard";
|
|
58
|
+
}>>;
|
|
59
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
always: "always";
|
|
61
|
+
auto: "auto";
|
|
62
|
+
exceptZero: "exceptZero";
|
|
63
|
+
never: "never";
|
|
64
|
+
}>>;
|
|
65
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
currency: "currency";
|
|
67
|
+
decimal: "decimal";
|
|
68
|
+
percent: "percent";
|
|
69
|
+
unit: "unit";
|
|
70
|
+
}>>;
|
|
71
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
72
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
}, z.core.$strict>]>>;
|
|
74
|
+
formatX: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
75
|
+
compact: "compact";
|
|
76
|
+
decimal: "decimal";
|
|
77
|
+
integer: "integer";
|
|
78
|
+
percent: "percent";
|
|
79
|
+
}>, z.ZodObject<{
|
|
80
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
long: "long";
|
|
82
|
+
short: "short";
|
|
83
|
+
}>>;
|
|
84
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
85
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
86
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
compact: "compact";
|
|
90
|
+
standard: "standard";
|
|
91
|
+
}>>;
|
|
92
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
always: "always";
|
|
94
|
+
auto: "auto";
|
|
95
|
+
exceptZero: "exceptZero";
|
|
96
|
+
never: "never";
|
|
97
|
+
}>>;
|
|
98
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
currency: "currency";
|
|
100
|
+
decimal: "decimal";
|
|
101
|
+
percent: "percent";
|
|
102
|
+
unit: "unit";
|
|
103
|
+
}>>;
|
|
104
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
105
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
}, z.core.$strict>]>>;
|
|
107
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
initialWidth: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
labelled: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
xDomain: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
112
|
+
xLabels: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
113
|
+
yDomain: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
114
|
+
yLabel: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
/** One point. */
|
|
117
|
+
export type PlumbDatum = z.infer<typeof plumbDatumSchema>;
|
|
118
|
+
/** The validated payload. */
|
|
119
|
+
export type PlumbScatterData = z.infer<typeof plumbScatterSchema>;
|
|
120
|
+
/** What `<PlumbScatter>` takes: the payload, with formats also allowed as functions. */
|
|
121
|
+
export type PlumbScatterProps = SharedCallbacks & Omit<z.input<typeof plumbScatterSchema>, "format" | "formatX" | "note"> & {
|
|
122
|
+
format?: FormatInput;
|
|
123
|
+
formatX?: FormatInput;
|
|
124
|
+
} & NoteProps;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { ZodType } from "zod";
|
|
2
|
+
import type { Payload, Validated } from "./validate.js";
|
|
3
|
+
/** The nine jobs of the FT Visual Vocabulary. */
|
|
4
|
+
export type Job = "change-over-time" | "correlation" | "deviation" | "distribution" | "flow" | "magnitude" | "part-to-whole" | "ranking" | "spatial";
|
|
5
|
+
export interface ChartEntry<T = unknown> {
|
|
6
|
+
/** The chart's name in the package, e.g. "RungBars". */
|
|
7
|
+
component: string;
|
|
8
|
+
/** Plain-words shape of `data`, for a prompt. */
|
|
9
|
+
dataShape: string;
|
|
10
|
+
/** How much data the chart takes well; the schema enforces the bounds. */
|
|
11
|
+
limits: {
|
|
12
|
+
categories?: {
|
|
13
|
+
max: number;
|
|
14
|
+
min: number;
|
|
15
|
+
};
|
|
16
|
+
series: {
|
|
17
|
+
max: number;
|
|
18
|
+
min: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/** The stable id: what a payload's `kind` says. */
|
|
22
|
+
kind: string;
|
|
23
|
+
/** The Visual Vocabulary job the chart does best, then the next best. */
|
|
24
|
+
jobs: readonly [Job, ...Job[]];
|
|
25
|
+
schema: ZodType<T>;
|
|
26
|
+
/** Check a payload against `schema`. */
|
|
27
|
+
validate: (input: Payload) => Validated<T>;
|
|
28
|
+
whenNotToUse: string;
|
|
29
|
+
whenToUse: string;
|
|
30
|
+
}
|
|
31
|
+
/** Every chart by kind, typed: `charts["rung-bars"].validate(x)` returns that chart's data. */
|
|
32
|
+
export declare const charts: {
|
|
33
|
+
"dumbbell-queue": ChartEntry<{
|
|
34
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
35
|
+
replayKey?: string | number | undefined;
|
|
36
|
+
fit?: boolean | undefined;
|
|
37
|
+
scale?: number | undefined;
|
|
38
|
+
strokes?: "device" | "proportional" | undefined;
|
|
39
|
+
idPrefix?: string | undefined;
|
|
40
|
+
metrics?: {
|
|
41
|
+
advances: Record<string, number>;
|
|
42
|
+
fallback: number;
|
|
43
|
+
tabular?: number | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
table?: boolean | undefined;
|
|
46
|
+
title?: string | undefined;
|
|
47
|
+
note?: string | undefined;
|
|
48
|
+
unitNote?: string | undefined;
|
|
49
|
+
alert?: "fall" | "rise" | undefined;
|
|
50
|
+
data: {
|
|
51
|
+
after: number;
|
|
52
|
+
before: number;
|
|
53
|
+
id?: string | undefined;
|
|
54
|
+
label: string;
|
|
55
|
+
}[];
|
|
56
|
+
emphasis?: string | undefined;
|
|
57
|
+
ends?: [string, string] | undefined;
|
|
58
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
59
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
60
|
+
currency?: string | undefined;
|
|
61
|
+
locale?: string | undefined;
|
|
62
|
+
maximumFractionDigits?: number | undefined;
|
|
63
|
+
minimumFractionDigits?: number | undefined;
|
|
64
|
+
notation?: "compact" | "standard" | undefined;
|
|
65
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
66
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
67
|
+
unit?: string | undefined;
|
|
68
|
+
useGrouping?: boolean | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
height?: number | undefined;
|
|
71
|
+
initialWidth?: number | undefined;
|
|
72
|
+
unit?: number | undefined;
|
|
73
|
+
width?: number | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
"hairline-area": ChartEntry<{
|
|
76
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
77
|
+
replayKey?: string | number | undefined;
|
|
78
|
+
fit?: boolean | undefined;
|
|
79
|
+
scale?: number | undefined;
|
|
80
|
+
strokes?: "device" | "proportional" | undefined;
|
|
81
|
+
idPrefix?: string | undefined;
|
|
82
|
+
metrics?: {
|
|
83
|
+
advances: Record<string, number>;
|
|
84
|
+
fallback: number;
|
|
85
|
+
tabular?: number | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
table?: boolean | undefined;
|
|
88
|
+
title?: string | undefined;
|
|
89
|
+
note?: string | undefined;
|
|
90
|
+
unitNote?: string | undefined;
|
|
91
|
+
data: {
|
|
92
|
+
date: string;
|
|
93
|
+
id?: string | undefined;
|
|
94
|
+
value: number | null;
|
|
95
|
+
}[];
|
|
96
|
+
dateFormat?: "day-month" | "day-month-year" | "month-year" | undefined;
|
|
97
|
+
emphasis?: string | undefined;
|
|
98
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
99
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
100
|
+
currency?: string | undefined;
|
|
101
|
+
locale?: string | undefined;
|
|
102
|
+
maximumFractionDigits?: number | undefined;
|
|
103
|
+
minimumFractionDigits?: number | undefined;
|
|
104
|
+
notation?: "compact" | "standard" | undefined;
|
|
105
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
106
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
107
|
+
unit?: string | undefined;
|
|
108
|
+
useGrouping?: boolean | undefined;
|
|
109
|
+
} | undefined;
|
|
110
|
+
height?: number | undefined;
|
|
111
|
+
initialWidth?: number | undefined;
|
|
112
|
+
maxWidth?: number | undefined;
|
|
113
|
+
ticks?: number[] | undefined;
|
|
114
|
+
width?: number | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
"hairline-line": ChartEntry<{
|
|
117
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
118
|
+
replayKey?: string | number | undefined;
|
|
119
|
+
fit?: boolean | undefined;
|
|
120
|
+
scale?: number | undefined;
|
|
121
|
+
strokes?: "device" | "proportional" | undefined;
|
|
122
|
+
idPrefix?: string | undefined;
|
|
123
|
+
metrics?: {
|
|
124
|
+
advances: Record<string, number>;
|
|
125
|
+
fallback: number;
|
|
126
|
+
tabular?: number | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
table?: boolean | undefined;
|
|
129
|
+
title?: string | undefined;
|
|
130
|
+
note?: string | undefined;
|
|
131
|
+
unitNote?: string | undefined;
|
|
132
|
+
data: {
|
|
133
|
+
date: string;
|
|
134
|
+
id?: string | undefined;
|
|
135
|
+
value: number | null;
|
|
136
|
+
}[];
|
|
137
|
+
dateFormat?: "day-month" | "day-month-year" | "month-year" | undefined;
|
|
138
|
+
emphasis?: string | undefined;
|
|
139
|
+
extreme?: "peak" | "trough" | undefined;
|
|
140
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
141
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
142
|
+
currency?: string | undefined;
|
|
143
|
+
locale?: string | undefined;
|
|
144
|
+
maximumFractionDigits?: number | undefined;
|
|
145
|
+
minimumFractionDigits?: number | undefined;
|
|
146
|
+
notation?: "compact" | "standard" | undefined;
|
|
147
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
148
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
149
|
+
unit?: string | undefined;
|
|
150
|
+
useGrouping?: boolean | undefined;
|
|
151
|
+
} | undefined;
|
|
152
|
+
height?: number | undefined;
|
|
153
|
+
initialWidth?: number | undefined;
|
|
154
|
+
width?: number | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
"plumb-scatter": ChartEntry<{
|
|
157
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
158
|
+
replayKey?: string | number | undefined;
|
|
159
|
+
fit?: boolean | undefined;
|
|
160
|
+
scale?: number | undefined;
|
|
161
|
+
strokes?: "device" | "proportional" | undefined;
|
|
162
|
+
idPrefix?: string | undefined;
|
|
163
|
+
metrics?: {
|
|
164
|
+
advances: Record<string, number>;
|
|
165
|
+
fallback: number;
|
|
166
|
+
tabular?: number | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
table?: boolean | undefined;
|
|
169
|
+
title?: string | undefined;
|
|
170
|
+
note?: string | undefined;
|
|
171
|
+
unitNote?: string | undefined;
|
|
172
|
+
data: {
|
|
173
|
+
id?: string | undefined;
|
|
174
|
+
label: string;
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
}[];
|
|
178
|
+
emphasis?: string | undefined;
|
|
179
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
180
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
181
|
+
currency?: string | undefined;
|
|
182
|
+
locale?: string | undefined;
|
|
183
|
+
maximumFractionDigits?: number | undefined;
|
|
184
|
+
minimumFractionDigits?: number | undefined;
|
|
185
|
+
notation?: "compact" | "standard" | undefined;
|
|
186
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
187
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
188
|
+
unit?: string | undefined;
|
|
189
|
+
useGrouping?: boolean | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
formatX?: "compact" | "decimal" | "integer" | "percent" | {
|
|
192
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
193
|
+
currency?: string | undefined;
|
|
194
|
+
locale?: string | undefined;
|
|
195
|
+
maximumFractionDigits?: number | undefined;
|
|
196
|
+
minimumFractionDigits?: number | undefined;
|
|
197
|
+
notation?: "compact" | "standard" | undefined;
|
|
198
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
199
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
200
|
+
unit?: string | undefined;
|
|
201
|
+
useGrouping?: boolean | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
height?: number | undefined;
|
|
204
|
+
initialWidth?: number | undefined;
|
|
205
|
+
labelled?: string[] | undefined;
|
|
206
|
+
width?: number | undefined;
|
|
207
|
+
xDomain?: [number, number] | undefined;
|
|
208
|
+
xLabels?: [string, string] | undefined;
|
|
209
|
+
yDomain?: [number, number] | undefined;
|
|
210
|
+
yLabel?: string | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
"rung-bars": ChartEntry<{
|
|
213
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
214
|
+
replayKey?: string | number | undefined;
|
|
215
|
+
fit?: boolean | undefined;
|
|
216
|
+
scale?: number | undefined;
|
|
217
|
+
strokes?: "device" | "proportional" | undefined;
|
|
218
|
+
idPrefix?: string | undefined;
|
|
219
|
+
metrics?: {
|
|
220
|
+
advances: Record<string, number>;
|
|
221
|
+
fallback: number;
|
|
222
|
+
tabular?: number | undefined;
|
|
223
|
+
} | undefined;
|
|
224
|
+
table?: boolean | undefined;
|
|
225
|
+
title?: string | undefined;
|
|
226
|
+
note?: string | undefined;
|
|
227
|
+
unitNote?: string | undefined;
|
|
228
|
+
data: {
|
|
229
|
+
id?: string | undefined;
|
|
230
|
+
label: string;
|
|
231
|
+
value: number;
|
|
232
|
+
}[];
|
|
233
|
+
emphasis?: string | undefined;
|
|
234
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
235
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
236
|
+
currency?: string | undefined;
|
|
237
|
+
locale?: string | undefined;
|
|
238
|
+
maximumFractionDigits?: number | undefined;
|
|
239
|
+
minimumFractionDigits?: number | undefined;
|
|
240
|
+
notation?: "compact" | "standard" | undefined;
|
|
241
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
242
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
243
|
+
unit?: string | undefined;
|
|
244
|
+
useGrouping?: boolean | undefined;
|
|
245
|
+
} | undefined;
|
|
246
|
+
height?: number | undefined;
|
|
247
|
+
initialWidth?: number | undefined;
|
|
248
|
+
unit?: number | undefined;
|
|
249
|
+
width?: number | undefined;
|
|
250
|
+
}>;
|
|
251
|
+
slope: ChartEntry<{
|
|
252
|
+
animate?: "mount" | "off" | "scroll" | undefined;
|
|
253
|
+
replayKey?: string | number | undefined;
|
|
254
|
+
fit?: boolean | undefined;
|
|
255
|
+
scale?: number | undefined;
|
|
256
|
+
strokes?: "device" | "proportional" | undefined;
|
|
257
|
+
idPrefix?: string | undefined;
|
|
258
|
+
metrics?: {
|
|
259
|
+
advances: Record<string, number>;
|
|
260
|
+
fallback: number;
|
|
261
|
+
tabular?: number | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
table?: boolean | undefined;
|
|
264
|
+
title?: string | undefined;
|
|
265
|
+
domain?: [number, number] | undefined;
|
|
266
|
+
emphasis?: string | undefined;
|
|
267
|
+
format?: "compact" | "decimal" | "integer" | "percent" | {
|
|
268
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
269
|
+
currency?: string | undefined;
|
|
270
|
+
locale?: string | undefined;
|
|
271
|
+
maximumFractionDigits?: number | undefined;
|
|
272
|
+
minimumFractionDigits?: number | undefined;
|
|
273
|
+
notation?: "compact" | "standard" | undefined;
|
|
274
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
275
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
276
|
+
unit?: string | undefined;
|
|
277
|
+
useGrouping?: boolean | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
height?: number | undefined;
|
|
280
|
+
initialWidth?: number | undefined;
|
|
281
|
+
label?: string | undefined;
|
|
282
|
+
labels: [string, string];
|
|
283
|
+
narrowFormat?: "compact" | "decimal" | "integer" | "percent" | {
|
|
284
|
+
compactDisplay?: "long" | "short" | undefined;
|
|
285
|
+
currency?: string | undefined;
|
|
286
|
+
locale?: string | undefined;
|
|
287
|
+
maximumFractionDigits?: number | undefined;
|
|
288
|
+
minimumFractionDigits?: number | undefined;
|
|
289
|
+
notation?: "compact" | "standard" | undefined;
|
|
290
|
+
signDisplay?: "always" | "auto" | "exceptZero" | "never" | undefined;
|
|
291
|
+
style?: "currency" | "decimal" | "percent" | "unit" | undefined;
|
|
292
|
+
unit?: string | undefined;
|
|
293
|
+
useGrouping?: boolean | undefined;
|
|
294
|
+
} | undefined;
|
|
295
|
+
rows: {
|
|
296
|
+
from: number;
|
|
297
|
+
id?: string | undefined;
|
|
298
|
+
name: string;
|
|
299
|
+
to: number;
|
|
300
|
+
}[];
|
|
301
|
+
width?: number | undefined;
|
|
302
|
+
}>;
|
|
303
|
+
};
|
|
304
|
+
export type ChartKind = keyof typeof charts;
|
|
305
|
+
/** The same entries as a list, for an agent to read and choose from. */
|
|
306
|
+
export declare const registry: readonly ChartEntry[];
|
|
307
|
+
/** The entry for a known kind (typed), or for any string (maybe undefined). */
|
|
308
|
+
export declare function getChart<K extends ChartKind>(kind: K): (typeof charts)[K];
|
|
309
|
+
export declare function getChart(kind: string): ChartEntry | undefined;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { FormatInput } from "./format.js";
|
|
3
|
+
import type { NoteProps, SharedCallbacks } from "./options.js";
|
|
4
|
+
/** The bars: a label, a value, and an optional key for when labels repeat. */
|
|
5
|
+
export declare const rungDatumSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodOptional<z.ZodString>;
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
value: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
export declare const rungBarsSchema: z.ZodObject<{
|
|
11
|
+
animate: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
mount: "mount";
|
|
13
|
+
off: "off";
|
|
14
|
+
scroll: "scroll";
|
|
15
|
+
}>>;
|
|
16
|
+
replayKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
17
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
device: "device";
|
|
21
|
+
proportional: "proportional";
|
|
22
|
+
}>>;
|
|
23
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
24
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
advances: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
26
|
+
fallback: z.ZodNumber;
|
|
27
|
+
tabular: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strict>>;
|
|
29
|
+
table: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
title: z.ZodOptional<z.ZodString>;
|
|
31
|
+
note: z.ZodOptional<z.ZodString>;
|
|
32
|
+
unitNote: z.ZodOptional<z.ZodString>;
|
|
33
|
+
data: z.ZodArray<z.ZodObject<{
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
value: z.ZodNumber;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
emphasis: z.ZodOptional<z.ZodString>;
|
|
39
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
40
|
+
compact: "compact";
|
|
41
|
+
decimal: "decimal";
|
|
42
|
+
integer: "integer";
|
|
43
|
+
percent: "percent";
|
|
44
|
+
}>, z.ZodObject<{
|
|
45
|
+
compactDisplay: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
long: "long";
|
|
47
|
+
short: "short";
|
|
48
|
+
}>>;
|
|
49
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
50
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
51
|
+
maximumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
minimumFractionDigits: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
notation: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
compact: "compact";
|
|
55
|
+
standard: "standard";
|
|
56
|
+
}>>;
|
|
57
|
+
signDisplay: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
always: "always";
|
|
59
|
+
auto: "auto";
|
|
60
|
+
exceptZero: "exceptZero";
|
|
61
|
+
never: "never";
|
|
62
|
+
}>>;
|
|
63
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
currency: "currency";
|
|
65
|
+
decimal: "decimal";
|
|
66
|
+
percent: "percent";
|
|
67
|
+
unit: "unit";
|
|
68
|
+
}>>;
|
|
69
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
70
|
+
useGrouping: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
}, z.core.$strict>]>>;
|
|
72
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
initialWidth: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
unit: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
/** One bar. */
|
|
78
|
+
export type RungDatum = z.infer<typeof rungDatumSchema>;
|
|
79
|
+
/** The validated payload. */
|
|
80
|
+
export type RungBarsData = z.infer<typeof rungBarsSchema>;
|
|
81
|
+
/** What `<RungBars>` takes: the payload, with `format` also allowed as a function. */
|
|
82
|
+
export type RungBarsProps = SharedCallbacks & Omit<z.input<typeof rungBarsSchema>, "format" | "note"> & {
|
|
83
|
+
format?: FormatInput;
|
|
84
|
+
} & NoteProps;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const scaleShape: {
|
|
3
|
+
/**
|
|
4
|
+
* Fit the container instead: the svg fills its width at the chart's aspect
|
|
5
|
+
* ratio. Wins over `scale`.
|
|
6
|
+
*/
|
|
7
|
+
fit: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
/**
|
|
9
|
+
* Slides: draw at the logical `width`, then show the whole composition
|
|
10
|
+
* `scale` times larger through the viewBox, so type, spacing and marks grow
|
|
11
|
+
* together (11 px labels at `scale` 2.5 read 27.5 px). Textures scale too.
|
|
12
|
+
*/
|
|
13
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
/**
|
|
15
|
+
* "proportional" (default) lets strokes scale with the composition;
|
|
16
|
+
* "device" keeps every stroke at one device pixel however large it is shown.
|
|
17
|
+
* The policy acts on stroked geometry only: rules, grid lines, lines and
|
|
18
|
+
* paths, rings and outlines. Filled marks (the bars of RungBars and the
|
|
19
|
+
* stems of HairlineArea are rects, the textures are fills) scale with the
|
|
20
|
+
* composition either way, so in RungBars "device" changes just its baseline
|
|
21
|
+
* rule; in the other five charts it also holds their lines and rings
|
|
22
|
+
* to one device pixel.
|
|
23
|
+
*/
|
|
24
|
+
strokes: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
device: "device";
|
|
26
|
+
proportional: "proportional";
|
|
27
|
+
}>>;
|
|
28
|
+
};
|
|
29
|
+
/** How a scaled chart is shown. */
|
|
30
|
+
export interface ScaleOptions {
|
|
31
|
+
fit?: boolean;
|
|
32
|
+
scale?: number;
|
|
33
|
+
strokes?: "device" | "proportional";
|
|
34
|
+
}
|