ggaction 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +6 -2
  3. package/knowledge/action-cards.json +1 -1
  4. package/knowledge/intent-taxonomy.json +1 -1
  5. package/knowledge/mcp-resources.json +1 -1
  6. package/package.json +1 -1
  7. package/src/actions/canvas/fitting.js +6 -2
  8. package/src/actions/charts/heatmap.js +4 -3
  9. package/src/actions/data/derived.js +11 -1
  10. package/src/actions/data/edit.js +2 -0
  11. package/src/actions/data/index.js +4 -0
  12. package/src/actions/data/regression.js +24 -16
  13. package/src/actions/data/regressionStatistics.js +73 -0
  14. package/src/actions/data/shared.js +5 -2
  15. package/src/actions/distributions/revision.js +24 -18
  16. package/src/actions/encodings/remove.js +11 -6
  17. package/src/actions/encodings/shared.js +26 -24
  18. package/src/actions/facets/actions.js +18 -7
  19. package/src/actions/facets/guides.js +2 -1
  20. package/src/actions/guides/axes/axes.js +30 -11
  21. package/src/actions/guides/axes/axis.js +58 -8
  22. package/src/actions/guides/axes/components.js +13 -13
  23. package/src/actions/guides/axes/edit.js +36 -24
  24. package/src/actions/guides/axes/labels.js +37 -27
  25. package/src/actions/guides/axes/lines.js +22 -20
  26. package/src/actions/guides/axes/remove.js +10 -6
  27. package/src/actions/guides/axes/tickGroups.js +8 -7
  28. package/src/actions/guides/axes/ticks.js +31 -22
  29. package/src/actions/guides/axes/titles.js +53 -60
  30. package/src/actions/guides/facadeAxes.js +33 -24
  31. package/src/actions/guides/facadeLegend.js +3 -3
  32. package/src/actions/guides/grids/grid.js +1 -1
  33. package/src/actions/guides/grids/resolve.js +48 -51
  34. package/src/actions/guides/legends/blocks.js +43 -19
  35. package/src/actions/guides/legends/categorical/actions.js +30 -7
  36. package/src/actions/guides/legends/categorical/components.js +3 -10
  37. package/src/actions/guides/legends/categorical/index.js +2 -0
  38. package/src/actions/guides/legends/categorical/layout.js +9 -13
  39. package/src/actions/guides/legends/categorical/options.js +8 -2
  40. package/src/actions/guides/legends/categorical/recipes.js +7 -3
  41. package/src/actions/guides/legends/categorical/resolve.js +9 -2
  42. package/src/actions/guides/legends/categorical/symbols.js +22 -8
  43. package/src/actions/guides/legends/colorSize.js +110 -0
  44. package/src/actions/guides/legends/combine.js +37 -0
  45. package/src/actions/guides/legends/continuous/colorSymbols.js +1 -1
  46. package/src/actions/guides/legends/continuous/common.js +1 -1
  47. package/src/actions/guides/legends/continuous/gradient.js +27 -13
  48. package/src/actions/guides/legends/continuous/opacity.js +16 -11
  49. package/src/actions/guides/legends/creation.js +2 -0
  50. package/src/actions/guides/legends/edit.js +1 -1
  51. package/src/actions/guides/legends/focused.js +6 -5
  52. package/src/actions/guides/legends/lane.js +1 -1
  53. package/src/actions/guides/legends/lifecycle.js +2 -1
  54. package/src/actions/guides/legends/remove.js +6 -3
  55. package/src/actions/guides/legends/size.js +16 -6
  56. package/src/actions/guides/legends/strokeWidth.js +2 -0
  57. package/src/actions/guides/legends/target.js +2 -79
  58. package/src/actions/guides/legends/transition.js +24 -5
  59. package/src/actions/guides/tickValues.js +8 -5
  60. package/src/actions/marks/bar/edit.js +23 -12
  61. package/src/actions/marks/bar/materialize.js +6 -1
  62. package/src/actions/marks/point/materialize.js +5 -1
  63. package/src/actions/marks/remove.js +10 -10
  64. package/src/actions/primitives/createGraphics.js +3 -2
  65. package/src/actions/primitives/editGraphics.js +15 -11
  66. package/src/actions/primitives/graphicProperties.js +1 -6
  67. package/src/actions/primitives/semanticAction.js +27 -1
  68. package/src/actions/primitives/semanticValidation/guide.js +11 -1
  69. package/src/actions/primitives/semanticValidation/layer.js +4 -0
  70. package/src/actions/regression/edit.js +15 -3
  71. package/src/actions/scales/channels.js +2 -2
  72. package/src/actions/scales/create.js +3 -3
  73. package/src/actions/scales/definitions.js +1 -1
  74. package/src/actions/scales/edit.js +1 -1
  75. package/src/actions/scales/editPolicy.js +3 -0
  76. package/src/actions/scales/patch.js +1 -1
  77. package/src/actions/scales/quantitativeColor.js +8 -3
  78. package/src/actions/theme/reconcile.js +50 -23
  79. package/src/core/compositionState.js +2 -2
  80. package/src/core/graphicProperties.js +1 -0
  81. package/src/core/programState.js +4 -0
  82. package/src/core/resourceReferences.js +2 -2
  83. package/src/core/validation.js +9 -0
  84. package/src/core/vocabulary.js +3 -0
  85. package/src/grammar/axisTextPlacement.js +1 -0
  86. package/src/grammar/colorSizeLegend.js +39 -0
  87. package/src/grammar/computed.js +23 -1
  88. package/src/grammar/datasetSchema.js +10 -2
  89. package/src/grammar/displayLabels.js +8 -0
  90. package/src/grammar/facets/guides.js +54 -31
  91. package/src/grammar/facets/legendIntent.js +65 -0
  92. package/src/grammar/guideDash.js +1 -0
  93. package/src/grammar/legendBlocks.js +1 -0
  94. package/src/grammar/legendBorder.js +9 -0
  95. package/src/grammar/legendClip.js +19 -0
  96. package/src/grammar/legendCombinations.js +45 -0
  97. package/src/grammar/legendGradient.js +9 -0
  98. package/src/grammar/legendGroups.js +1 -1
  99. package/src/grammar/legendOpacity.js +6 -0
  100. package/src/grammar/pointShapes.js +16 -2
  101. package/src/grammar/regression/derive.js +9 -1
  102. package/src/grammar/regression/models.js +60 -0
  103. package/src/grammar/regression/parameters.js +9 -1
  104. package/src/grammar/regression/statistics.js +64 -0
  105. package/src/grammar/scales/color.js +1 -1
  106. package/src/grammar/scales/colorConsumers.js +1 -1
  107. package/src/grammar/scales/definition.js +1 -1
  108. package/src/grammar/scales/types.js +1 -1
  109. package/src/grammar/schemas/concreteGraphic.js +3 -0
  110. package/src/grammar/schemas/graphic.js +3 -0
  111. package/src/grammar/schemas/graphicBounds.js +31 -7
  112. package/src/grammar/schemas/semanticPath.js +17 -2
  113. package/src/grammar/summary.js +1 -1
  114. package/src/grammar/timeUnit.js +6 -4
  115. package/src/grammar/transformTopology.js +1 -0
  116. package/src/grammar/transforms.js +11 -1
  117. package/src/inspectionDescriptors.js +1 -1
  118. package/src/layout/guideCollisions.js +9 -1
  119. package/src/layout/legendGroup.js +1 -1
  120. package/src/materialization/compositionSnapshot.js +2 -7
  121. package/src/materialization/coordinateBounds.js +17 -4
  122. package/src/materialization/facetGuides/edit.js +30 -0
  123. package/src/materialization/facetGuides/layout.js +1 -1
  124. package/src/materialization/facetGuides/owner.js +125 -0
  125. package/src/materialization/facetGuides/ownerLayout.js +71 -0
  126. package/src/materialization/facetGuides/placement.js +52 -6
  127. package/src/materialization/facetGuides/preparation.js +7 -0
  128. package/src/materialization/facets.js +1 -1
  129. package/src/materialization/graphicHierarchy.js +5 -1
  130. package/src/materialization/graphicTranslation.js +73 -0
  131. package/src/materialization/guides/layout.js +1 -1
  132. package/src/materialization/guides/resources.js +1 -1
  133. package/src/materialization/legendBorder.js +28 -0
  134. package/src/materialization/legendClip.js +76 -0
  135. package/src/materialization/legendGroups.js +1 -1
  136. package/src/materialization/legends.js +1 -1
  137. package/src/materialization/scaleGuideDependencies.js +13 -14
  138. package/src/materialization/scales/map.js +3 -0
  139. package/src/materialization/scales/resolve.js +2 -0
  140. package/src/materialization/typography.js +10 -2
  141. package/src/persistence/validation.js +174 -1
  142. package/src/persistence.js +1 -1
  143. package/src/renderers/canvas/index.js +20 -10
  144. package/src/renderers/canvas/isolated.js +166 -0
  145. package/src/renderers/canvas/limits.js +3 -0
  146. package/src/renderers/canvas/rect.js +1 -1
  147. package/src/renderers/pdf.js +2 -2
  148. package/src/renderers/png.js +2 -2
  149. package/src/renderers/svg.js +10 -3
  150. package/src/selectors/axes.js +1 -0
  151. package/src/selectors/graphicCapacity.js +38 -0
  152. package/src/version.js +1 -1
  153. package/types/basic.d.ts +2 -0
  154. package/types/index.d.ts +5 -0
  155. package/types/program.d.ts +206 -61
@@ -201,9 +201,17 @@ export interface FacetScaleResolutions {
201
201
  strokeDash?: FacetScaleResolution;
202
202
  parallelDimensions?: FacetScaleResolution;
203
203
  }
204
+ interface StoredFacetLegendIntent {
205
+ readonly type: "authored-legend";
206
+ readonly blocks: Readonly<Record<string, {
207
+ readonly config: Readonly<Record<string, unknown>>;
208
+ readonly guide?: Readonly<Record<string, unknown>>;
209
+ }>>;
210
+ readonly groups: Readonly<Record<string, unknown>>;
211
+ }
204
212
  export interface FacetGuideOptions {
205
213
  axes?: "each" | "outer";
206
- legend?: false | "shared";
214
+ legend?: false | "shared" | LegendOptions;
207
215
  }
208
216
  export interface FacetOptions {
209
217
  id?: string;
@@ -315,7 +323,7 @@ export interface FacetCompositionSpec {
315
323
  readonly scales: Readonly<Required<FacetScaleResolutions>>;
316
324
  readonly guides: {
317
325
  readonly axes: "each" | "outer";
318
- readonly legend: false | "shared";
326
+ readonly legend: false | "shared" | Readonly<LegendOptions> | StoredFacetLegendIntent;
319
327
  };
320
328
  };
321
329
  }
@@ -425,6 +433,16 @@ export type DatasetRegressionTransform = {
425
433
  | { confidenceMethod: ConfidenceIntervalMethod; level: number; confidence?: never }
426
434
  | { confidence: number; confidenceMethod?: never; level?: never }
427
435
  ))))
436
+ | {
437
+ method: "exp";
438
+ interval: false;
439
+ degree?: never;
440
+ span?: never;
441
+ robustIterations?: never;
442
+ confidenceMethod?: never;
443
+ level?: never;
444
+ confidence?: never;
445
+ }
428
446
  | {
429
447
  method: "loess";
430
448
  span: number;
@@ -801,13 +819,19 @@ export type ComputedExpression =
801
819
  readonly search: string;
802
820
  readonly replacement: string;
803
821
  }
822
+ | {
823
+ readonly op: "datePart";
824
+ readonly part: "year";
825
+ readonly operand: ComputedExpression;
826
+ readonly timeZone?: string;
827
+ }
804
828
  | {
805
829
  readonly op: "parseTime";
806
830
  readonly operand: ComputedExpression;
807
831
  readonly format?: ParseTimeFormat;
808
832
  }
809
833
  | {
810
- readonly op: "negate" | "absolute" | "log" | "sqrt" | "not" | "isNull" | "toNumber";
834
+ readonly op: "negate" | "absolute" | "log" | "sqrt" | "floor" | "not" | "isNull" | "toNumber";
811
835
  readonly operand: ComputedExpression;
812
836
  }
813
837
  | {
@@ -940,6 +964,7 @@ export type DatasetTransform =
940
964
  | DatasetFilterTransform
941
965
  | DatasetFoldTransform
942
966
  | DatasetRegressionTransform
967
+ | DatasetRegressionStatisticsTransform
943
968
  | DatasetSortTransform
944
969
  | DatasetDensityTransform
945
970
  | DatasetECDFTransform
@@ -1117,7 +1142,9 @@ export type PointShape =
1117
1142
  | "cross"
1118
1143
  | "star"
1119
1144
  | "hexagon"
1120
- | "wye";
1145
+ | "wye"
1146
+ | "wedge"
1147
+ | "arrow";
1121
1148
  export type StrokeStyleDetails = {
1122
1149
  lineCap?: "butt" | "round" | "square";
1123
1150
  lineJoin?: "miter" | "round" | "bevel";
@@ -1232,7 +1259,7 @@ export interface SemanticLayer {
1232
1259
  readonly data?: string;
1233
1260
  readonly source?: string;
1234
1261
  readonly coordinate?: string;
1235
- readonly mark?: Readonly<{ type?: string; missing?: "error" | "break" | "skip"; [key: string]: unknown }>;
1262
+ readonly mark?: Readonly<{ type?: string; missing?: "error" | "break" | "skip"; blend?: "difference"; [key: string]: unknown }>;
1236
1263
  readonly layout?: Readonly<{ mode?: ColorLayout }>;
1237
1264
  readonly derivedBindings?: Readonly<{ regression?: Readonly<{ mode: "follow"; roles: readonly ["data", "x", "y"] }> }>;
1238
1265
  readonly encoding?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
@@ -1336,9 +1363,16 @@ export interface AxisTickStyleOptions extends AxisLineStyleOptions {
1336
1363
  length?: number;
1337
1364
  }
1338
1365
  export interface CartesianAxisTickStyleOptions extends AxisTickStyleOptions {
1366
+ strokeDash?: readonly number[];
1367
+ /** Typed raw-value overrides. Empty arrays and auto clear only the map. */
1368
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1339
1369
  /** Signed logical pixels along the axis: positive right for x, down for y. */
1340
1370
  alongOffset?: number;
1341
1371
  }
1372
+ export type CartesianGuideDashMap = ReadonlyArray<Readonly<{
1373
+ value: AxisValue;
1374
+ strokeDash: readonly number[];
1375
+ }>>;
1342
1376
  export interface AxisLabelStyleOptions {
1343
1377
  offset?: number;
1344
1378
  format?: AxisFormat;
@@ -1352,6 +1386,8 @@ export type CartesianAxisLabelColorMap = ReadonlyArray<Readonly<{
1352
1386
  color: string;
1353
1387
  }>>;
1354
1388
  export interface CartesianAxisLabelStyleOptions extends AxisLabelStyleOptions {
1389
+ /** Local text alignment before rotation; omitted edits retain existing intent. */
1390
+ align?: "left" | "center" | "right";
1355
1391
  /** Typed raw-tick color overrides; missing entries use color. Auto removes the map. */
1356
1392
  colorMap?: CartesianAxisLabelColorMap | "auto";
1357
1393
  /** Keep unrotated label bounds inside the mapped axis span; defaults to false. */
@@ -1370,6 +1406,8 @@ export interface AxisLabelLayoutOptions {
1370
1406
  overlap?: "error" | "allow";
1371
1407
  }
1372
1408
  export interface AxisTicksAndLabelsOptions<P extends string> {
1409
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1410
+ target?: string;
1373
1411
  scale?: string;
1374
1412
  position?: P;
1375
1413
  count?: number;
@@ -1378,11 +1416,18 @@ export interface AxisTicksAndLabelsOptions<P extends string> {
1378
1416
  labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1379
1417
  }
1380
1418
  export interface AxisTitleOptions<P extends string> {
1381
- /** Hard breaks retain ordered centered lines, spaced at 1.2 times fontSize. */
1419
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1420
+ target?: string;
1421
+ /** Signed logical pixels: positive right for x, down for y, independent of scale reversal. */
1422
+ alongOffset?: number;
1423
+ align?: "left" | "center" | "right";
1424
+ baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
1425
+ /** Hard breaks retain ordered lines with the chosen block baseline, spaced at 1.2 times fontSize. */
1382
1426
  text?: string;
1383
1427
  scale?: string;
1384
1428
  position?: P;
1385
1429
  at?: "start" | "center" | "end" | number;
1430
+ /** Signed distance from the axis frame: positive outward, negative inward. */
1386
1431
  offset?: number;
1387
1432
  rotation?: RotationInput;
1388
1433
  color?: string;
@@ -1391,25 +1436,32 @@ export interface AxisTitleOptions<P extends string> {
1391
1436
  fontWeight?: string | number;
1392
1437
  }
1393
1438
  export interface CompleteAxisOptions<P extends string> {
1439
+ /** Omission retains the canonical x/y identity. */
1440
+ id?: string;
1441
+ /** Non-negative outward displacement of the complete axis frame in logical pixels. */
1442
+ offset?: number;
1394
1443
  scale?: string;
1395
1444
  coordinate?: string;
1396
1445
  position?: P;
1397
1446
  line?: false | AxisLineStyleOptions;
1398
- ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
1399
- title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
1447
+ ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position" | "target">;
1448
+ title?: false | Omit<AxisTitleOptions<P>, "scale" | "position" | "target">;
1400
1449
  }
1450
+ export type NamedCompleteAxis<P extends string> = CompleteAxisOptions<P> & { id: string };
1401
1451
  export interface CreateAxesOptions {
1402
1452
  coordinate?: {
1403
1453
  id?: string;
1404
1454
  type?: "auto" | "cartesian" | "polar" | "parallel";
1405
1455
  };
1406
- x?: false | CompleteAxisOptions<XAxisPosition>;
1407
- y?: false | CompleteAxisOptions<YAxisPosition>;
1456
+ x?: false | CompleteAxisOptions<XAxisPosition> | readonly [NamedCompleteAxis<XAxisPosition>, ...NamedCompleteAxis<XAxisPosition>[]];
1457
+ y?: false | CompleteAxisOptions<YAxisPosition> | readonly [NamedCompleteAxis<YAxisPosition>, ...NamedCompleteAxis<YAxisPosition>[]];
1408
1458
  theta?: false | CompletePolarAxisOptions;
1409
1459
  radius?: false | CompleteRadialAxisOptions;
1410
1460
  }
1411
1461
  export interface AxisTickOptions<P extends string>
1412
1462
  extends CartesianAxisTickStyleOptions {
1463
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1464
+ target?: string;
1413
1465
  scale?: string;
1414
1466
  position?: P;
1415
1467
  count?: number;
@@ -1418,6 +1470,8 @@ export interface AxisTickOptions<P extends string>
1418
1470
  /** Cartesian label maps use typed category values or finite numeric/timestamp keys on continuous scales. Empty mapped labels are omitted without removing ticks. */
1419
1471
  export interface AxisLabelOptions<P extends string>
1420
1472
  extends CartesianAxisLabelStyleOptions, AxisLabelLayoutOptions, DisplayLabelOptions {
1473
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1474
+ target?: string;
1421
1475
  scale?: string;
1422
1476
  position?: P;
1423
1477
  count?: number;
@@ -1540,6 +1594,7 @@ export interface EditRadialAxisOptions
1540
1594
  }
1541
1595
 
1542
1596
  export interface GridDirectionOptions {
1597
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1543
1598
  /** Signed logical pixels along the scale: vertical lines right, horizontal lines down. */
1544
1599
  alongOffset?: number;
1545
1600
  /** Grid draw order relative to marks at zero: positive above, nonpositive behind. */
@@ -1555,6 +1610,7 @@ export interface GridDirectionOptions {
1555
1610
  strokeDash?: readonly number[];
1556
1611
  }
1557
1612
  export interface EditGridOptions {
1613
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1558
1614
  /** Absolute signed logical-pixel displacement; omission preserves the current value. */
1559
1615
  alongOffset?: number;
1560
1616
  /** Preserve omitted order; finite values sort Cartesian grids relative to marks at zero. */
@@ -1612,21 +1668,24 @@ type CAxisTicks<P extends string> = Omit<AxisTicksAndLabelsOptions<P>, "labels">
1612
1668
  labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1613
1669
  };
1614
1670
  type CAxis<P extends string> = Omit<CompleteAxisOptions<P>, "ticksAndLabels"> & {
1615
- ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position">;
1671
+ ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position" | "target">;
1616
1672
  };
1617
1673
  type CAxes = Omit<CartesianAxesOptions, "x" | "y"> & {
1618
- x?: false | CAxis<XAxisPosition>;
1619
- y?: false | CAxis<YAxisPosition>;
1674
+ x?: false | CAxis<XAxisPosition> | readonly [CAxis<XAxisPosition> & { id: string }, ...(CAxis<XAxisPosition> & { id: string })[]];
1675
+ y?: false | CAxis<YAxisPosition> | readonly [CAxis<YAxisPosition> & { id: string }, ...(CAxis<YAxisPosition> & { id: string })[]];
1620
1676
  };
1621
1677
  type CartesianGridOptions = Pick<CreateGridOptions, "horizontal" | "vertical">;
1622
1678
  type FilledLegendSymbolRecipe = "auto"
1623
1679
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
1624
1680
  | { layers: readonly LegendSymbolLayer[] };
1625
- type FilledMarkLegendOptions = Omit<LegendOptions, "symbol" | "representation"> & (
1626
- | { representation?: "gradient"; symbol?: FilledLegendSymbolRecipe }
1627
- | { representation: "symbols"; symbol?: "auto" | { type?: "point"; radius?: number; stroke?: string; strokeWidth?: number } }
1681
+ type FilledMarkLegendOptions = Omit<LegendOptions, "symbol" | "representation" | "combine"> & (
1682
+ | { combine?: "separate" | "size-shape"; representation?: "gradient"; symbol?: FilledLegendSymbolRecipe }
1683
+ | { combine?: "separate" | "size-shape"; representation: "symbols"; symbol?: "auto" | { type?: "point"; radius?: number; stroke?: string; strokeWidth?: number } }
1684
+ | { combine: "color-size"; representation?: never; symbol?: "auto" | { type?: "point"; stroke?: string; strokeWidth?: number; opacity?: number } }
1628
1685
  );
1629
1686
  type DistributiveLegendOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
1687
+ type SeparateFilledLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "combine"> & { combine?: "separate" };
1688
+ type CategoricalPointLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "representation">;
1630
1689
  type CategoricalLegendTextOptions = {
1631
1690
  offset?: number;
1632
1691
  color?: string;
@@ -1637,8 +1696,10 @@ type CategoricalLegendTextOptions = {
1637
1696
  };
1638
1697
  type PathLegendOptions = Omit<
1639
1698
  LegendOptions,
1640
- "symbol" | "gradient" | "count" | "values" | "labels" | "representation"
1699
+ "symbol" | "gradient" | "count" | "values" | "labels" | "representation" | "combine" | "titlePosition"
1641
1700
  > & {
1701
+ titlePosition?: "top" | "left";
1702
+ combine?: "separate";
1642
1703
  symbol?: "auto" | { length?: number; lineWidth?: number }
1643
1704
  | { layers: readonly LegendSymbolLayer[] };
1644
1705
  labels?: CategoricalLegendTextOptions;
@@ -1651,11 +1712,21 @@ type CartesianGuideOptions = {
1651
1712
  type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1652
1713
  legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
1653
1714
  };
1715
+ type CartesianSeparateGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1716
+ legend?: false | (DistributiveLegendOmit<SeparateFilledLegendOptions, "order"> & { order?: CartesianLegendOrder });
1717
+ };
1718
+ type CartesianCategoricalPointGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1719
+ legend?: false | (Omit<CategoricalPointLegendOptions, "count" | "values" | "gradient" | "labels" | "order" | "symbol" | "titlePosition"> & {
1720
+ titlePosition?: "top" | "left";
1721
+ symbol?: FilledLegendSymbolRecipe; labels?: CategoricalLegendTextOptions; order?: CartesianLegendOrder;
1722
+ });
1723
+ };
1654
1724
  type CartesianCategoricalGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1655
1725
  legend?: false | (Omit<
1656
- FilledMarkLegendOptions,
1657
- "count" | "values" | "gradient" | "labels" | "order" | "representation" | "symbol"
1726
+ SeparateFilledLegendOptions,
1727
+ "count" | "values" | "gradient" | "labels" | "order" | "representation" | "symbol" | "titlePosition"
1658
1728
  > & {
1729
+ titlePosition?: "top" | "left";
1659
1730
  symbol?: FilledLegendSymbolRecipe;
1660
1731
  labels?: CategoricalLegendTextOptions;
1661
1732
  order?: CartesianLegendOrder;
@@ -1668,7 +1739,7 @@ type CCategoricalGuides = Omit<CartesianCategoricalGuideOptions, "axes"> & {
1668
1739
  axes?: false | CAxes;
1669
1740
  };
1670
1741
  type ColorGuides = Omit<CartesianGuideOptions, "legend"> & {
1671
- legend?: false | (DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
1742
+ legend?: false | (DistributiveLegendOmit<SeparateFilledLegendOptions, "order"> & {
1672
1743
  order?: CartesianLegendOrder;
1673
1744
  });
1674
1745
  };
@@ -1746,6 +1817,8 @@ export interface ScaleOptions {
1746
1817
  align?: number;
1747
1818
  palette?: Palette;
1748
1819
  interpolate?: ContinuousColorInterpolation;
1820
+ whitePoint?: "d65" | "d50";
1821
+ gamma?: number;
1749
1822
  midpoint?: number | "auto";
1750
1823
  unknown?: unknown;
1751
1824
  }
@@ -1901,6 +1974,8 @@ export interface EditScaleOptions {
1901
1974
  align?: number;
1902
1975
  palette?: Palette;
1903
1976
  interpolate?: ContinuousColorInterpolation;
1977
+ whitePoint?: "d65" | "d50" | "auto";
1978
+ gamma?: number | "auto";
1904
1979
  midpoint?: number | "auto";
1905
1980
  unknown?: unknown;
1906
1981
  }
@@ -1927,12 +2002,10 @@ export type EditRScaleOptions = FocusedScaleSelection & WithoutScaleId<RadiusSca
1927
2002
  radialMapping?: RadialMapping;
1928
2003
  };
1929
2004
  export type EditColorScaleOptions = FocusedScaleSelection & WithoutScaleId<
1930
- CategoricalColorScaleOptions | ContinuousColorScaleOptions | DiscretizedColorScaleOptions
1931
- >;
1932
- export type EditStrokeScaleOptions = { target: string } & Omit<
1933
- EditColorScaleOptions,
1934
- "id" | "target"
1935
- >;
2005
+ CategoricalColorScaleOptions | Omit<ContinuousColorScaleOptions, "whitePoint" | "gamma"> | DiscretizedColorScaleOptions
2006
+ > & { whitePoint?: "d65" | "d50" | "auto"; gamma?: number | "auto" };
2007
+ type WithoutScaleSelection<T> = T extends unknown ? Omit<T, "id" | "target"> : never;
2008
+ export type EditStrokeScaleOptions = { target: string } & WithoutScaleSelection<EditColorScaleOptions>;
1936
2009
  type ExistingSizeScaleEditPatch = {
1937
2010
  type?: never;
1938
2011
  domain?: "auto" | readonly [string | number | boolean, ...(string | number | boolean)[]];
@@ -2959,7 +3032,7 @@ type BasicColorChannel =
2959
3032
  field: string;
2960
3033
  fieldType: "temporal";
2961
3034
  temporalUnit?: TemporalInputUnit;
2962
- scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3035
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
2963
3036
  palette?: Palette;
2964
3037
  };
2965
3038
  type NonPointCategoricalColorChannel =
@@ -3024,7 +3097,7 @@ type RectColorChannel =
3024
3097
  field: string;
3025
3098
  fieldType: "temporal";
3026
3099
  temporalUnit?: TemporalInputUnit;
3027
- scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3100
+ scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3028
3101
  palette?: Palette;
3029
3102
  };
3030
3103
  export type BasicSizeChannel = string | WithoutEncodingTarget<SizeEncodingOptions>;
@@ -3123,7 +3196,7 @@ type IntervalPlotBaseOptions = {
3123
3196
  color?: BasicColorChannel;
3124
3197
  point?: CreateScatterPlotOptions["point"];
3125
3198
  errorBar?: IntervalPlotErrorBarOptions;
3126
- guides?: false | CartesianGuideOptions;
3199
+ guides?: false | CartesianSeparateGuideOptions;
3127
3200
  };
3128
3201
  export type CreateIntervalPlotOptions = IntervalPlotBaseOptions & (
3129
3202
  | {
@@ -3187,7 +3260,7 @@ type EndpointPlotBaseOptions = {
3187
3260
  category: EndpointCategoryChannel;
3188
3261
  orientation?: "horizontal" | "vertical";
3189
3262
  summary?: EndpointPlotSummary;
3190
- guides?: false | CartesianGuideOptions;
3263
+ guides?: false | CartesianSeparateGuideOptions;
3191
3264
  };
3192
3265
  export interface CreateDotPlotOptions extends EndpointPlotBaseOptions {
3193
3266
  value: EndpointValueChannel;
@@ -3260,7 +3333,7 @@ type PolarLegendOrder = LegendValueOrder | { channel: "theta"; values?: never };
3260
3333
  type PolarPathLegendOptions = Omit<PathLegendOptions, "order"> & {
3261
3334
  order?: PolarLegendOrder;
3262
3335
  };
3263
- type PolarPointLegendOptions = DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
3336
+ type PolarPointLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "order"> & {
3264
3337
  order?: PolarLegendOrder;
3265
3338
  };
3266
3339
  export type PolarPathGuideOptions = Omit<PolarChartGuideOptions, "legend"> & {
@@ -3536,7 +3609,7 @@ export interface CreateRaincloudPlotOptions {
3536
3609
  summary?: false | RaincloudSummaryOptions;
3537
3610
  points?: false | RaincloudPointsOptions;
3538
3611
  color?: LineCategoricalColorChannel;
3539
- guides?: false | CartesianCategoricalGuideOptions;
3612
+ guides?: false | CartesianCategoricalPointGuideOptions;
3540
3613
  }
3541
3614
  export interface EditRaincloudPlotOptions {
3542
3615
  target?: string;
@@ -3672,7 +3745,10 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
3672
3745
  stroke?: FilledMarkStroke;
3673
3746
  strokeWidth?: number;
3674
3747
  };
3675
- guides?: false | CartesianCategoricalGuideOptions;
3748
+ guides?: false | (Omit<CartesianCategoricalGuideOptions, "grid"> & {
3749
+ /** Bin position and count axes are continuous; neither grid has categorical band edges. */
3750
+ grid?: false | ContinuousCartesianGridOptions;
3751
+ });
3676
3752
  };
3677
3753
 
3678
3754
  export type HorizonPlotGuideOptions = {
@@ -3742,9 +3818,10 @@ export type PieColor = string | {
3742
3818
  palette?: Palette;
3743
3819
  };
3744
3820
  export type PieLegendOptions = Omit<
3745
- FilledMarkLegendOptions,
3746
- "count" | "values" | "gradient" | "channels" | "order" | "labels" | "representation" | "symbol"
3821
+ SeparateFilledLegendOptions,
3822
+ "count" | "values" | "gradient" | "channels" | "order" | "labels" | "representation" | "symbol" | "titlePosition"
3747
3823
  > & {
3824
+ titlePosition?: "top" | "left";
3748
3825
  symbol?: FilledLegendSymbolRecipe;
3749
3826
  channels?: readonly ["color"];
3750
3827
  order?: LegendValueOrder | { channel: "theta"; values?: never };
@@ -3786,7 +3863,7 @@ export interface HeatmapBaseOptions {
3786
3863
  stroke?: string | false;
3787
3864
  strokeWidth?: number;
3788
3865
  };
3789
- guides?: false | CartesianGuideOptions;
3866
+ guides?: false | CartesianSeparateGuideOptions;
3790
3867
  }
3791
3868
 
3792
3869
  export type HeatmapCategoryPositionChannel =
@@ -4191,9 +4268,8 @@ export type StrokeDashEncodingOptions =
4191
4268
  };
4192
4269
 
4193
4270
  export type NonPointContinuousColorScaleOptions = ScaleFields<
4194
- "id" | "interpolate" | "midpoint" | "clamp" | "reverse"
4271
+ "id" | "interpolate" | "whitePoint" | "gamma" | "midpoint" | "clamp" | "reverse"
4195
4272
  > & {
4196
- type?: "sequential" | "log" | "sqrt" | "symlog";
4197
4273
  base?: number;
4198
4274
  constant?: number;
4199
4275
  domain?: "auto" | readonly [unknown, unknown];
@@ -4202,7 +4278,10 @@ export type NonPointContinuousColorScaleOptions = ScaleFields<
4202
4278
  name: PaletteName;
4203
4279
  extent?: readonly [number, number];
4204
4280
  };
4205
- };
4281
+ } & (
4282
+ | { type: "pow"; exponent?: number }
4283
+ | { type?: "sequential" | "log" | "sqrt" | "symlog"; exponent?: never }
4284
+ );
4206
4285
 
4207
4286
  export type ContinuousColorScaleOptions =
4208
4287
  NonPointContinuousColorScaleOptions & { unknown?: string };
@@ -4259,7 +4338,7 @@ export type ColorEncodingOptions =
4259
4338
  fieldType: "temporal";
4260
4339
  temporalUnit?: TemporalInputUnit;
4261
4340
  aggregate?: never;
4262
- scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
4341
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
4263
4342
  palette?: Palette;
4264
4343
  layout?: never;
4265
4344
  };
@@ -4433,7 +4512,7 @@ export interface EncodeChannelsOptions {
4433
4512
  channels: AtLeastOne<EncodingChannelAssignments>;
4434
4513
  }
4435
4514
 
4436
- export type RegressionMethod = "linear" | "polynomial" | "loess";
4515
+ export type RegressionMethod = "linear" | "polynomial" | "loess" | "exp";
4437
4516
  export type RegressionInterval = "mean" | "prediction";
4438
4517
 
4439
4518
  export interface RegressionBandOptions extends StrokeStyleDetails {
@@ -4476,6 +4555,17 @@ export interface CreateRegressionLineOptions extends StrokeStyleDetails {
4476
4555
  }
4477
4556
 
4478
4557
  type RegressionParameterOptions =
4558
+ | {
4559
+ method: "exp";
4560
+ interval?: false;
4561
+ degree?: never;
4562
+ span?: never;
4563
+ robustIterations?: never;
4564
+ confidenceMethod?: never;
4565
+ level?: never;
4566
+ confidence?: never;
4567
+ predict?: RegressionPredictOptions;
4568
+ }
4479
4569
  | {
4480
4570
  method?: "linear";
4481
4571
  degree?: never;
@@ -4520,6 +4610,18 @@ export type RegressionDataOptions = {
4520
4610
  missing?: "error" | "drop";
4521
4611
  } & RegressionParameterOptions;
4522
4612
 
4613
+ export interface DatasetRegressionStatisticsTransform {
4614
+ readonly type: "regressionStatistics";
4615
+ }
4616
+ export interface RegressionStatisticsDataOptions {
4617
+ id: string;
4618
+ source: string;
4619
+ }
4620
+ export interface EditRegressionStatisticsDataOptions {
4621
+ target?: string;
4622
+ source?: string;
4623
+ }
4624
+
4523
4625
  type RegressionCommonOptions = {
4524
4626
  target?: string;
4525
4627
  x?: string;
@@ -4531,6 +4633,9 @@ type RegressionCommonOptions = {
4531
4633
  };
4532
4634
 
4533
4635
  export type RegressionOptions = RegressionCommonOptions & (
4636
+ | (Extract<RegressionParameterOptions, { method: "exp" }> & {
4637
+ band?: false;
4638
+ })
4534
4639
  | (Extract<RegressionParameterOptions, { method?: "linear" }> & {
4535
4640
  band?: false | RegressionBandOptions;
4536
4641
  })
@@ -4564,6 +4669,7 @@ export interface EditRegressionOptions {
4564
4669
  }
4565
4670
 
4566
4671
  export interface RemoveAxisOptions {
4672
+ target?: string;
4567
4673
  coordinate?: string;
4568
4674
  scale?: string;
4569
4675
  }
@@ -4609,7 +4715,7 @@ export interface LegendTitleStyleOptions {
4609
4715
  }
4610
4716
 
4611
4717
  export type LegendSymbolLayer =
4612
- | { type: "line"; length?: number; lineWidth?: number }
4718
+ | { type: "line"; length?: number; lineWidth?: number; opacity?: number }
4613
4719
  | {
4614
4720
  type: "point";
4615
4721
  shape?: "circle";
@@ -4617,6 +4723,7 @@ export type LegendSymbolLayer =
4617
4723
  fill?: string;
4618
4724
  stroke?: string;
4619
4725
  strokeWidth?: number;
4726
+ opacity?: number;
4620
4727
  }
4621
4728
  | {
4622
4729
  type: "swatch";
@@ -4624,17 +4731,20 @@ export type LegendSymbolLayer =
4624
4731
  height?: number;
4625
4732
  stroke?: string;
4626
4733
  strokeWidth?: number;
4734
+ opacity?: number;
4627
4735
  };
4628
4736
 
4629
4737
  export type LegendSymbolRecipe =
4630
4738
  | "auto"
4631
4739
  /** Sampled opacity uses a single point recipe; radius defaults to 7 and must be positive. */
4632
- | { type?: "point"; radius?: number; fill?: string; stroke?: string; strokeWidth?: number }
4740
+ | { type?: "point"; radius?: number; fill?: string; stroke?: string; strokeWidth?: number; opacity?: number }
4633
4741
  | { length?: number; lineWidth?: number }
4634
4742
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
4635
4743
  | { layers: readonly LegendSymbolLayer[] };
4636
4744
 
4637
4745
  export interface LegendBorderOptions {
4746
+ /** Even-length non-negative finite dash sequence; [] restores a solid frame. */
4747
+ strokeDash?: readonly number[];
4638
4748
  color?: string;
4639
4749
  lineWidth?: number;
4640
4750
  padding?: number;
@@ -4647,6 +4757,10 @@ export type LegendOrder = LegendValueOrder |
4647
4757
  { channel: "x" | "y" | "theta"; values?: never };
4648
4758
 
4649
4759
  export interface LegendOptions {
4760
+ /** Positive sample window height. Clips point-bearing glyphs without changing mapped area. */
4761
+ clipHeight?: number;
4762
+ /** Explicitly combine ordinal size/shape or same-field quantitative color/size circle samples. Omission retains separate blocks. */
4763
+ combine?: "separate" | "size-shape" | "color-size";
4650
4764
  /** Continuous color only. Omission creates the existing gradient; symbols samples the same scale without changing marks. */
4651
4765
  representation?: "gradient" | "symbols";
4652
4766
  /** Categorical, interval, size, or stroke-width layout. Defaults to edge; legacy-bottom is categorical and requires bottom position. */
@@ -4666,13 +4780,14 @@ export interface LegendOptions {
4666
4780
  at?: { x: number; y: number };
4667
4781
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4668
4782
  align?: "left" | "center" | "right";
4669
- /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4783
+ /** Gradient orientation is independent of position; auto is gradient-only. Categorical sides require vertical. */
4670
4784
  direction?: "horizontal" | "vertical";
4671
4785
  /** Categorical legends accept a positive column count on every supported position. */
4672
4786
  columns?: number;
4673
4787
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4674
4788
  offset?: number;
4675
- titlePosition?: "top" | "left";
4789
+ /** bottom is gradient-only; left retains the existing categorical/opacity rules. */
4790
+ titlePosition?: "top" | "left" | "bottom";
4676
4791
  /** false hides the title while retaining its inferred field text. */
4677
4792
  /** LF, CRLF and CR preserve explicit title lines, including blank lines. */
4678
4793
  title?: string | false;
@@ -4709,8 +4824,12 @@ export interface LegendBlockSymbolPatch {
4709
4824
  }
4710
4825
 
4711
4826
  export interface EditLegendBlockOptions {
4827
+ /** Reset only the sample window with auto. */
4828
+ clipHeight?: number | "auto";
4712
4829
  target: string;
4713
4830
  channel: LegendChannel;
4831
+ /** Block-local anchor; inherit removes only this override. */
4832
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4714
4833
  title?: string;
4715
4834
  values?: readonly [number, ...number[]] | "auto";
4716
4835
  count?: number;
@@ -4718,7 +4837,7 @@ export interface EditLegendBlockOptions {
4718
4837
  gap?: number;
4719
4838
  text?: LegendBlockTextPatch;
4720
4839
  symbol?: LegendBlockSymbolPatch;
4721
- /** An empty mapped label omits only text; its category and symbol remain. */
4840
+ /** Display-only: categorical keys, or finite numeric keys for continuous size samples. Empty labels omit text only. */
4722
4841
  labelMap?: DisplayLabelMap | "auto";
4723
4842
  }
4724
4843
 
@@ -4727,7 +4846,14 @@ export interface LegendTitleStyleEditOptions extends Omit<LegendTitleStyleOption
4727
4846
  }
4728
4847
 
4729
4848
  export interface EditLegendOptions
4730
- extends Omit<LegendOptions, "title" | "values" | "titleStyle"> {
4849
+ extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight"> {
4850
+ clipHeight?: number | "auto";
4851
+ /** Select one existing block; cannot accompany channels. */
4852
+ channel?: LegendChannel;
4853
+ /** inherit is allowed only with a singular channel selector. */
4854
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4855
+ /** Gradient-only auto resets orientation. */
4856
+ direction?: "horizontal" | "vertical" | "auto";
4731
4857
  titleStyle?: LegendTitleStyleEditOptions;
4732
4858
  /** Exact final content set for the whole target; omission preserves content. */
4733
4859
  channels?: LegendOptions["channels"];
@@ -4738,37 +4864,47 @@ export interface EditLegendOptions
4738
4864
 
4739
4865
  export interface EditLegendLayoutOptions {
4740
4866
  target?: string;
4867
+ /** Select one existing block without changing its content. */
4868
+ channel?: LegendChannel;
4741
4869
  layout?: "edge" | "legacy-bottom";
4742
4870
  /** Outside right/left: complete legend stack top aligns with the plot top, including borders and excluding chart titles. */
4743
- position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
4871
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4744
4872
  /** Opt into whole-target legend group layout; a requested row never wraps. */
4745
4873
  blockLayout?: "row" | "column" | "wrap";
4746
4874
  /** Move the complete occupied group top-left to plot-relative logical pixels. A later position clears this anchor. */
4747
4875
  at?: { x: number; y: number };
4748
4876
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4749
4877
  align?: "left" | "center" | "right";
4750
- /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4751
- direction?: "horizontal" | "vertical";
4878
+ /** Gradient orientation is independent of position; auto is gradient-only. Categorical sides require vertical. */
4879
+ direction?: "horizontal" | "vertical" | "auto";
4752
4880
  /** Categorical legends accept a positive column count on every supported position. */
4753
4881
  columns?: number;
4754
4882
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4755
4883
  offset?: number;
4756
- titlePosition?: "top" | "left";
4884
+ /** bottom is gradient-only; left retains the existing categorical/opacity rules. */
4885
+ titlePosition?: "top" | "left" | "bottom";
4757
4886
  /** Explicit spacing override; vertical creation defaults to 18 logical pixels. */
4758
4887
  itemGap?: number;
4759
4888
  }
4760
4889
 
4761
4890
  export interface EditLegendLabelsOptions extends LegendTextOptions {
4762
4891
  target?: string;
4892
+ /** Select one existing block without changing its content. */
4893
+ channel?: LegendChannel;
4763
4894
  }
4764
4895
 
4765
4896
  export interface EditLegendTitleOptions extends LegendTitleStyleEditOptions {
4766
4897
  target?: string;
4898
+ /** Select one existing block without changing its content. */
4899
+ channel?: LegendChannel;
4767
4900
  title?: string | "auto" | false;
4768
4901
  }
4769
4902
 
4770
4903
  export interface EditLegendSymbolsOptions {
4904
+ clipHeight?: number | "auto";
4771
4905
  target?: string;
4906
+ /** Select one existing block without changing its content. */
4907
+ channel?: LegendChannel;
4772
4908
  symbol?: LegendSymbolRecipe;
4773
4909
  count?: number;
4774
4910
  gradient?: { length?: number; thickness?: number; opacity?: number };
@@ -4776,16 +4912,21 @@ export interface EditLegendSymbolsOptions {
4776
4912
 
4777
4913
  export interface EditLegendBorderOptions {
4778
4914
  target?: string;
4915
+ /** Select one existing block without changing its content. */
4916
+ channel?: LegendChannel;
4779
4917
  border: boolean | LegendBorderOptions;
4780
4918
  }
4781
4919
 
4782
4920
  export interface EditAxisOptions<P extends string> {
4921
+ target?: string;
4922
+ /** Omitted edits preserve the frame; zero restores the plot-edge frame. */
4923
+ offset?: number;
4783
4924
  position?: P;
4784
4925
  line?: false | AxisLineStyleOptions;
4785
- ticks?: false | Omit<AxisTickOptions<P>, "scale" | "position">;
4786
- labels?: false | Omit<AxisLabelOptions<P>, "scale" | "position">;
4787
- ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
4788
- title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
4926
+ ticks?: false | Omit<AxisTickOptions<P>, "scale" | "position" | "target">;
4927
+ labels?: false | Omit<AxisLabelOptions<P>, "scale" | "position" | "target">;
4928
+ ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position" | "target">;
4929
+ title?: false | Omit<AxisTitleOptions<P>, "scale" | "position" | "target">;
4789
4930
  }
4790
4931
 
4791
4932
  export interface TitleTextStyleOptions {
@@ -4917,6 +5058,8 @@ export class ChartProgram {
4917
5058
  createImputedData(options: ImputedDataOptions): ChartProgram;
4918
5059
  createStackData(options: StackDataOptions): ChartProgram;
4919
5060
  createRegressionData(options: RegressionDataOptions): ChartProgram;
5061
+ createRegressionStatisticsData(options: RegressionStatisticsDataOptions): ChartProgram;
5062
+ editRegressionStatisticsData(options?: EditRegressionStatisticsDataOptions): ChartProgram;
4920
5063
  createIntervalData(options: IntervalDataOptions): ChartProgram;
4921
5064
  createECDFData(options: ECDFDataOptions): ChartProgram;
4922
5065
  createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
@@ -4942,6 +5085,7 @@ export class ChartProgram {
4942
5085
  editImputedData(options: EditImputedDataOptions): ChartProgram;
4943
5086
  editBin2DData(options: EditBin2DDataOptions): ChartProgram;
4944
5087
 
5088
+ /** One point layer accepts at most 50,000 selected rows, before missing-value filtering. */
4945
5089
  createPointMark(options?: StrokeStyleDetails & {
4946
5090
  id?: string;
4947
5091
  data?: string;
@@ -5013,6 +5157,7 @@ export class ChartProgram {
5013
5157
  }): ChartProgram;
5014
5158
  editBarMark(options: RectStyleDetails & {
5015
5159
  target?: string;
5160
+ blend?: "normal" | "difference";
5016
5161
  missing?: "error" | "skip";
5017
5162
  fill?: FillPaint;
5018
5163
  opacity?: number;
@@ -5186,10 +5331,10 @@ export class ChartProgram {
5186
5331
  editRadialAxisLabels(options?: PolarLabelOptions): ChartProgram;
5187
5332
  editThetaAxisTitle(options?: PolarTitleOptions): ChartProgram;
5188
5333
  editRadialAxisTitle(options?: RadialTitleOptions): ChartProgram;
5189
- createXAxisLine(options?: AxisLineStyleOptions & { scale?: string; position?: XAxisPosition }): ChartProgram;
5190
- createYAxisLine(options?: AxisLineStyleOptions & { scale?: string; position?: YAxisPosition }): ChartProgram;
5191
- editXAxisLine(options?: AxisLineStyleOptions & { position?: XAxisPosition }): ChartProgram;
5192
- editYAxisLine(options?: AxisLineStyleOptions & { position?: YAxisPosition }): ChartProgram;
5334
+ createXAxisLine(options?: AxisLineStyleOptions & { target?: string; scale?: string; position?: XAxisPosition }): ChartProgram;
5335
+ createYAxisLine(options?: AxisLineStyleOptions & { target?: string; scale?: string; position?: YAxisPosition }): ChartProgram;
5336
+ editXAxisLine(options?: AxisLineStyleOptions & { target?: string; position?: XAxisPosition }): ChartProgram;
5337
+ editYAxisLine(options?: AxisLineStyleOptions & { target?: string; position?: YAxisPosition }): ChartProgram;
5193
5338
  createXAxisTicks(options?: AxisTickOptions<XAxisPosition>): ChartProgram;
5194
5339
  createYAxisTicks(options?: AxisTickOptions<YAxisPosition>): ChartProgram;
5195
5340
  editXAxisTicks(options?: Omit<AxisTickOptions<XAxisPosition>, "scale">): ChartProgram;
@@ -5212,8 +5357,8 @@ export class ChartProgram {
5212
5357
  editRadialAxis(options: EditRadialAxisOptions): ChartProgram;
5213
5358
  removeXAxis(options?: RemoveAxisOptions): ChartProgram;
5214
5359
  removeYAxis(options?: RemoveAxisOptions): ChartProgram;
5215
- removeThetaAxis(options?: RemoveAxisOptions): ChartProgram;
5216
- removeRadialAxis(options?: RemoveAxisOptions): ChartProgram;
5360
+ removeThetaAxis(options?: Omit<RemoveAxisOptions, "target">): ChartProgram;
5361
+ removeRadialAxis(options?: Omit<RemoveAxisOptions, "target">): ChartProgram;
5217
5362
  createGrid(options?: CreateGridOptions): ChartProgram;
5218
5363
  createHorizontalGrid(options?: GridDirectionOptions): ChartProgram;
5219
5364
  createVerticalGrid(options?: GridDirectionOptions): ChartProgram;