ggaction 0.0.13 → 0.0.16
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 +146 -0
- package/README.md +41 -12
- package/knowledge/action-cards.json +1 -1
- package/knowledge/intent-taxonomy.json +1 -1
- package/knowledge/mcp-resources.json +1 -1
- package/knowledge/task-packet.schema.json +1 -1
- package/knowledge/task-resolver.js +1 -1
- package/package.json +39 -7
- package/src/BasicChartProgram.js +3 -1
- package/src/ChartProgram.js +2 -0
- package/src/accessibility.js +157 -0
- package/src/actions/basic.js +2 -2
- package/src/actions/boxPlots/components.js +20 -12
- package/src/actions/boxPlots/create.js +4 -5
- package/src/actions/boxPlots/edit.js +34 -9
- package/src/actions/boxPlots/materialize.js +12 -4
- package/src/actions/boxPlots/options.js +48 -16
- package/src/actions/canvas/actions.js +3 -3
- package/src/actions/canvas/fitting.js +1 -1
- package/src/actions/categoryOrder/index.js +21 -12
- package/src/actions/charts/area.js +6 -2
- package/src/actions/charts/bar.js +3 -2
- package/src/actions/charts/beeswarm.js +1 -1
- package/src/actions/charts/density.js +7 -3
- package/src/actions/charts/ecdf.js +6 -3
- package/src/actions/charts/endpoints.js +29 -7
- package/src/actions/charts/heatmap.js +3 -2
- package/src/actions/charts/histogram.js +5 -4
- package/src/actions/charts/horizon.js +4 -2
- package/src/actions/charts/interval-regression.js +7 -4
- package/src/actions/charts/line.js +4 -2
- package/src/actions/charts/parallel.js +9 -3
- package/src/actions/charts/pie.js +11 -3
- package/src/actions/charts/polar.js +17 -6
- package/src/actions/charts/radar.js +9 -3
- package/src/actions/charts/radial.js +12 -4
- package/src/actions/charts/raincloud.js +2 -2
- package/src/actions/charts/rug-strip.js +8 -4
- package/src/actions/charts/scatter.js +4 -2
- package/src/actions/composition/actions.js +29 -24
- package/src/actions/coordinates/actions.js +2 -2
- package/src/actions/coordinates/edit.js +76 -0
- package/src/actions/data/basicBin2d.js +4 -5
- package/src/actions/data/bin.js +3 -3
- package/src/actions/data/bin2d.js +63 -193
- package/src/actions/data/bin2dMaterialize.js +4 -5
- package/src/actions/data/box.js +4 -4
- package/src/actions/data/complete.js +26 -0
- package/src/actions/data/computed.js +4 -4
- package/src/actions/data/create.js +7 -14
- package/src/actions/data/density.js +15 -23
- package/src/actions/data/derived.js +57 -31
- package/src/actions/data/ecdf.js +2 -2
- package/src/actions/data/edit.js +551 -0
- package/src/actions/data/filter.js +28 -22
- package/src/actions/data/fold.js +2 -2
- package/src/actions/data/gradientProfile.js +2 -2
- package/src/actions/data/horizon.js +2 -2
- package/src/actions/data/impute.js +26 -0
- package/src/actions/data/index.js +62 -47
- package/src/actions/data/interval.js +2 -2
- package/src/actions/data/intervalEdit.js +26 -18
- package/src/actions/data/normalize.js +27 -0
- package/src/actions/data/regression.js +21 -27
- package/src/actions/data/revise.js +48 -0
- package/src/actions/data/revisionBindings.js +125 -0
- package/src/actions/data/shared.js +20 -4
- package/src/actions/data/stack.js +2 -2
- package/src/actions/data/summary.js +3 -3
- package/src/actions/data/timeUnit.js +6 -3
- package/src/actions/data/window.js +3 -3
- package/src/actions/encodings/angle.js +1 -1
- package/src/actions/encodings/appearance.js +4 -4
- package/src/actions/encodings/barWidth.js +1 -1
- package/src/actions/encodings/channels.js +415 -0
- package/src/actions/encodings/color/index.js +3 -2
- package/src/actions/encodings/density.js +7 -4
- package/src/actions/encodings/histogram.js +4 -3
- package/src/actions/encodings/horizon.js +6 -8
- package/src/actions/encodings/index.js +4 -0
- package/src/actions/encodings/offset.js +22 -15
- package/src/actions/encodings/parallel.js +4 -5
- package/src/actions/encodings/pathOrder.js +6 -11
- package/src/actions/encodings/position/apply.js +53 -7
- package/src/actions/encodings/position/index.js +14 -6
- package/src/actions/encodings/position/policies/bar.js +9 -0
- package/src/actions/encodings/position/resolve.js +24 -7
- package/src/actions/encodings/ranged.js +5 -5
- package/src/actions/encodings/remove.js +13 -9
- package/src/actions/encodings/ruleAppearance.js +2 -24
- package/src/actions/encodings/seriesLayout.js +2 -1
- package/src/actions/encodings/shared.js +82 -14
- package/src/actions/encodings/stroke.js +226 -0
- package/src/actions/encodings/strokeDash.js +2 -2
- package/src/actions/encodings/text.js +1 -1
- package/src/actions/errorBands/create.js +34 -20
- package/src/actions/errorBands/edit.js +34 -137
- package/src/actions/errorBars/create.js +43 -20
- package/src/actions/errorBars/edit.js +29 -125
- package/src/actions/facets/actions.js +267 -73
- package/src/actions/facets/derive.js +99 -28
- package/src/actions/facets/guides.js +4 -5
- package/src/actions/facets/replay.js +4 -5
- package/src/actions/gradientPlots/components.js +15 -8
- package/src/actions/gradientPlots/create.js +4 -5
- package/src/actions/gradientPlots/edit.js +18 -9
- package/src/actions/gradientPlots/materialize.js +5 -3
- package/src/actions/gradientPlots/options.js +10 -2
- package/src/actions/gradientPlots/rebind.js +4 -5
- package/src/actions/guides/applicability.js +8 -2
- package/src/actions/guides/axes/axes.js +23 -4
- package/src/actions/guides/axes/axis.js +2 -2
- package/src/actions/guides/axes/edit.js +2 -2
- package/src/actions/guides/axes/labels.js +67 -21
- package/src/actions/guides/axes/lines.js +15 -9
- package/src/actions/guides/axes/parallel/lifecycle.js +13 -13
- package/src/actions/guides/axes/parallel/resolve.js +6 -2
- package/src/actions/guides/axes/parallel.js +5 -5
- package/src/actions/guides/axes/remove.js +4 -4
- package/src/actions/guides/axes/tickGroups.js +6 -5
- package/src/actions/guides/axes/ticks.js +19 -6
- package/src/actions/guides/axes/titles.js +21 -13
- package/src/actions/guides/grids/grid.js +18 -29
- package/src/actions/guides/grids/resolve.js +7 -2
- package/src/actions/guides/guides.js +20 -4
- package/src/actions/guides/legends/blocks.js +426 -0
- package/src/actions/guides/legends/categorical/actions.js +138 -52
- package/src/actions/guides/legends/categorical/components.js +55 -45
- package/src/actions/guides/legends/categorical/index.js +37 -33
- package/src/actions/guides/legends/categorical/layout.js +98 -16
- package/src/actions/guides/legends/categorical/options.js +2 -2
- package/src/actions/guides/legends/categorical/recipes.js +111 -20
- package/src/actions/guides/legends/categorical/resolve.js +12 -8
- package/src/actions/guides/legends/categorical/symbols.js +104 -52
- package/src/actions/guides/legends/continuous/common.js +76 -20
- package/src/actions/guides/legends/continuous/gradient.js +95 -158
- package/src/actions/guides/legends/continuous/index.js +2 -0
- package/src/actions/guides/legends/continuous/interval.js +21 -16
- package/src/actions/guides/legends/continuous/opacity.js +37 -83
- package/src/actions/guides/legends/continuous/stroke.js +225 -0
- package/src/actions/guides/legends/creation.js +14 -1
- package/src/actions/guides/legends/edit.js +159 -60
- package/src/actions/guides/legends/focused.js +5 -5
- package/src/actions/guides/legends/index.js +2 -0
- package/src/actions/guides/legends/lane.js +59 -24
- package/src/actions/guides/legends/lifecycle.js +19 -8
- package/src/actions/guides/legends/remove.js +17 -8
- package/src/actions/guides/legends/sampling.js +140 -0
- package/src/actions/guides/legends/size.js +100 -108
- package/src/actions/guides/legends/strokeWidth.js +38 -92
- package/src/actions/guides/legends/target.js +112 -1
- package/src/actions/guides/legends/transition.js +165 -16
- package/src/actions/guides/polar/axes/facade.js +8 -8
- package/src/actions/guides/polar/axes/labels.js +29 -10
- package/src/actions/guides/polar/axes/lines.js +19 -19
- package/src/actions/guides/polar/axes/shared.js +16 -0
- package/src/actions/guides/polar/axes/ticks.js +10 -16
- package/src/actions/guides/polar/axes/titles.js +6 -6
- package/src/actions/guides/polar/grids.js +12 -14
- package/src/actions/guides/polar/resolve.js +12 -8
- package/src/actions/index.js +16 -3
- package/src/actions/intervals/revision.js +126 -0
- package/src/actions/marks/arc/actions.js +80 -22
- package/src/actions/marks/area/actions.js +38 -13
- package/src/actions/marks/area/materialize.js +17 -1
- package/src/actions/marks/bar/create.js +12 -3
- package/src/actions/marks/bar/edit.js +21 -4
- package/src/actions/marks/bar/materialize.js +34 -40
- package/src/actions/marks/index.js +10 -1
- package/src/actions/marks/line/actions.js +40 -17
- package/src/actions/marks/line/materialize.js +29 -10
- package/src/actions/marks/point/create.js +9 -3
- package/src/actions/marks/point/edit.js +19 -7
- package/src/actions/marks/point/jitter.js +6 -8
- package/src/actions/marks/point/materialize.js +48 -22
- package/src/actions/marks/point/packing.js +6 -8
- package/src/actions/marks/rect/actions.js +36 -15
- package/src/actions/marks/references.js +602 -33
- package/src/actions/marks/remove.js +67 -41
- package/src/actions/marks/rule/actions.js +51 -14
- package/src/actions/marks/shared.js +1 -1
- package/src/actions/marks/text/actions.js +79 -14
- package/src/actions/marks/text/index.js +4 -0
- package/src/actions/marks/text/layout.js +157 -17
- package/src/actions/marks/text/removal.js +173 -0
- package/src/actions/marks/text/selection.js +72 -0
- package/src/actions/marks/tick/actions.js +25 -8
- package/src/actions/primitives/createGraphics.js +5 -4
- package/src/actions/primitives/editGraphics.js +31 -4
- package/src/actions/primitives/graphicProperties.js +6 -0
- package/src/actions/primitives/semantic.js +11 -3
- package/src/actions/primitives/semanticAction.js +90 -14
- package/src/actions/primitives/semanticValidation/dataset.js +2 -4
- package/src/actions/primitives/semanticValidation/guide.js +1 -1
- package/src/actions/primitives/semanticValidation/index.js +9 -1
- package/src/actions/primitives/semanticValidation/layer.js +5 -0
- package/src/actions/primitives/semanticValidation/scale.js +28 -7
- package/src/actions/regression/components.js +36 -25
- package/src/actions/regression/create.js +13 -6
- package/src/actions/regression/edit.js +24 -11
- package/src/actions/resources/index.js +7 -0
- package/src/actions/resources/remove.js +173 -0
- package/src/actions/scales/channels.js +212 -0
- package/src/actions/scales/consumers/common.js +1 -1
- package/src/actions/scales/consumers/families.js +3 -2
- package/src/actions/scales/consumers/index.js +19 -2
- package/src/actions/scales/consumers/seriesLayout.js +28 -14
- package/src/actions/scales/create.js +55 -23
- package/src/actions/scales/definitions.js +94 -40
- package/src/actions/scales/edit.js +67 -12
- package/src/actions/scales/editPolicy.js +81 -11
- package/src/actions/scales/index.js +6 -0
- package/src/actions/scales/materialize.js +5 -4
- package/src/actions/scales/offset.js +48 -0
- package/src/actions/scales/parallel.js +71 -0
- package/src/actions/scales/preview.js +111 -10
- package/src/actions/scales/quantitativeColor.js +4 -5
- package/src/actions/selection/actions.js +179 -66
- package/src/actions/selection/index.js +3 -0
- package/src/actions/textMetrics/index.js +56 -0
- package/src/actions/theme/actions.js +70 -15
- package/src/actions/theme/composition.js +238 -0
- package/src/actions/theme/index.js +9 -2
- package/src/actions/theme/reconcile.js +313 -121
- package/src/actions/theme/state.js +160 -0
- package/src/actions/titles/actions.js +8 -8
- package/src/actions/titles/resolve.js +3 -3
- package/src/actions/violinPlots/create.js +6 -3
- package/src/actions/violinPlots/edit.js +2 -1
- package/src/core/action.js +117 -35
- package/src/core/compositionState.js +6 -1
- package/src/core/diagnostics.js +16 -0
- package/src/core/extensionRegistry.js +27 -0
- package/src/core/font.js +18 -0
- package/src/core/identifiers.js +5 -4
- package/src/core/immutable.js +10 -3
- package/src/core/optionRequirements.js +8 -0
- package/src/core/programState.js +21 -1
- package/src/core/resourceReferences.js +341 -0
- package/src/core/textMetricProfile.js +28 -0
- package/src/core/textMetrics.js +24 -3
- package/src/core/validation.js +22 -10
- package/src/core/vocabulary.js +16 -3
- package/src/diagnostics.js +1 -0
- package/src/grammar/bars/aggregate.js +4 -1
- package/src/grammar/bars/geometry.js +44 -0
- package/src/grammar/bin.js +54 -9
- package/src/grammar/complete.js +279 -0
- package/src/grammar/computed.js +265 -64
- package/src/grammar/coordinates.js +37 -0
- package/src/grammar/density.js +239 -37
- package/src/grammar/displayLabels.js +57 -0
- package/src/grammar/facets/dependencies.js +133 -1
- package/src/grammar/facets/guides.js +3 -0
- package/src/grammar/facets/index.js +7 -47
- package/src/grammar/facets/scales.js +15 -18
- package/src/grammar/impute.js +341 -0
- package/src/grammar/markLabelSelection.js +57 -0
- package/src/grammar/markLabels.js +18 -1
- package/src/grammar/normalize.js +366 -0
- package/src/grammar/pathSeries.js +26 -8
- package/src/grammar/pointShapes.js +13 -4
- package/src/grammar/polar.js +90 -8
- package/src/grammar/regression/index.js +1 -0
- package/src/grammar/regression/parameters.js +23 -0
- package/src/grammar/roundedRect.js +180 -0
- package/src/grammar/rules.js +1 -0
- package/src/grammar/scales/colorConsumers.js +20 -1
- package/src/grammar/scales/continuous.js +2 -2
- package/src/grammar/scales/definition.js +27 -4
- package/src/grammar/scales/index.js +1 -0
- package/src/grammar/scales/ordinal.js +12 -3
- package/src/grammar/scales/policies.js +2 -2
- package/src/grammar/scales/size.js +456 -0
- package/src/grammar/scales/types.js +8 -0
- package/src/grammar/schemas/concreteGraphic.js +14 -2
- package/src/grammar/schemas/graphic.js +15 -0
- package/src/grammar/schemas/graphicBounds.js +190 -41
- package/src/grammar/schemas/semanticPath.js +7 -2
- package/src/grammar/statisticalReference.js +103 -0
- package/src/grammar/strokeStyle.js +77 -0
- package/src/grammar/summary.js +78 -16
- package/src/grammar/timeUnit.js +216 -5
- package/src/grammar/transformTopology.js +4 -0
- package/src/grammar/transforms.js +394 -28
- package/src/grammar/weightedStatistics.js +374 -0
- package/src/grammar/window.js +221 -16
- package/src/layout/aspect.js +80 -0
- package/src/layout/facets.js +59 -5
- package/src/layout/labels.js +351 -7
- package/src/layout/legend.js +4 -4
- package/src/layout/legendItems.js +6 -6
- package/src/layout/text.js +10 -9
- package/src/layout/title.js +9 -9
- package/src/materialization/bars/aggregate.js +25 -2
- package/src/materialization/bars/histogram.js +84 -24
- package/src/materialization/bars/ranged.js +19 -3
- package/src/materialization/bars/resolve.js +7 -4
- package/src/materialization/composition.js +3 -1
- package/src/materialization/coordinateBounds.js +204 -0
- package/src/materialization/dependencies.js +36 -0
- package/src/materialization/facetGuides/legacyCategorical.js +3 -0
- package/src/materialization/facetGuides/placement.js +9 -3
- package/src/materialization/facetGuides/preparation.js +13 -8
- package/src/materialization/facetHeaders.js +347 -0
- package/src/materialization/facets.js +15 -65
- package/src/materialization/guides/layout.js +3 -3
- package/src/materialization/guides/resources.js +26 -0
- package/src/materialization/legends.js +1 -1
- package/src/materialization/marks/index.js +11 -5
- package/src/materialization/marks/policies.js +2 -1
- package/src/materialization/rect.js +25 -12
- package/src/materialization/rectConfig.js +5 -1
- package/src/materialization/scaleGuideDependencies.js +10 -0
- package/src/materialization/scales/map.js +5 -3
- package/src/materialization/scales/policies/binnedPosition.js +2 -2
- package/src/materialization/scales/policies/offset.js +50 -8
- package/src/materialization/scales/policies/series.js +4 -1
- package/src/materialization/scales/resolve.js +22 -6
- package/src/materialization/selection/items/arc.js +28 -4
- package/src/materialization/selection/items/bar.js +30 -3
- package/src/materialization/selection/items/common.js +20 -5
- package/src/materialization/selection/items/rect.js +28 -4
- package/src/materialization/selection/path.js +1 -1
- package/src/materialization/selection/point.js +3 -1
- package/src/materialization/text.js +265 -14
- package/src/materialization/typography.js +31 -0
- package/src/mcp/cli.js +5 -3
- package/src/persistence/codec.js +65 -0
- package/src/persistence/validation.js +185 -0
- package/src/persistence.js +74 -0
- package/src/renderers/canvas/circle.js +2 -3
- package/src/renderers/canvas/index.js +5 -4
- package/src/renderers/canvas/line.js +2 -3
- package/src/renderers/canvas/native.js +4 -4
- package/src/renderers/canvas/path.js +2 -3
- package/src/renderers/canvas/rect.js +2 -3
- package/src/renderers/canvas/stroke.js +11 -0
- package/src/renderers/nativeBackend.js +10 -0
- package/src/renderers/options.js +13 -0
- package/src/renderers/pdf.js +25 -54
- package/src/renderers/png.js +22 -17
- package/src/renderers/svg.js +29 -14
- package/src/renderers/text.js +1 -11
- package/src/selectors/coordinates.js +3 -1
- package/src/selectors/datasets.js +38 -5
- package/src/selectors/layers.js +10 -4
- package/src/selectors/markOwners.js +46 -0
- package/src/selectors/scales.js +6 -4
- package/src/theme/defaults.js +103 -1
- package/src/version.js +2 -0
- package/types/accessibility.d.ts +37 -0
- package/types/basic.d.ts +10 -2
- package/types/diagnostics.d.ts +15 -0
- package/types/index.d.ts +90 -0
- package/types/pdf.d.ts +9 -0
- package/types/persistence.d.ts +7 -0
- package/types/png.d.ts +9 -0
- package/types/program.d.ts +944 -118
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { findLayer } from "./layers.js";
|
|
2
|
+
|
|
3
|
+
export function ownedChildren(program, id) {
|
|
4
|
+
const config = program.markConfigs[id] ?? {};
|
|
5
|
+
return [
|
|
6
|
+
config.errorBar?.lowerCapId,
|
|
7
|
+
config.errorBar?.upperCapId,
|
|
8
|
+
config.errorBand?.lowerBoundaryId,
|
|
9
|
+
config.errorBand?.upperBoundaryId,
|
|
10
|
+
config.regression?.bandId,
|
|
11
|
+
config.regression?.lineId,
|
|
12
|
+
config.boxPlot?.whiskerId,
|
|
13
|
+
config.boxPlot?.medianId,
|
|
14
|
+
config.boxPlot?.outlierId,
|
|
15
|
+
config.gradientPlot?.centerId,
|
|
16
|
+
config.intervalPlot?.intervalId,
|
|
17
|
+
config.endpointPlot?.roles?.stemId,
|
|
18
|
+
config.endpointPlot?.roles?.startId,
|
|
19
|
+
config.endpointPlot?.roles?.connectorId,
|
|
20
|
+
...(config.raincloudPlot?.ownedChildIds ?? [])
|
|
21
|
+
].concat(
|
|
22
|
+
program.semanticSpec.layers
|
|
23
|
+
.filter(layer => layer.source === id)
|
|
24
|
+
.map(layer => layer.id)
|
|
25
|
+
).concat(
|
|
26
|
+
program.semanticSpec.layers
|
|
27
|
+
.filter(layer =>
|
|
28
|
+
program.markConfigs[layer.id]?.statisticalReference?.source === id
|
|
29
|
+
)
|
|
30
|
+
.map(layer => layer.id)
|
|
31
|
+
).filter(child => child !== undefined && child !== id && findLayer(program, child) !== undefined);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function ownership(program) {
|
|
35
|
+
const ownerByChild = new Map();
|
|
36
|
+
for (const layer of program.semanticSpec.layers) {
|
|
37
|
+
for (const child of ownedChildren(program, layer.id)) {
|
|
38
|
+
if (program.markConfigs[child]?.statisticalReference !== undefined) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
ownerByChild.set(child, layer.id);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return ownerByChild;
|
|
45
|
+
}
|
|
46
|
+
|
package/src/selectors/scales.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
import { annotateError } from "../core/diagnostics.js";
|
|
2
|
+
|
|
1
3
|
export function findSemanticScale(program, id) {
|
|
2
4
|
return program.semanticSpec.scales.find(scale => scale.id === id);
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
export function requireSemanticScale(program, id) {
|
|
6
8
|
const scale = findSemanticScale(program, id);
|
|
7
|
-
if (scale === undefined) throw new Error(`Unknown scale "${id}".`);
|
|
9
|
+
if (scale === undefined) throw annotateError(new Error(`Unknown scale "${id}".`), { code: "missing-resource", resourceId: id });
|
|
8
10
|
return scale;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
export function requireResolvedScale(program, id, type) {
|
|
12
|
-
const scale = program.resolvedScales[id];
|
|
14
|
+
const scale = Object.hasOwn(program.resolvedScales, id) ? program.resolvedScales[id] : undefined;
|
|
13
15
|
if (scale === undefined || (type !== undefined && scale.type !== type)) {
|
|
14
|
-
throw new Error(
|
|
16
|
+
throw annotateError(new Error(
|
|
15
17
|
type === undefined
|
|
16
18
|
? `Unknown resolved scale "${id}".`
|
|
17
19
|
: `Expected resolved ${type} scale "${id}".`
|
|
18
|
-
);
|
|
20
|
+
), { code: scale === undefined ? "missing-resource" : "incompatible-resource", resourceId: id });
|
|
19
21
|
}
|
|
20
22
|
return scale;
|
|
21
23
|
}
|
package/src/theme/defaults.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { DEFAULT_FONT_FAMILY } from "../core/font.js";
|
|
2
|
+
export { DEFAULT_FONT_FAMILY };
|
|
2
3
|
|
|
3
4
|
export const DEFAULT_POINT_RADIUS = 3;
|
|
4
5
|
|
|
@@ -23,6 +24,56 @@ export const DEFAULT_COLORS = Object.freeze({
|
|
|
23
24
|
|
|
24
25
|
export const THEME_NAMES = Object.freeze(["light", "dark"]);
|
|
25
26
|
|
|
27
|
+
export const THEME_TOKEN_KEYS = Object.freeze([
|
|
28
|
+
"background",
|
|
29
|
+
"mark",
|
|
30
|
+
"text",
|
|
31
|
+
"strongText",
|
|
32
|
+
"mutedText",
|
|
33
|
+
"axis",
|
|
34
|
+
"axisTitle",
|
|
35
|
+
"grid",
|
|
36
|
+
"border",
|
|
37
|
+
"sizeSymbol",
|
|
38
|
+
"regressionBand",
|
|
39
|
+
"boxLine",
|
|
40
|
+
"boxMedian",
|
|
41
|
+
"referenceLine",
|
|
42
|
+
"referenceBand",
|
|
43
|
+
"gradientCenter",
|
|
44
|
+
"highlight",
|
|
45
|
+
"fontFamily"
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
const THEME_DEFINITION_KEYS = Object.freeze(["base", "tokens"]);
|
|
49
|
+
|
|
50
|
+
function isPlainObject(value) {
|
|
51
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const prototype = Object.getPrototypeOf(value);
|
|
55
|
+
return prototype === Object.prototype || prototype === null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function own(value) {
|
|
59
|
+
return Object.freeze({ ...value });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function validateKeys(value, allowed, label) {
|
|
63
|
+
const supported = new Set(allowed);
|
|
64
|
+
const unknown = Object.keys(value).find(key => !supported.has(key));
|
|
65
|
+
if (unknown !== undefined) {
|
|
66
|
+
throw new Error(`Unknown ${label} option "${unknown}".`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function validateNonEmptyString(value, label) {
|
|
71
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
72
|
+
throw new TypeError(`${label} must be a non-empty string.`);
|
|
73
|
+
}
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
26
77
|
export const THEME_TOKENS = Object.freeze({
|
|
27
78
|
light: Object.freeze({
|
|
28
79
|
background: "white",
|
|
@@ -54,3 +105,54 @@ export const THEME_TOKENS = Object.freeze({
|
|
|
54
105
|
export function themeTokens(name = "light") {
|
|
55
106
|
return THEME_TOKENS[name];
|
|
56
107
|
}
|
|
108
|
+
|
|
109
|
+
function validateThemeName(value, label) {
|
|
110
|
+
if (!THEME_NAMES.includes(value)) {
|
|
111
|
+
throw new Error(`Unsupported ${label} "${value}".`);
|
|
112
|
+
}
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function normalizeThemeTokens(tokens) {
|
|
117
|
+
if (!isPlainObject(tokens)) {
|
|
118
|
+
throw new TypeError("applyTheme theme.tokens must be a plain object.");
|
|
119
|
+
}
|
|
120
|
+
validateKeys(tokens, THEME_TOKEN_KEYS, "applyTheme theme.tokens");
|
|
121
|
+
const normalized = {};
|
|
122
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
123
|
+
validateNonEmptyString(value, `applyTheme theme.tokens.${key}`);
|
|
124
|
+
normalized[key] = value;
|
|
125
|
+
}
|
|
126
|
+
return own(normalized);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function normalizeThemeDefinition(definition) {
|
|
130
|
+
if (typeof definition === "string") {
|
|
131
|
+
return own({
|
|
132
|
+
name: validateThemeName(definition, "theme"),
|
|
133
|
+
tokens: own({})
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (!isPlainObject(definition)) {
|
|
137
|
+
throw new TypeError(
|
|
138
|
+
"applyTheme theme must be a built-in name or a plain { base, tokens } object."
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
validateKeys(definition, THEME_DEFINITION_KEYS, "applyTheme theme");
|
|
142
|
+
if (!Object.hasOwn(definition, "base") ||
|
|
143
|
+
!Object.hasOwn(definition, "tokens")) {
|
|
144
|
+
throw new Error("applyTheme custom theme requires base and tokens.");
|
|
145
|
+
}
|
|
146
|
+
return own({
|
|
147
|
+
name: validateThemeName(definition.base, "theme base"),
|
|
148
|
+
tokens: normalizeThemeTokens(definition.tokens)
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function resolveThemeTokens(definition = "light") {
|
|
153
|
+
const normalized = normalizeThemeDefinition(definition);
|
|
154
|
+
return own({
|
|
155
|
+
...THEME_TOKENS[normalized.name],
|
|
156
|
+
...normalized.tokens
|
|
157
|
+
});
|
|
158
|
+
}
|
package/src/version.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ChartProgram } from "./program.js";
|
|
2
|
+
import type { BasicChartProgram } from "./basic.js";
|
|
3
|
+
|
|
4
|
+
export interface AccessibleColumn {
|
|
5
|
+
readonly key: string;
|
|
6
|
+
readonly role: string;
|
|
7
|
+
readonly component: string;
|
|
8
|
+
readonly field?: string;
|
|
9
|
+
readonly aggregate?: string;
|
|
10
|
+
readonly unit?: "utc-milliseconds";
|
|
11
|
+
}
|
|
12
|
+
export interface AccessibleRow {
|
|
13
|
+
readonly component: string;
|
|
14
|
+
readonly series: Readonly<Record<string, unknown>>;
|
|
15
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
16
|
+
}
|
|
17
|
+
export interface AccessibleOwnerView {
|
|
18
|
+
readonly ownerId: string;
|
|
19
|
+
readonly markType: string;
|
|
20
|
+
readonly columns: readonly AccessibleColumn[];
|
|
21
|
+
readonly rows: readonly AccessibleRow[];
|
|
22
|
+
readonly units: Readonly<Record<string, "utc-milliseconds">>;
|
|
23
|
+
}
|
|
24
|
+
export interface AccessibleChildView {
|
|
25
|
+
readonly ownerId: string;
|
|
26
|
+
readonly kind: "composition-child";
|
|
27
|
+
readonly title: string | null;
|
|
28
|
+
readonly facet?: Readonly<Record<string, unknown>>;
|
|
29
|
+
readonly views: readonly AccessibleView[];
|
|
30
|
+
}
|
|
31
|
+
export type AccessibleView = AccessibleOwnerView | AccessibleChildView;
|
|
32
|
+
export interface AccessibleData {
|
|
33
|
+
readonly schemaVersion: 1;
|
|
34
|
+
readonly title: string | null;
|
|
35
|
+
readonly views: readonly AccessibleView[];
|
|
36
|
+
}
|
|
37
|
+
export function exportAccessibleData(program: ChartProgram | BasicChartProgram, options?: { readonly target?: string }): AccessibleData;
|
package/types/basic.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartProgram, BasicSeriesLayoutOptions } from "./program.js";
|
|
1
|
+
import type { ChartProgram, BasicSeriesLayoutOptions, CreateDataOptions } from "./program.js";
|
|
2
2
|
|
|
3
3
|
export type {
|
|
4
4
|
AxisLabelOptions,
|
|
@@ -6,6 +6,8 @@ export type {
|
|
|
6
6
|
AxisTickOptions,
|
|
7
7
|
AxisTicksAndLabelsOptions,
|
|
8
8
|
AxisTitleOptions,
|
|
9
|
+
DisplayLabelMap,
|
|
10
|
+
DisplayLabelOptions,
|
|
9
11
|
ApplyThemeOptions,
|
|
10
12
|
BarWidthOptions,
|
|
11
13
|
BasicSeriesLayoutOptions,
|
|
@@ -15,6 +17,7 @@ export type {
|
|
|
15
17
|
CompleteAxisOptions,
|
|
16
18
|
CreateAxesOptions,
|
|
17
19
|
CreateBarPlotOptions,
|
|
20
|
+
CreateDataOptions,
|
|
18
21
|
CreateGridOptions,
|
|
19
22
|
CreateGuidesOptions,
|
|
20
23
|
CreateHeatmapOptions,
|
|
@@ -29,12 +32,16 @@ export type {
|
|
|
29
32
|
LegendOptions,
|
|
30
33
|
PositionEncodingOptions,
|
|
31
34
|
RectMarkOptions,
|
|
35
|
+
RectStyleDetails,
|
|
32
36
|
ScaleOptions,
|
|
33
37
|
SecondaryPositionEncodingOptions,
|
|
34
38
|
SemanticSpec,
|
|
35
39
|
StrokeDashEncodingOptions,
|
|
40
|
+
StrokeStyleDetails,
|
|
36
41
|
TemporalInputUnit,
|
|
42
|
+
ThemeDefinition,
|
|
37
43
|
ThemeName,
|
|
44
|
+
ThemeTokens,
|
|
38
45
|
TraceNode,
|
|
39
46
|
XAxisPosition,
|
|
40
47
|
XOffsetEncodingOptions,
|
|
@@ -105,7 +112,8 @@ type RebindMethod<T> = T extends (...args: infer Args) => ChartProgram
|
|
|
105
112
|
|
|
106
113
|
export type BasicChartProgram =
|
|
107
114
|
Pick<ChartProgram, BasicStateKey> &
|
|
108
|
-
{ readonly [Key in BasicMethodKey]: RebindMethod<ChartProgram[Key]> } &
|
|
115
|
+
{ readonly [Key in Exclude<BasicMethodKey, "createData">]: RebindMethod<ChartProgram[Key]> } &
|
|
116
|
+
{ createData<Row extends object>(options: CreateDataOptions<Row>): BasicChartProgram } &
|
|
109
117
|
{ readonly layoutSeries: (options: BasicSeriesLayoutOptions) => BasicChartProgram };
|
|
110
118
|
|
|
111
119
|
export function chart(): BasicChartProgram;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ErrorCode = "invalid-option" | "invalid-value" | "missing-resource" |
|
|
2
|
+
"ambiguous-resource" | "incompatible-resource" | "resource-in-use" |
|
|
3
|
+
"resource-limit" | "unsupported-format" | "action-failed";
|
|
4
|
+
|
|
5
|
+
export interface ErrorDetails {
|
|
6
|
+
readonly code: ErrorCode;
|
|
7
|
+
readonly operation?: string;
|
|
8
|
+
readonly optionPath?: string;
|
|
9
|
+
readonly resourceId?: string;
|
|
10
|
+
readonly candidates?: readonly string[];
|
|
11
|
+
readonly limit?: number;
|
|
12
|
+
readonly actual?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getErrorDetails(error: unknown): ErrorDetails | undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { ChartProgram, CompositionOptions } from "./program.js";
|
|
2
2
|
|
|
3
3
|
export type {
|
|
4
|
+
TextMetricFontWeight,
|
|
5
|
+
TextMeasurement,
|
|
6
|
+
TextMetricsProfile,
|
|
7
|
+
ApplyTextMetricsOptions,
|
|
8
|
+
ReviseDataOptions,
|
|
4
9
|
ActionOptions,
|
|
5
10
|
AxisFormat,
|
|
6
11
|
AxisFormatString,
|
|
@@ -18,6 +23,8 @@ export type {
|
|
|
18
23
|
AxisTickStyleOptions,
|
|
19
24
|
AxisTitleOptions,
|
|
20
25
|
AxisValue,
|
|
26
|
+
DisplayLabelMap,
|
|
27
|
+
DisplayLabelOptions,
|
|
21
28
|
BarWidthOptions,
|
|
22
29
|
BoxPlotOptions,
|
|
23
30
|
BinnedHeatmapColorOptions,
|
|
@@ -30,6 +37,7 @@ export type {
|
|
|
30
37
|
BinDataOptions,
|
|
31
38
|
BinDataOutputFields,
|
|
32
39
|
BindMarkDataOptions,
|
|
40
|
+
RemoveResourceOptions,
|
|
33
41
|
CanvasOptions,
|
|
34
42
|
FitCanvasOptions,
|
|
35
43
|
FoldDataOptions,
|
|
@@ -41,20 +49,37 @@ export type {
|
|
|
41
49
|
ColorLayout,
|
|
42
50
|
SeriesLayoutOptions,
|
|
43
51
|
BasicSeriesLayoutOptions,
|
|
52
|
+
StrokeStyleDetails,
|
|
53
|
+
RectStyleDetails,
|
|
44
54
|
CreateAreaPlotOptions,
|
|
45
55
|
AreaPlotIndependentChannel,
|
|
46
56
|
AreaPlotMeasureChannel,
|
|
47
57
|
ColorEncodingOptions,
|
|
58
|
+
StrokeEncodingOptions,
|
|
59
|
+
EncodeChannelsOptions,
|
|
60
|
+
EncodingChannelAssignments,
|
|
61
|
+
SizeEncodingOptions,
|
|
62
|
+
ShapeEncodingOptions,
|
|
63
|
+
AngleEncodingOptions,
|
|
48
64
|
CompleteAxisOptions,
|
|
49
65
|
ConcatCompositionSpec,
|
|
50
66
|
CompositionAlign,
|
|
51
67
|
CompositionOptions,
|
|
52
68
|
EditFacetSourceOptions,
|
|
69
|
+
FacetHeaderRole,
|
|
70
|
+
FacetHeaderSide,
|
|
71
|
+
FacetHeaderAlign,
|
|
53
72
|
CompositionPadding,
|
|
54
73
|
CompositionProgramEntry,
|
|
55
74
|
CompositionSpec,
|
|
56
75
|
ComputedDataOptions,
|
|
57
76
|
ComputedExpression,
|
|
77
|
+
CompleteDataOptions,
|
|
78
|
+
ImputedDataOptions,
|
|
79
|
+
NormalizedDataOptions,
|
|
80
|
+
NormalizeBaseline,
|
|
81
|
+
NormalizeMethod,
|
|
82
|
+
NormalizeZeroDenominator,
|
|
58
83
|
ChartProgram,
|
|
59
84
|
ConcretePathCommand,
|
|
60
85
|
CurveInterpolation,
|
|
@@ -75,10 +100,20 @@ export type {
|
|
|
75
100
|
CreateThetaAxisTicksOptions,
|
|
76
101
|
CreateRadialAxisTicksOptions,
|
|
77
102
|
CreateThetaAxisLabelsOptions,
|
|
103
|
+
ThetaAxisLabelOptions,
|
|
104
|
+
ThetaTicksAndLabelsOptions,
|
|
105
|
+
CompleteThetaAxisOptions,
|
|
106
|
+
EditThetaAxisOptions,
|
|
78
107
|
CreateRadialAxisLabelsOptions,
|
|
79
108
|
CreateThetaAxisTitleOptions,
|
|
80
109
|
CreateRadialAxisTitleOptions,
|
|
81
110
|
CreateCoordinateOptions,
|
|
111
|
+
CoordinateAspect,
|
|
112
|
+
CoordinateAspectAlign,
|
|
113
|
+
PolarFrameCenter,
|
|
114
|
+
PolarFrameRadius,
|
|
115
|
+
PolarFrameOptions,
|
|
116
|
+
EditCoordinateOptions,
|
|
82
117
|
CreateGuidesOptions,
|
|
83
118
|
CreateGridOptions,
|
|
84
119
|
CreateBarPlotOptions,
|
|
@@ -155,6 +190,9 @@ export type {
|
|
|
155
190
|
ECDFOutputFields,
|
|
156
191
|
ECDFDataOptions,
|
|
157
192
|
DatasetComputedTransform,
|
|
193
|
+
DatasetCompleteTransform,
|
|
194
|
+
DatasetImputedTransform,
|
|
195
|
+
DatasetNormalizedTransform,
|
|
158
196
|
DatasetHorizonTransform,
|
|
159
197
|
DensityPlacement,
|
|
160
198
|
BaselineDensityPlacement,
|
|
@@ -173,12 +211,33 @@ export type {
|
|
|
173
211
|
DatasetWindowOperation,
|
|
174
212
|
DatasetWindowSort,
|
|
175
213
|
DatasetWindowTransform,
|
|
214
|
+
DurationWindowFrame,
|
|
215
|
+
DurationWindowUnit,
|
|
176
216
|
DatasetRegressionTransform,
|
|
177
217
|
DatasetScalar,
|
|
218
|
+
StatisticalWeight,
|
|
178
219
|
DatasetStackTransform,
|
|
179
220
|
DatasetTransform,
|
|
221
|
+
RequestedDatasetTransform,
|
|
222
|
+
DerivedDataDependents,
|
|
223
|
+
EditDerivedDataOptions,
|
|
180
224
|
EditGraphicsOptions,
|
|
181
225
|
EditBin2DDataOptions,
|
|
226
|
+
EditComputedDataOptions,
|
|
227
|
+
EditFilteredDataOptions,
|
|
228
|
+
EditFoldDataOptions,
|
|
229
|
+
EditSummaryDataOptions,
|
|
230
|
+
EditBinDataOptions,
|
|
231
|
+
EditTimeUnitDataOptions,
|
|
232
|
+
EditWindowDataOptions,
|
|
233
|
+
EditDensityDataOptions,
|
|
234
|
+
EditStackDataOptions,
|
|
235
|
+
EditRegressionDataOptions,
|
|
236
|
+
EditIntervalDataOptions,
|
|
237
|
+
EditECDFDataOptions,
|
|
238
|
+
EditNormalizedDataOptions,
|
|
239
|
+
EditCompleteDataOptions,
|
|
240
|
+
EditImputedDataOptions,
|
|
182
241
|
EditHorizonOptions,
|
|
183
242
|
EditCompositionLayoutOptions,
|
|
184
243
|
EditFacetHeadersOptions,
|
|
@@ -198,6 +257,18 @@ export type {
|
|
|
198
257
|
EditLegendSymbolsOptions,
|
|
199
258
|
EditLegendTitleOptions,
|
|
200
259
|
EditScaleOptions,
|
|
260
|
+
EditXScaleOptions,
|
|
261
|
+
EditYScaleOptions,
|
|
262
|
+
EditParallelScaleOptions,
|
|
263
|
+
EditThetaScaleOptions,
|
|
264
|
+
EditRScaleOptions,
|
|
265
|
+
EditColorScaleOptions,
|
|
266
|
+
EditStrokeScaleOptions,
|
|
267
|
+
EditSizeScaleOptions,
|
|
268
|
+
EditOpacityScaleOptions,
|
|
269
|
+
EditShapeScaleOptions,
|
|
270
|
+
EditStrokeWidthScaleOptions,
|
|
271
|
+
EditStrokeDashScaleOptions,
|
|
201
272
|
EditSemanticOptions,
|
|
202
273
|
FieldType,
|
|
203
274
|
FillPaint,
|
|
@@ -249,6 +320,10 @@ export type {
|
|
|
249
320
|
LabelLayoutOptions,
|
|
250
321
|
LabelLeaderOptions,
|
|
251
322
|
LegendOptions,
|
|
323
|
+
LegendChannel,
|
|
324
|
+
LegendBlockTextPatch,
|
|
325
|
+
LegendBlockSymbolPatch,
|
|
326
|
+
EditLegendBlockOptions,
|
|
252
327
|
EditLegendOptions,
|
|
253
328
|
ContinuousColorInterpolation,
|
|
254
329
|
ContinuousColorScaleOptions,
|
|
@@ -256,6 +331,9 @@ export type {
|
|
|
256
331
|
OpacityScaleOptions,
|
|
257
332
|
OrderCategoriesOptions,
|
|
258
333
|
OffsetScaleOptions,
|
|
334
|
+
OffsetScaleEditPatch,
|
|
335
|
+
EditXOffsetScaleOptions,
|
|
336
|
+
EditYOffsetScaleOptions,
|
|
259
337
|
PathOrderEncodingOptions,
|
|
260
338
|
ParallelCoordinatesEncodingOptions,
|
|
261
339
|
ParallelDimension,
|
|
@@ -317,8 +395,11 @@ export type {
|
|
|
317
395
|
ThetaScaleOptions,
|
|
318
396
|
TimeUnit,
|
|
319
397
|
TimeUnitDataOptions,
|
|
398
|
+
RowWindowFrame,
|
|
320
399
|
TemporalInputUnit,
|
|
400
|
+
ThemeDefinition,
|
|
321
401
|
ThemeName,
|
|
402
|
+
ThemeTokens,
|
|
322
403
|
ApplyThemeOptions,
|
|
323
404
|
TraceNode,
|
|
324
405
|
TitleOptions,
|
|
@@ -330,12 +411,21 @@ export type {
|
|
|
330
411
|
TextMarkOptions,
|
|
331
412
|
DatumPositionEncodingOptions,
|
|
332
413
|
CreateMarkLabelsOptions,
|
|
414
|
+
EditMarkLabelPlacementOptions,
|
|
415
|
+
EditMarkLabelSelectionOptions,
|
|
416
|
+
MarkLabelAnchor,
|
|
417
|
+
MarkLabelPlacement,
|
|
418
|
+
MarkLabelPlacementLeaderOptions,
|
|
419
|
+
MarkLabelSelectionOptions,
|
|
420
|
+
RemoveMarkLabelsOptions,
|
|
333
421
|
CreateAnnotationOptions,
|
|
422
|
+
ReferenceStatistic,
|
|
334
423
|
CreateReferenceLineOptions,
|
|
335
424
|
CreateReferenceBandOptions,
|
|
336
425
|
XAxisPosition,
|
|
337
426
|
YAxisPosition,
|
|
338
427
|
WindowDataOptions,
|
|
428
|
+
WindowFrame,
|
|
339
429
|
WindowOperation,
|
|
340
430
|
WindowSort,
|
|
341
431
|
WindowSortOrder,
|
package/types/pdf.d.ts
CHANGED
|
@@ -24,3 +24,12 @@ export function renderToPDF(
|
|
|
24
24
|
program: Pick<ChartProgram, "graphicSpec">,
|
|
25
25
|
options: PDFRenderOptions
|
|
26
26
|
): Promise<PDFRenderResult>;
|
|
27
|
+
|
|
28
|
+
export interface PDFBufferResult extends Omit<PDFRenderResult, "output"> {
|
|
29
|
+
readonly buffer: Uint8Array;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function renderToPDFBuffer(
|
|
33
|
+
program: Pick<ChartProgram, "graphicSpec">,
|
|
34
|
+
options?: { metadata?: PDFMetadata }
|
|
35
|
+
): Promise<PDFBufferResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartProgram } from "./program.js";
|
|
2
|
+
import type { BasicChartProgram } from "./basic.js";
|
|
3
|
+
|
|
4
|
+
export function serializeProgram(program: ChartProgram | BasicChartProgram): string;
|
|
5
|
+
export function deserializeProgram(text: string): ChartProgram;
|
|
6
|
+
export function serializeGraphic(program: Pick<ChartProgram, "graphicSpec">): string;
|
|
7
|
+
export function deserializeGraphic(text: string): Readonly<Pick<ChartProgram, "graphicSpec">>;
|
package/types/png.d.ts
CHANGED
|
@@ -12,3 +12,12 @@ export function renderToPNG(
|
|
|
12
12
|
program: Pick<ChartProgram, "graphicSpec">,
|
|
13
13
|
options: { output: string; pixelRatio?: number }
|
|
14
14
|
): Promise<PNGRenderResult>;
|
|
15
|
+
|
|
16
|
+
export interface PNGBufferResult extends Omit<PNGRenderResult, "output"> {
|
|
17
|
+
readonly buffer: Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function renderToPNGBuffer(
|
|
21
|
+
program: Pick<ChartProgram, "graphicSpec">,
|
|
22
|
+
options?: { pixelRatio?: number }
|
|
23
|
+
): Promise<PNGBufferResult>;
|