ggaction 0.0.18 → 0.0.20

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 (164) hide show
  1. package/CHANGELOG.md +56 -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/color/continuous.js +7 -1
  17. package/src/actions/encodings/remove.js +11 -6
  18. package/src/actions/encodings/shared.js +26 -24
  19. package/src/actions/facets/actions.js +18 -7
  20. package/src/actions/facets/guides.js +2 -1
  21. package/src/actions/guides/axes/axes.js +30 -11
  22. package/src/actions/guides/axes/axis.js +58 -8
  23. package/src/actions/guides/axes/components.js +13 -13
  24. package/src/actions/guides/axes/edit.js +36 -24
  25. package/src/actions/guides/axes/labels.js +37 -27
  26. package/src/actions/guides/axes/lines.js +22 -20
  27. package/src/actions/guides/axes/remove.js +10 -6
  28. package/src/actions/guides/axes/tickGroups.js +8 -7
  29. package/src/actions/guides/axes/ticks.js +31 -22
  30. package/src/actions/guides/axes/titles.js +53 -60
  31. package/src/actions/guides/facadeAxes.js +33 -24
  32. package/src/actions/guides/facadeLegend.js +3 -3
  33. package/src/actions/guides/grids/grid.js +1 -1
  34. package/src/actions/guides/grids/resolve.js +48 -51
  35. package/src/actions/guides/legends/blocks.js +43 -19
  36. package/src/actions/guides/legends/categorical/actions.js +32 -9
  37. package/src/actions/guides/legends/categorical/components.js +3 -10
  38. package/src/actions/guides/legends/categorical/index.js +2 -0
  39. package/src/actions/guides/legends/categorical/layout.js +9 -13
  40. package/src/actions/guides/legends/categorical/options.js +8 -2
  41. package/src/actions/guides/legends/categorical/recipes.js +7 -3
  42. package/src/actions/guides/legends/categorical/resolve.js +9 -2
  43. package/src/actions/guides/legends/categorical/symbols.js +22 -8
  44. package/src/actions/guides/legends/colorSize.js +110 -0
  45. package/src/actions/guides/legends/combine.js +37 -0
  46. package/src/actions/guides/legends/continuous/colorSymbols.js +1 -1
  47. package/src/actions/guides/legends/continuous/common.js +1 -1
  48. package/src/actions/guides/legends/continuous/gradient.js +27 -13
  49. package/src/actions/guides/legends/continuous/opacity.js +16 -11
  50. package/src/actions/guides/legends/creation.js +2 -0
  51. package/src/actions/guides/legends/edit.js +1 -1
  52. package/src/actions/guides/legends/focused.js +6 -5
  53. package/src/actions/guides/legends/lane.js +1 -1
  54. package/src/actions/guides/legends/lifecycle.js +2 -1
  55. package/src/actions/guides/legends/remove.js +6 -3
  56. package/src/actions/guides/legends/size.js +16 -6
  57. package/src/actions/guides/legends/strokeWidth.js +2 -0
  58. package/src/actions/guides/legends/target.js +2 -79
  59. package/src/actions/guides/legends/transition.js +24 -5
  60. package/src/actions/guides/tickValues.js +8 -5
  61. package/src/actions/marks/area/materialize.js +1 -190
  62. package/src/actions/marks/bar/edit.js +23 -12
  63. package/src/actions/marks/bar/materialize.js +6 -1
  64. package/src/actions/marks/point/materialize.js +5 -1
  65. package/src/actions/marks/remove.js +10 -10
  66. package/src/actions/primitives/createGraphics.js +3 -2
  67. package/src/actions/primitives/editGraphics.js +15 -11
  68. package/src/actions/primitives/graphicProperties.js +1 -6
  69. package/src/actions/primitives/semanticAction.js +27 -1
  70. package/src/actions/primitives/semanticValidation/guide.js +11 -1
  71. package/src/actions/primitives/semanticValidation/layer.js +4 -0
  72. package/src/actions/regression/edit.js +15 -3
  73. package/src/actions/scales/channels.js +2 -2
  74. package/src/actions/scales/consumers/common.js +7 -1
  75. package/src/actions/scales/create.js +3 -3
  76. package/src/actions/scales/definitions.js +1 -1
  77. package/src/actions/scales/edit.js +1 -1
  78. package/src/actions/scales/editPolicy.js +3 -0
  79. package/src/actions/scales/patch.js +1 -1
  80. package/src/actions/scales/quantitativeColor.js +8 -3
  81. package/src/actions/theme/reconcile.js +50 -23
  82. package/src/core/compositionState.js +2 -2
  83. package/src/core/graphicProperties.js +1 -0
  84. package/src/core/programState.js +4 -0
  85. package/src/core/resourceReferences.js +2 -2
  86. package/src/core/validation.js +9 -0
  87. package/src/core/vocabulary.js +3 -0
  88. package/src/grammar/aggregate.js +3 -2
  89. package/src/grammar/areaSeries.js +1 -415
  90. package/src/grammar/axisTextPlacement.js +1 -0
  91. package/src/grammar/colorSizeLegend.js +39 -0
  92. package/src/grammar/computed.js +23 -1
  93. package/src/grammar/datasetSchema.js +10 -2
  94. package/src/grammar/displayLabels.js +8 -0
  95. package/src/grammar/facets/guides.js +54 -31
  96. package/src/grammar/facets/legendIntent.js +65 -0
  97. package/src/grammar/guideDash.js +1 -0
  98. package/src/grammar/interval.js +22 -6
  99. package/src/grammar/legendBlocks.js +1 -0
  100. package/src/grammar/legendBorder.js +9 -0
  101. package/src/grammar/legendClip.js +19 -0
  102. package/src/grammar/legendCombinations.js +45 -0
  103. package/src/grammar/legendGradient.js +9 -0
  104. package/src/grammar/legendGroups.js +1 -1
  105. package/src/grammar/legendOpacity.js +6 -0
  106. package/src/grammar/pathSeries.js +2 -2
  107. package/src/grammar/pointShapes.js +16 -2
  108. package/src/grammar/regression/derive.js +9 -1
  109. package/src/grammar/regression/models.js +60 -0
  110. package/src/grammar/regression/parameters.js +9 -1
  111. package/src/grammar/regression/statistics.js +64 -0
  112. package/src/grammar/scales/color.js +1 -1
  113. package/src/grammar/scales/colorConsumers.js +6 -3
  114. package/src/grammar/scales/definition.js +1 -1
  115. package/src/grammar/scales/types.js +1 -1
  116. package/src/grammar/schemas/concreteGraphic.js +3 -0
  117. package/src/grammar/schemas/graphic.js +3 -0
  118. package/src/grammar/schemas/graphicBounds.js +31 -7
  119. package/src/grammar/schemas/semanticPath.js +17 -2
  120. package/src/grammar/statistics/confidenceInterval.js +1 -101
  121. package/src/grammar/summary.js +1 -320
  122. package/src/grammar/timeUnit.js +6 -4
  123. package/src/grammar/transformTopology.js +1 -0
  124. package/src/grammar/transforms.js +11 -1
  125. package/src/inspectionDescriptors.js +1 -1
  126. package/src/layout/guideCollisions.js +9 -1
  127. package/src/layout/legendGroup.js +1 -1
  128. package/src/materialization/compositionSnapshot.js +2 -7
  129. package/src/materialization/coordinateBounds.js +17 -4
  130. package/src/materialization/facetGuides/edit.js +30 -0
  131. package/src/materialization/facetGuides/layout.js +1 -1
  132. package/src/materialization/facetGuides/owner.js +125 -0
  133. package/src/materialization/facetGuides/ownerLayout.js +71 -0
  134. package/src/materialization/facetGuides/placement.js +52 -6
  135. package/src/materialization/facetGuides/preparation.js +7 -0
  136. package/src/materialization/facets.js +1 -1
  137. package/src/materialization/graphicHierarchy.js +5 -1
  138. package/src/materialization/graphicTranslation.js +73 -0
  139. package/src/materialization/guides/layout.js +1 -1
  140. package/src/materialization/guides/resources.js +1 -1
  141. package/src/materialization/legendBorder.js +28 -0
  142. package/src/materialization/legendClip.js +76 -0
  143. package/src/materialization/legendGroups.js +1 -1
  144. package/src/materialization/legends.js +1 -1
  145. package/src/materialization/marks/grouping.js +1 -1
  146. package/src/materialization/scaleGuideDependencies.js +13 -14
  147. package/src/materialization/scales/map.js +3 -0
  148. package/src/materialization/scales/resolve.js +2 -0
  149. package/src/materialization/typography.js +10 -2
  150. package/src/persistence/validation.js +174 -1
  151. package/src/persistence.js +1 -1
  152. package/src/renderers/canvas/index.js +20 -10
  153. package/src/renderers/canvas/isolated.js +166 -0
  154. package/src/renderers/canvas/limits.js +3 -0
  155. package/src/renderers/canvas/rect.js +1 -1
  156. package/src/renderers/pdf.js +2 -2
  157. package/src/renderers/png.js +2 -2
  158. package/src/renderers/svg.js +10 -3
  159. package/src/selectors/axes.js +1 -0
  160. package/src/selectors/graphicCapacity.js +38 -0
  161. package/src/version.js +1 -1
  162. package/types/basic.d.ts +2 -0
  163. package/types/index.d.ts +7 -0
  164. package/types/program.d.ts +220 -64
@@ -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;
@@ -545,7 +563,7 @@ export type DatasetIntervalTransform = {
545
563
  | {
546
564
  center: "mean";
547
565
  extent: "ci";
548
- method?: ConfidenceIntervalMethod;
566
+ method?: MeanConfidenceIntervalMethod;
549
567
  level: number;
550
568
  }
551
569
  | {
@@ -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
@@ -976,7 +1001,7 @@ export interface DatasetSummaryTransform {
976
1001
  empty?: "null" | "identity";
977
1002
  }
978
1003
  export interface SummaryAggregateOptions {
979
- op: AggregateOperation;
1004
+ op: AggregateOperation | { op: "ciLower" | "ciUpper"; method: BootstrapMeanIntervalMethod; level?: number };
980
1005
  field?: string;
981
1006
  as: string;
982
1007
  }
@@ -1081,6 +1106,13 @@ export type ScalarAggregateOperation =
1081
1106
  | "variance" | "varianceP" | "stdev" | "stdevP" | "stderr"
1082
1107
  | "q1" | "q3" | "ciLower" | "ciUpper";
1083
1108
  export type ConfidenceIntervalMethod = "normal" | "student-t";
1109
+ /** Seeded percentile bootstrap of nonweighted means; samples defaults to 1000. */
1110
+ export interface BootstrapMeanIntervalMethod {
1111
+ type: "bootstrap";
1112
+ seed: number;
1113
+ samples?: number;
1114
+ }
1115
+ export type MeanConfidenceIntervalMethod = ConfidenceIntervalMethod | BootstrapMeanIntervalMethod;
1084
1116
  export type ParameterizedAggregateOperation =
1085
1117
  | { op: "quantile"; probability: number }
1086
1118
  | {
@@ -1117,7 +1149,9 @@ export type PointShape =
1117
1149
  | "cross"
1118
1150
  | "star"
1119
1151
  | "hexagon"
1120
- | "wye";
1152
+ | "wye"
1153
+ | "wedge"
1154
+ | "arrow";
1121
1155
  export type StrokeStyleDetails = {
1122
1156
  lineCap?: "butt" | "round" | "square";
1123
1157
  lineJoin?: "miter" | "round" | "bevel";
@@ -1232,7 +1266,7 @@ export interface SemanticLayer {
1232
1266
  readonly data?: string;
1233
1267
  readonly source?: string;
1234
1268
  readonly coordinate?: string;
1235
- readonly mark?: Readonly<{ type?: string; missing?: "error" | "break" | "skip"; [key: string]: unknown }>;
1269
+ readonly mark?: Readonly<{ type?: string; missing?: "error" | "break" | "skip"; blend?: "difference"; [key: string]: unknown }>;
1236
1270
  readonly layout?: Readonly<{ mode?: ColorLayout }>;
1237
1271
  readonly derivedBindings?: Readonly<{ regression?: Readonly<{ mode: "follow"; roles: readonly ["data", "x", "y"] }> }>;
1238
1272
  readonly encoding?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
@@ -1336,9 +1370,16 @@ export interface AxisTickStyleOptions extends AxisLineStyleOptions {
1336
1370
  length?: number;
1337
1371
  }
1338
1372
  export interface CartesianAxisTickStyleOptions extends AxisTickStyleOptions {
1373
+ strokeDash?: readonly number[];
1374
+ /** Typed raw-value overrides. Empty arrays and auto clear only the map. */
1375
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1339
1376
  /** Signed logical pixels along the axis: positive right for x, down for y. */
1340
1377
  alongOffset?: number;
1341
1378
  }
1379
+ export type CartesianGuideDashMap = ReadonlyArray<Readonly<{
1380
+ value: AxisValue;
1381
+ strokeDash: readonly number[];
1382
+ }>>;
1342
1383
  export interface AxisLabelStyleOptions {
1343
1384
  offset?: number;
1344
1385
  format?: AxisFormat;
@@ -1352,6 +1393,8 @@ export type CartesianAxisLabelColorMap = ReadonlyArray<Readonly<{
1352
1393
  color: string;
1353
1394
  }>>;
1354
1395
  export interface CartesianAxisLabelStyleOptions extends AxisLabelStyleOptions {
1396
+ /** Local text alignment before rotation; omitted edits retain existing intent. */
1397
+ align?: "left" | "center" | "right";
1355
1398
  /** Typed raw-tick color overrides; missing entries use color. Auto removes the map. */
1356
1399
  colorMap?: CartesianAxisLabelColorMap | "auto";
1357
1400
  /** Keep unrotated label bounds inside the mapped axis span; defaults to false. */
@@ -1370,6 +1413,8 @@ export interface AxisLabelLayoutOptions {
1370
1413
  overlap?: "error" | "allow";
1371
1414
  }
1372
1415
  export interface AxisTicksAndLabelsOptions<P extends string> {
1416
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1417
+ target?: string;
1373
1418
  scale?: string;
1374
1419
  position?: P;
1375
1420
  count?: number;
@@ -1378,11 +1423,18 @@ export interface AxisTicksAndLabelsOptions<P extends string> {
1378
1423
  labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1379
1424
  }
1380
1425
  export interface AxisTitleOptions<P extends string> {
1381
- /** Hard breaks retain ordered centered lines, spaced at 1.2 times fontSize. */
1426
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1427
+ target?: string;
1428
+ /** Signed logical pixels: positive right for x, down for y, independent of scale reversal. */
1429
+ alongOffset?: number;
1430
+ align?: "left" | "center" | "right";
1431
+ baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
1432
+ /** Hard breaks retain ordered lines with the chosen block baseline, spaced at 1.2 times fontSize. */
1382
1433
  text?: string;
1383
1434
  scale?: string;
1384
1435
  position?: P;
1385
1436
  at?: "start" | "center" | "end" | number;
1437
+ /** Signed distance from the axis frame: positive outward, negative inward. */
1386
1438
  offset?: number;
1387
1439
  rotation?: RotationInput;
1388
1440
  color?: string;
@@ -1391,25 +1443,32 @@ export interface AxisTitleOptions<P extends string> {
1391
1443
  fontWeight?: string | number;
1392
1444
  }
1393
1445
  export interface CompleteAxisOptions<P extends string> {
1446
+ /** Omission retains the canonical x/y identity. */
1447
+ id?: string;
1448
+ /** Non-negative outward displacement of the complete axis frame in logical pixels. */
1449
+ offset?: number;
1394
1450
  scale?: string;
1395
1451
  coordinate?: string;
1396
1452
  position?: P;
1397
1453
  line?: false | AxisLineStyleOptions;
1398
- ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
1399
- title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
1454
+ ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position" | "target">;
1455
+ title?: false | Omit<AxisTitleOptions<P>, "scale" | "position" | "target">;
1400
1456
  }
1457
+ export type NamedCompleteAxis<P extends string> = CompleteAxisOptions<P> & { id: string };
1401
1458
  export interface CreateAxesOptions {
1402
1459
  coordinate?: {
1403
1460
  id?: string;
1404
1461
  type?: "auto" | "cartesian" | "polar" | "parallel";
1405
1462
  };
1406
- x?: false | CompleteAxisOptions<XAxisPosition>;
1407
- y?: false | CompleteAxisOptions<YAxisPosition>;
1463
+ x?: false | CompleteAxisOptions<XAxisPosition> | readonly [NamedCompleteAxis<XAxisPosition>, ...NamedCompleteAxis<XAxisPosition>[]];
1464
+ y?: false | CompleteAxisOptions<YAxisPosition> | readonly [NamedCompleteAxis<YAxisPosition>, ...NamedCompleteAxis<YAxisPosition>[]];
1408
1465
  theta?: false | CompletePolarAxisOptions;
1409
1466
  radius?: false | CompleteRadialAxisOptions;
1410
1467
  }
1411
1468
  export interface AxisTickOptions<P extends string>
1412
1469
  extends CartesianAxisTickStyleOptions {
1470
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1471
+ target?: string;
1413
1472
  scale?: string;
1414
1473
  position?: P;
1415
1474
  count?: number;
@@ -1418,6 +1477,8 @@ export interface AxisTickOptions<P extends string>
1418
1477
  /** Cartesian label maps use typed category values or finite numeric/timestamp keys on continuous scales. Empty mapped labels are omitted without removing ticks. */
1419
1478
  export interface AxisLabelOptions<P extends string>
1420
1479
  extends CartesianAxisLabelStyleOptions, AxisLabelLayoutOptions, DisplayLabelOptions {
1480
+ /** Axis resource identity; omission prefers canonical, then a unique named owner. */
1481
+ target?: string;
1421
1482
  scale?: string;
1422
1483
  position?: P;
1423
1484
  count?: number;
@@ -1540,6 +1601,7 @@ export interface EditRadialAxisOptions
1540
1601
  }
1541
1602
 
1542
1603
  export interface GridDirectionOptions {
1604
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1543
1605
  /** Signed logical pixels along the scale: vertical lines right, horizontal lines down. */
1544
1606
  alongOffset?: number;
1545
1607
  /** Grid draw order relative to marks at zero: positive above, nonpositive behind. */
@@ -1555,6 +1617,7 @@ export interface GridDirectionOptions {
1555
1617
  strokeDash?: readonly number[];
1556
1618
  }
1557
1619
  export interface EditGridOptions {
1620
+ strokeDashMap?: CartesianGuideDashMap | "auto";
1558
1621
  /** Absolute signed logical-pixel displacement; omission preserves the current value. */
1559
1622
  alongOffset?: number;
1560
1623
  /** Preserve omitted order; finite values sort Cartesian grids relative to marks at zero. */
@@ -1612,21 +1675,24 @@ type CAxisTicks<P extends string> = Omit<AxisTicksAndLabelsOptions<P>, "labels">
1612
1675
  labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
1613
1676
  };
1614
1677
  type CAxis<P extends string> = Omit<CompleteAxisOptions<P>, "ticksAndLabels"> & {
1615
- ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position">;
1678
+ ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position" | "target">;
1616
1679
  };
1617
1680
  type CAxes = Omit<CartesianAxesOptions, "x" | "y"> & {
1618
- x?: false | CAxis<XAxisPosition>;
1619
- y?: false | CAxis<YAxisPosition>;
1681
+ x?: false | CAxis<XAxisPosition> | readonly [CAxis<XAxisPosition> & { id: string }, ...(CAxis<XAxisPosition> & { id: string })[]];
1682
+ y?: false | CAxis<YAxisPosition> | readonly [CAxis<YAxisPosition> & { id: string }, ...(CAxis<YAxisPosition> & { id: string })[]];
1620
1683
  };
1621
1684
  type CartesianGridOptions = Pick<CreateGridOptions, "horizontal" | "vertical">;
1622
1685
  type FilledLegendSymbolRecipe = "auto"
1623
1686
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
1624
1687
  | { 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 } }
1688
+ type FilledMarkLegendOptions = Omit<LegendOptions, "symbol" | "representation" | "combine"> & (
1689
+ | { combine?: "separate" | "size-shape"; representation?: "gradient"; symbol?: FilledLegendSymbolRecipe }
1690
+ | { combine?: "separate" | "size-shape"; representation: "symbols"; symbol?: "auto" | { type?: "point"; radius?: number; stroke?: string; strokeWidth?: number } }
1691
+ | { combine: "color-size"; representation?: never; symbol?: "auto" | { type?: "point"; stroke?: string; strokeWidth?: number; opacity?: number } }
1628
1692
  );
1629
1693
  type DistributiveLegendOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
1694
+ type SeparateFilledLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "combine"> & { combine?: "separate" };
1695
+ type CategoricalPointLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "representation">;
1630
1696
  type CategoricalLegendTextOptions = {
1631
1697
  offset?: number;
1632
1698
  color?: string;
@@ -1637,8 +1703,10 @@ type CategoricalLegendTextOptions = {
1637
1703
  };
1638
1704
  type PathLegendOptions = Omit<
1639
1705
  LegendOptions,
1640
- "symbol" | "gradient" | "count" | "values" | "labels" | "representation"
1706
+ "symbol" | "gradient" | "count" | "values" | "labels" | "representation" | "combine" | "titlePosition"
1641
1707
  > & {
1708
+ titlePosition?: "top" | "left";
1709
+ combine?: "separate";
1642
1710
  symbol?: "auto" | { length?: number; lineWidth?: number }
1643
1711
  | { layers: readonly LegendSymbolLayer[] };
1644
1712
  labels?: CategoricalLegendTextOptions;
@@ -1651,11 +1719,21 @@ type CartesianGuideOptions = {
1651
1719
  type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1652
1720
  legend?: false | (Omit<PathLegendOptions, "order"> & { order?: LegendValueOrder });
1653
1721
  };
1722
+ type CartesianSeparateGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1723
+ legend?: false | (DistributiveLegendOmit<SeparateFilledLegendOptions, "order"> & { order?: CartesianLegendOrder });
1724
+ };
1725
+ type CartesianCategoricalPointGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1726
+ legend?: false | (Omit<CategoricalPointLegendOptions, "count" | "values" | "gradient" | "labels" | "order" | "symbol" | "titlePosition"> & {
1727
+ titlePosition?: "top" | "left";
1728
+ symbol?: FilledLegendSymbolRecipe; labels?: CategoricalLegendTextOptions; order?: CartesianLegendOrder;
1729
+ });
1730
+ };
1654
1731
  type CartesianCategoricalGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
1655
1732
  legend?: false | (Omit<
1656
- FilledMarkLegendOptions,
1657
- "count" | "values" | "gradient" | "labels" | "order" | "representation" | "symbol"
1733
+ SeparateFilledLegendOptions,
1734
+ "count" | "values" | "gradient" | "labels" | "order" | "representation" | "symbol" | "titlePosition"
1658
1735
  > & {
1736
+ titlePosition?: "top" | "left";
1659
1737
  symbol?: FilledLegendSymbolRecipe;
1660
1738
  labels?: CategoricalLegendTextOptions;
1661
1739
  order?: CartesianLegendOrder;
@@ -1668,7 +1746,7 @@ type CCategoricalGuides = Omit<CartesianCategoricalGuideOptions, "axes"> & {
1668
1746
  axes?: false | CAxes;
1669
1747
  };
1670
1748
  type ColorGuides = Omit<CartesianGuideOptions, "legend"> & {
1671
- legend?: false | (DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
1749
+ legend?: false | (DistributiveLegendOmit<SeparateFilledLegendOptions, "order"> & {
1672
1750
  order?: CartesianLegendOrder;
1673
1751
  });
1674
1752
  };
@@ -1746,6 +1824,8 @@ export interface ScaleOptions {
1746
1824
  align?: number;
1747
1825
  palette?: Palette;
1748
1826
  interpolate?: ContinuousColorInterpolation;
1827
+ whitePoint?: "d65" | "d50";
1828
+ gamma?: number;
1749
1829
  midpoint?: number | "auto";
1750
1830
  unknown?: unknown;
1751
1831
  }
@@ -1901,6 +1981,8 @@ export interface EditScaleOptions {
1901
1981
  align?: number;
1902
1982
  palette?: Palette;
1903
1983
  interpolate?: ContinuousColorInterpolation;
1984
+ whitePoint?: "d65" | "d50" | "auto";
1985
+ gamma?: number | "auto";
1904
1986
  midpoint?: number | "auto";
1905
1987
  unknown?: unknown;
1906
1988
  }
@@ -1927,12 +2009,10 @@ export type EditRScaleOptions = FocusedScaleSelection & WithoutScaleId<RadiusSca
1927
2009
  radialMapping?: RadialMapping;
1928
2010
  };
1929
2011
  export type EditColorScaleOptions = FocusedScaleSelection & WithoutScaleId<
1930
- CategoricalColorScaleOptions | ContinuousColorScaleOptions | DiscretizedColorScaleOptions
1931
- >;
1932
- export type EditStrokeScaleOptions = { target: string } & Omit<
1933
- EditColorScaleOptions,
1934
- "id" | "target"
1935
- >;
2012
+ CategoricalColorScaleOptions | Omit<ContinuousColorScaleOptions, "whitePoint" | "gamma"> | DiscretizedColorScaleOptions
2013
+ > & { whitePoint?: "d65" | "d50" | "auto"; gamma?: number | "auto" };
2014
+ type WithoutScaleSelection<T> = T extends unknown ? Omit<T, "id" | "target"> : never;
2015
+ export type EditStrokeScaleOptions = { target: string } & WithoutScaleSelection<EditColorScaleOptions>;
1936
2016
  type ExistingSizeScaleEditPatch = {
1937
2017
  type?: never;
1938
2018
  domain?: "auto" | readonly [string | number | boolean, ...(string | number | boolean)[]];
@@ -2299,7 +2379,7 @@ export interface IntervalDataOptions {
2299
2379
  groupBy?: string | readonly string[];
2300
2380
  center?: IntervalCenter;
2301
2381
  extent?: IntervalExtent;
2302
- method?: ConfidenceIntervalMethod;
2382
+ method?: MeanConfidenceIntervalMethod;
2303
2383
  level?: number;
2304
2384
  missing?: "error" | "drop";
2305
2385
  as?: IntervalOutputFields;
@@ -2959,7 +3039,7 @@ type BasicColorChannel =
2959
3039
  field: string;
2960
3040
  fieldType: "temporal";
2961
3041
  temporalUnit?: TemporalInputUnit;
2962
- scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3042
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
2963
3043
  palette?: Palette;
2964
3044
  };
2965
3045
  type NonPointCategoricalColorChannel =
@@ -3024,7 +3104,7 @@ type RectColorChannel =
3024
3104
  field: string;
3025
3105
  fieldType: "temporal";
3026
3106
  temporalUnit?: TemporalInputUnit;
3027
- scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3107
+ scale?: Omit<NonPointContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
3028
3108
  palette?: Palette;
3029
3109
  };
3030
3110
  export type BasicSizeChannel = string | WithoutEncodingTarget<SizeEncodingOptions>;
@@ -3123,7 +3203,7 @@ type IntervalPlotBaseOptions = {
3123
3203
  color?: BasicColorChannel;
3124
3204
  point?: CreateScatterPlotOptions["point"];
3125
3205
  errorBar?: IntervalPlotErrorBarOptions;
3126
- guides?: false | CartesianGuideOptions;
3206
+ guides?: false | CartesianSeparateGuideOptions;
3127
3207
  };
3128
3208
  export type CreateIntervalPlotOptions = IntervalPlotBaseOptions & (
3129
3209
  | {
@@ -3187,7 +3267,7 @@ type EndpointPlotBaseOptions = {
3187
3267
  category: EndpointCategoryChannel;
3188
3268
  orientation?: "horizontal" | "vertical";
3189
3269
  summary?: EndpointPlotSummary;
3190
- guides?: false | CartesianGuideOptions;
3270
+ guides?: false | CartesianSeparateGuideOptions;
3191
3271
  };
3192
3272
  export interface CreateDotPlotOptions extends EndpointPlotBaseOptions {
3193
3273
  value: EndpointValueChannel;
@@ -3260,7 +3340,7 @@ type PolarLegendOrder = LegendValueOrder | { channel: "theta"; values?: never };
3260
3340
  type PolarPathLegendOptions = Omit<PathLegendOptions, "order"> & {
3261
3341
  order?: PolarLegendOrder;
3262
3342
  };
3263
- type PolarPointLegendOptions = DistributiveLegendOmit<FilledMarkLegendOptions, "order"> & {
3343
+ type PolarPointLegendOptions = DistributiveLegendOmit<Exclude<FilledMarkLegendOptions, { combine: "color-size" }>, "order"> & {
3264
3344
  order?: PolarLegendOrder;
3265
3345
  };
3266
3346
  export type PolarPathGuideOptions = Omit<PolarChartGuideOptions, "legend"> & {
@@ -3536,7 +3616,7 @@ export interface CreateRaincloudPlotOptions {
3536
3616
  summary?: false | RaincloudSummaryOptions;
3537
3617
  points?: false | RaincloudPointsOptions;
3538
3618
  color?: LineCategoricalColorChannel;
3539
- guides?: false | CartesianCategoricalGuideOptions;
3619
+ guides?: false | CartesianCategoricalPointGuideOptions;
3540
3620
  }
3541
3621
  export interface EditRaincloudPlotOptions {
3542
3622
  target?: string;
@@ -3672,7 +3752,10 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
3672
3752
  stroke?: FilledMarkStroke;
3673
3753
  strokeWidth?: number;
3674
3754
  };
3675
- guides?: false | CartesianCategoricalGuideOptions;
3755
+ guides?: false | (Omit<CartesianCategoricalGuideOptions, "grid"> & {
3756
+ /** Bin position and count axes are continuous; neither grid has categorical band edges. */
3757
+ grid?: false | ContinuousCartesianGridOptions;
3758
+ });
3676
3759
  };
3677
3760
 
3678
3761
  export type HorizonPlotGuideOptions = {
@@ -3742,9 +3825,10 @@ export type PieColor = string | {
3742
3825
  palette?: Palette;
3743
3826
  };
3744
3827
  export type PieLegendOptions = Omit<
3745
- FilledMarkLegendOptions,
3746
- "count" | "values" | "gradient" | "channels" | "order" | "labels" | "representation" | "symbol"
3828
+ SeparateFilledLegendOptions,
3829
+ "count" | "values" | "gradient" | "channels" | "order" | "labels" | "representation" | "symbol" | "titlePosition"
3747
3830
  > & {
3831
+ titlePosition?: "top" | "left";
3748
3832
  symbol?: FilledLegendSymbolRecipe;
3749
3833
  channels?: readonly ["color"];
3750
3834
  order?: LegendValueOrder | { channel: "theta"; values?: never };
@@ -3786,7 +3870,7 @@ export interface HeatmapBaseOptions {
3786
3870
  stroke?: string | false;
3787
3871
  strokeWidth?: number;
3788
3872
  };
3789
- guides?: false | CartesianGuideOptions;
3873
+ guides?: false | CartesianSeparateGuideOptions;
3790
3874
  }
3791
3875
 
3792
3876
  export type HeatmapCategoryPositionChannel =
@@ -4191,9 +4275,8 @@ export type StrokeDashEncodingOptions =
4191
4275
  };
4192
4276
 
4193
4277
  export type NonPointContinuousColorScaleOptions = ScaleFields<
4194
- "id" | "interpolate" | "midpoint" | "clamp" | "reverse"
4278
+ "id" | "interpolate" | "whitePoint" | "gamma" | "midpoint" | "clamp" | "reverse"
4195
4279
  > & {
4196
- type?: "sequential" | "log" | "sqrt" | "symlog";
4197
4280
  base?: number;
4198
4281
  constant?: number;
4199
4282
  domain?: "auto" | readonly [unknown, unknown];
@@ -4202,7 +4285,10 @@ export type NonPointContinuousColorScaleOptions = ScaleFields<
4202
4285
  name: PaletteName;
4203
4286
  extent?: readonly [number, number];
4204
4287
  };
4205
- };
4288
+ } & (
4289
+ | { type: "pow"; exponent?: number }
4290
+ | { type?: "sequential" | "log" | "sqrt" | "symlog"; exponent?: never }
4291
+ );
4206
4292
 
4207
4293
  export type ContinuousColorScaleOptions =
4208
4294
  NonPointContinuousColorScaleOptions & { unknown?: string };
@@ -4242,6 +4328,10 @@ export type DiscretizedColorScaleOptions =
4242
4328
  | QuantileColorScaleOptions
4243
4329
  | ThresholdColorScaleOptions;
4244
4330
 
4331
+ /** Area quantitative color requires one finite value per existing series;
4332
+ * aggregate, temporal color and unknown fallback remain mark-specific restrictions.
4333
+ * Area authoring uses the Full facade; createAreaPlot.color stays categorical.
4334
+ */
4245
4335
  export type ColorEncodingOptions =
4246
4336
  | CategoricalEncodingOptions
4247
4337
  | {
@@ -4259,7 +4349,7 @@ export type ColorEncodingOptions =
4259
4349
  fieldType: "temporal";
4260
4350
  temporalUnit?: TemporalInputUnit;
4261
4351
  aggregate?: never;
4262
- scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
4352
+ scale?: Omit<ContinuousColorScaleOptions, "midpoint" | "type" | "base" | "exponent" | "constant"> & { midpoint?: "auto"; type?: "sequential" };
4263
4353
  palette?: Palette;
4264
4354
  layout?: never;
4265
4355
  };
@@ -4433,7 +4523,7 @@ export interface EncodeChannelsOptions {
4433
4523
  channels: AtLeastOne<EncodingChannelAssignments>;
4434
4524
  }
4435
4525
 
4436
- export type RegressionMethod = "linear" | "polynomial" | "loess";
4526
+ export type RegressionMethod = "linear" | "polynomial" | "loess" | "exp";
4437
4527
  export type RegressionInterval = "mean" | "prediction";
4438
4528
 
4439
4529
  export interface RegressionBandOptions extends StrokeStyleDetails {
@@ -4476,6 +4566,17 @@ export interface CreateRegressionLineOptions extends StrokeStyleDetails {
4476
4566
  }
4477
4567
 
4478
4568
  type RegressionParameterOptions =
4569
+ | {
4570
+ method: "exp";
4571
+ interval?: false;
4572
+ degree?: never;
4573
+ span?: never;
4574
+ robustIterations?: never;
4575
+ confidenceMethod?: never;
4576
+ level?: never;
4577
+ confidence?: never;
4578
+ predict?: RegressionPredictOptions;
4579
+ }
4479
4580
  | {
4480
4581
  method?: "linear";
4481
4582
  degree?: never;
@@ -4520,6 +4621,18 @@ export type RegressionDataOptions = {
4520
4621
  missing?: "error" | "drop";
4521
4622
  } & RegressionParameterOptions;
4522
4623
 
4624
+ export interface DatasetRegressionStatisticsTransform {
4625
+ readonly type: "regressionStatistics";
4626
+ }
4627
+ export interface RegressionStatisticsDataOptions {
4628
+ id: string;
4629
+ source: string;
4630
+ }
4631
+ export interface EditRegressionStatisticsDataOptions {
4632
+ target?: string;
4633
+ source?: string;
4634
+ }
4635
+
4523
4636
  type RegressionCommonOptions = {
4524
4637
  target?: string;
4525
4638
  x?: string;
@@ -4531,6 +4644,9 @@ type RegressionCommonOptions = {
4531
4644
  };
4532
4645
 
4533
4646
  export type RegressionOptions = RegressionCommonOptions & (
4647
+ | (Extract<RegressionParameterOptions, { method: "exp" }> & {
4648
+ band?: false;
4649
+ })
4534
4650
  | (Extract<RegressionParameterOptions, { method?: "linear" }> & {
4535
4651
  band?: false | RegressionBandOptions;
4536
4652
  })
@@ -4564,6 +4680,7 @@ export interface EditRegressionOptions {
4564
4680
  }
4565
4681
 
4566
4682
  export interface RemoveAxisOptions {
4683
+ target?: string;
4567
4684
  coordinate?: string;
4568
4685
  scale?: string;
4569
4686
  }
@@ -4609,7 +4726,7 @@ export interface LegendTitleStyleOptions {
4609
4726
  }
4610
4727
 
4611
4728
  export type LegendSymbolLayer =
4612
- | { type: "line"; length?: number; lineWidth?: number }
4729
+ | { type: "line"; length?: number; lineWidth?: number; opacity?: number }
4613
4730
  | {
4614
4731
  type: "point";
4615
4732
  shape?: "circle";
@@ -4617,6 +4734,7 @@ export type LegendSymbolLayer =
4617
4734
  fill?: string;
4618
4735
  stroke?: string;
4619
4736
  strokeWidth?: number;
4737
+ opacity?: number;
4620
4738
  }
4621
4739
  | {
4622
4740
  type: "swatch";
@@ -4624,17 +4742,20 @@ export type LegendSymbolLayer =
4624
4742
  height?: number;
4625
4743
  stroke?: string;
4626
4744
  strokeWidth?: number;
4745
+ opacity?: number;
4627
4746
  };
4628
4747
 
4629
4748
  export type LegendSymbolRecipe =
4630
4749
  | "auto"
4631
4750
  /** 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 }
4751
+ | { type?: "point"; radius?: number; fill?: string; stroke?: string; strokeWidth?: number; opacity?: number }
4633
4752
  | { length?: number; lineWidth?: number }
4634
4753
  | { width?: number; height?: number; stroke?: string; strokeWidth?: number }
4635
4754
  | { layers: readonly LegendSymbolLayer[] };
4636
4755
 
4637
4756
  export interface LegendBorderOptions {
4757
+ /** Even-length non-negative finite dash sequence; [] restores a solid frame. */
4758
+ strokeDash?: readonly number[];
4638
4759
  color?: string;
4639
4760
  lineWidth?: number;
4640
4761
  padding?: number;
@@ -4647,6 +4768,10 @@ export type LegendOrder = LegendValueOrder |
4647
4768
  { channel: "x" | "y" | "theta"; values?: never };
4648
4769
 
4649
4770
  export interface LegendOptions {
4771
+ /** Positive sample window height. Clips point-bearing glyphs without changing mapped area. */
4772
+ clipHeight?: number;
4773
+ /** Explicitly combine ordinal size/shape or same-field quantitative color/size circle samples. Omission retains separate blocks. */
4774
+ combine?: "separate" | "size-shape" | "color-size";
4650
4775
  /** Continuous color only. Omission creates the existing gradient; symbols samples the same scale without changing marks. */
4651
4776
  representation?: "gradient" | "symbols";
4652
4777
  /** Categorical, interval, size, or stroke-width layout. Defaults to edge; legacy-bottom is categorical and requires bottom position. */
@@ -4666,13 +4791,14 @@ export interface LegendOptions {
4666
4791
  at?: { x: number; y: number };
4667
4792
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4668
4793
  align?: "left" | "center" | "right";
4669
- /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4794
+ /** Gradient orientation is independent of position; auto is gradient-only. Categorical sides require vertical. */
4670
4795
  direction?: "horizontal" | "vertical";
4671
4796
  /** Categorical legends accept a positive column count on every supported position. */
4672
4797
  columns?: number;
4673
4798
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4674
4799
  offset?: number;
4675
- titlePosition?: "top" | "left";
4800
+ /** bottom is gradient-only; left retains the existing categorical/opacity rules. */
4801
+ titlePosition?: "top" | "left" | "bottom";
4676
4802
  /** false hides the title while retaining its inferred field text. */
4677
4803
  /** LF, CRLF and CR preserve explicit title lines, including blank lines. */
4678
4804
  title?: string | false;
@@ -4709,8 +4835,12 @@ export interface LegendBlockSymbolPatch {
4709
4835
  }
4710
4836
 
4711
4837
  export interface EditLegendBlockOptions {
4838
+ /** Reset only the sample window with auto. */
4839
+ clipHeight?: number | "auto";
4712
4840
  target: string;
4713
4841
  channel: LegendChannel;
4842
+ /** Block-local anchor; inherit removes only this override. */
4843
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4714
4844
  title?: string;
4715
4845
  values?: readonly [number, ...number[]] | "auto";
4716
4846
  count?: number;
@@ -4718,7 +4848,7 @@ export interface EditLegendBlockOptions {
4718
4848
  gap?: number;
4719
4849
  text?: LegendBlockTextPatch;
4720
4850
  symbol?: LegendBlockSymbolPatch;
4721
- /** An empty mapped label omits only text; its category and symbol remain. */
4851
+ /** Display-only: categorical keys, or finite numeric keys for continuous size samples. Empty labels omit text only. */
4722
4852
  labelMap?: DisplayLabelMap | "auto";
4723
4853
  }
4724
4854
 
@@ -4727,7 +4857,14 @@ export interface LegendTitleStyleEditOptions extends Omit<LegendTitleStyleOption
4727
4857
  }
4728
4858
 
4729
4859
  export interface EditLegendOptions
4730
- extends Omit<LegendOptions, "title" | "values" | "titleStyle"> {
4860
+ extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight"> {
4861
+ clipHeight?: number | "auto";
4862
+ /** Select one existing block; cannot accompany channels. */
4863
+ channel?: LegendChannel;
4864
+ /** inherit is allowed only with a singular channel selector. */
4865
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4866
+ /** Gradient-only auto resets orientation. */
4867
+ direction?: "horizontal" | "vertical" | "auto";
4731
4868
  titleStyle?: LegendTitleStyleEditOptions;
4732
4869
  /** Exact final content set for the whole target; omission preserves content. */
4733
4870
  channels?: LegendOptions["channels"];
@@ -4738,37 +4875,47 @@ export interface EditLegendOptions
4738
4875
 
4739
4876
  export interface EditLegendLayoutOptions {
4740
4877
  target?: string;
4878
+ /** Select one existing block without changing its content. */
4879
+ channel?: LegendChannel;
4741
4880
  layout?: "edge" | "legacy-bottom";
4742
4881
  /** 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";
4882
+ position?: "right" | "left" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "inherit";
4744
4883
  /** Opt into whole-target legend group layout; a requested row never wraps. */
4745
4884
  blockLayout?: "row" | "column" | "wrap";
4746
4885
  /** Move the complete occupied group top-left to plot-relative logical pixels. A later position clears this anchor. */
4747
4886
  at?: { x: number; y: number };
4748
4887
  /** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
4749
4888
  align?: "left" | "center" | "right";
4750
- /** Categorical sides require vertical (the default); horizontal edges default to horizontal. */
4751
- direction?: "horizontal" | "vertical";
4889
+ /** Gradient orientation is independent of position; auto is gradient-only. Categorical sides require vertical. */
4890
+ direction?: "horizontal" | "vertical" | "auto";
4752
4891
  /** Categorical legends accept a positive column count on every supported position. */
4753
4892
  columns?: number;
4754
4893
  /** Single top/bottom edge: gap from the plot to the nearest occupied legend edge. */
4755
4894
  offset?: number;
4756
- titlePosition?: "top" | "left";
4895
+ /** bottom is gradient-only; left retains the existing categorical/opacity rules. */
4896
+ titlePosition?: "top" | "left" | "bottom";
4757
4897
  /** Explicit spacing override; vertical creation defaults to 18 logical pixels. */
4758
4898
  itemGap?: number;
4759
4899
  }
4760
4900
 
4761
4901
  export interface EditLegendLabelsOptions extends LegendTextOptions {
4762
4902
  target?: string;
4903
+ /** Select one existing block without changing its content. */
4904
+ channel?: LegendChannel;
4763
4905
  }
4764
4906
 
4765
4907
  export interface EditLegendTitleOptions extends LegendTitleStyleEditOptions {
4766
4908
  target?: string;
4909
+ /** Select one existing block without changing its content. */
4910
+ channel?: LegendChannel;
4767
4911
  title?: string | "auto" | false;
4768
4912
  }
4769
4913
 
4770
4914
  export interface EditLegendSymbolsOptions {
4915
+ clipHeight?: number | "auto";
4771
4916
  target?: string;
4917
+ /** Select one existing block without changing its content. */
4918
+ channel?: LegendChannel;
4772
4919
  symbol?: LegendSymbolRecipe;
4773
4920
  count?: number;
4774
4921
  gradient?: { length?: number; thickness?: number; opacity?: number };
@@ -4776,16 +4923,21 @@ export interface EditLegendSymbolsOptions {
4776
4923
 
4777
4924
  export interface EditLegendBorderOptions {
4778
4925
  target?: string;
4926
+ /** Select one existing block without changing its content. */
4927
+ channel?: LegendChannel;
4779
4928
  border: boolean | LegendBorderOptions;
4780
4929
  }
4781
4930
 
4782
4931
  export interface EditAxisOptions<P extends string> {
4932
+ target?: string;
4933
+ /** Omitted edits preserve the frame; zero restores the plot-edge frame. */
4934
+ offset?: number;
4783
4935
  position?: P;
4784
4936
  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">;
4937
+ ticks?: false | Omit<AxisTickOptions<P>, "scale" | "position" | "target">;
4938
+ labels?: false | Omit<AxisLabelOptions<P>, "scale" | "position" | "target">;
4939
+ ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position" | "target">;
4940
+ title?: false | Omit<AxisTitleOptions<P>, "scale" | "position" | "target">;
4789
4941
  }
4790
4942
 
4791
4943
  export interface TitleTextStyleOptions {
@@ -4917,6 +5069,8 @@ export class ChartProgram {
4917
5069
  createImputedData(options: ImputedDataOptions): ChartProgram;
4918
5070
  createStackData(options: StackDataOptions): ChartProgram;
4919
5071
  createRegressionData(options: RegressionDataOptions): ChartProgram;
5072
+ createRegressionStatisticsData(options: RegressionStatisticsDataOptions): ChartProgram;
5073
+ editRegressionStatisticsData(options?: EditRegressionStatisticsDataOptions): ChartProgram;
4920
5074
  createIntervalData(options: IntervalDataOptions): ChartProgram;
4921
5075
  createECDFData(options: ECDFDataOptions): ChartProgram;
4922
5076
  createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
@@ -4942,6 +5096,7 @@ export class ChartProgram {
4942
5096
  editImputedData(options: EditImputedDataOptions): ChartProgram;
4943
5097
  editBin2DData(options: EditBin2DDataOptions): ChartProgram;
4944
5098
 
5099
+ /** One point layer accepts at most 50,000 selected rows, before missing-value filtering. */
4945
5100
  createPointMark(options?: StrokeStyleDetails & {
4946
5101
  id?: string;
4947
5102
  data?: string;
@@ -5013,6 +5168,7 @@ export class ChartProgram {
5013
5168
  }): ChartProgram;
5014
5169
  editBarMark(options: RectStyleDetails & {
5015
5170
  target?: string;
5171
+ blend?: "normal" | "difference";
5016
5172
  missing?: "error" | "skip";
5017
5173
  fill?: FillPaint;
5018
5174
  opacity?: number;
@@ -5186,10 +5342,10 @@ export class ChartProgram {
5186
5342
  editRadialAxisLabels(options?: PolarLabelOptions): ChartProgram;
5187
5343
  editThetaAxisTitle(options?: PolarTitleOptions): ChartProgram;
5188
5344
  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;
5345
+ createXAxisLine(options?: AxisLineStyleOptions & { target?: string; scale?: string; position?: XAxisPosition }): ChartProgram;
5346
+ createYAxisLine(options?: AxisLineStyleOptions & { target?: string; scale?: string; position?: YAxisPosition }): ChartProgram;
5347
+ editXAxisLine(options?: AxisLineStyleOptions & { target?: string; position?: XAxisPosition }): ChartProgram;
5348
+ editYAxisLine(options?: AxisLineStyleOptions & { target?: string; position?: YAxisPosition }): ChartProgram;
5193
5349
  createXAxisTicks(options?: AxisTickOptions<XAxisPosition>): ChartProgram;
5194
5350
  createYAxisTicks(options?: AxisTickOptions<YAxisPosition>): ChartProgram;
5195
5351
  editXAxisTicks(options?: Omit<AxisTickOptions<XAxisPosition>, "scale">): ChartProgram;
@@ -5212,8 +5368,8 @@ export class ChartProgram {
5212
5368
  editRadialAxis(options: EditRadialAxisOptions): ChartProgram;
5213
5369
  removeXAxis(options?: RemoveAxisOptions): ChartProgram;
5214
5370
  removeYAxis(options?: RemoveAxisOptions): ChartProgram;
5215
- removeThetaAxis(options?: RemoveAxisOptions): ChartProgram;
5216
- removeRadialAxis(options?: RemoveAxisOptions): ChartProgram;
5371
+ removeThetaAxis(options?: Omit<RemoveAxisOptions, "target">): ChartProgram;
5372
+ removeRadialAxis(options?: Omit<RemoveAxisOptions, "target">): ChartProgram;
5217
5373
  createGrid(options?: CreateGridOptions): ChartProgram;
5218
5374
  createHorizontalGrid(options?: GridDirectionOptions): ChartProgram;
5219
5375
  createVerticalGrid(options?: GridDirectionOptions): ChartProgram;