@pixerate/editor 0.52.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/agent/index.cjs +37 -29
  2. package/dist/agent/index.cjs.map +1 -1
  3. package/dist/agent/index.d.cts +4 -3
  4. package/dist/agent/index.d.ts +4 -3
  5. package/dist/agent/index.js +16 -8
  6. package/dist/agent/index.js.map +1 -1
  7. package/dist/animation/index.cjs +15 -1
  8. package/dist/animation/index.cjs.map +1 -1
  9. package/dist/animation/index.d.cts +3 -226
  10. package/dist/animation/index.d.ts +3 -226
  11. package/dist/animation/index.js +14 -0
  12. package/dist/bridge/cli.cjs +36 -0
  13. package/dist/bridge/cli.cjs.map +1 -0
  14. package/dist/bridge/cli.d.cts +1 -0
  15. package/dist/bridge/cli.d.ts +1 -0
  16. package/dist/bridge/cli.js +36 -0
  17. package/dist/bridge/cli.js.map +1 -0
  18. package/dist/bridge/index.cjs +16 -0
  19. package/dist/bridge/index.cjs.map +1 -0
  20. package/dist/bridge/index.d.cts +65 -0
  21. package/dist/bridge/index.d.ts +65 -0
  22. package/dist/bridge/index.js +16 -0
  23. package/dist/bridge/index.js.map +1 -0
  24. package/dist/bridge-client-C5OziCRK.d.cts +148 -0
  25. package/dist/bridge-client-C5dRjrz5.d.ts +148 -0
  26. package/dist/canvas/index.cjs +1308 -528
  27. package/dist/canvas/index.cjs.map +1 -1
  28. package/dist/canvas/index.d.cts +309 -5
  29. package/dist/canvas/index.d.ts +309 -5
  30. package/dist/canvas/index.js +1295 -515
  31. package/dist/canvas/index.js.map +1 -1
  32. package/dist/chart/index.cjs +193 -192
  33. package/dist/chart/index.cjs.map +1 -1
  34. package/dist/chart/index.d.cts +77 -59
  35. package/dist/chart/index.d.ts +77 -59
  36. package/dist/chart/index.js +87 -86
  37. package/dist/chart/index.js.map +1 -1
  38. package/dist/{chunk-UAW5FEMD.js → chunk-3S72F46R.js} +66 -8
  39. package/dist/chunk-3S72F46R.js.map +1 -0
  40. package/dist/{chunk-5TWIN7ZJ.js → chunk-47WWV3LI.js} +34 -4
  41. package/dist/chunk-47WWV3LI.js.map +1 -0
  42. package/dist/{chunk-OV7UAKIY.js → chunk-633QC34G.js} +172 -1
  43. package/dist/chunk-633QC34G.js.map +1 -0
  44. package/dist/chunk-AWKPSOSX.js +401 -0
  45. package/dist/chunk-AWKPSOSX.js.map +1 -0
  46. package/dist/chunk-B6DSIEXA.js +96 -0
  47. package/dist/chunk-B6DSIEXA.js.map +1 -0
  48. package/dist/{chunk-5N6AQCVB.js → chunk-BQQZ6MOI.js} +3 -3
  49. package/dist/{chunk-M5Z77GFH.cjs → chunk-C3JHII3M.cjs} +53 -53
  50. package/dist/{chunk-M5Z77GFH.cjs.map → chunk-C3JHII3M.cjs.map} +1 -1
  51. package/dist/{chunk-JOX6MJW4.cjs → chunk-CKRNELPO.cjs} +176 -5
  52. package/dist/chunk-CKRNELPO.cjs.map +1 -0
  53. package/dist/{chunk-TGBCBQFV.cjs → chunk-DK6QBGCS.cjs} +45 -15
  54. package/dist/chunk-DK6QBGCS.cjs.map +1 -0
  55. package/dist/chunk-EGFUVXKK.cjs +96 -0
  56. package/dist/chunk-EGFUVXKK.cjs.map +1 -0
  57. package/dist/{chunk-AMWXSYCI.js → chunk-GPWNYQ7R.js} +2 -370
  58. package/dist/chunk-GPWNYQ7R.js.map +1 -0
  59. package/dist/chunk-H5K77C7Y.cjs +3848 -0
  60. package/dist/chunk-H5K77C7Y.cjs.map +1 -0
  61. package/dist/chunk-K73CKYUM.cjs +458 -0
  62. package/dist/chunk-K73CKYUM.cjs.map +1 -0
  63. package/dist/{chunk-GTZXF4BI.cjs → chunk-NK3WL5TJ.cjs} +298 -133
  64. package/dist/chunk-NK3WL5TJ.cjs.map +1 -0
  65. package/dist/{chunk-3ZBAXET6.cjs → chunk-NN3JGUSX.cjs} +80 -22
  66. package/dist/chunk-NN3JGUSX.cjs.map +1 -0
  67. package/dist/chunk-NV22EMOZ.cjs +401 -0
  68. package/dist/chunk-NV22EMOZ.cjs.map +1 -0
  69. package/dist/{chunk-YMKPMXZ4.js → chunk-OIKYP7XC.js} +4 -4
  70. package/dist/{chunk-FEMIVHN3.cjs → chunk-P43HUQRX.cjs} +16 -16
  71. package/dist/{chunk-FEMIVHN3.cjs.map → chunk-P43HUQRX.cjs.map} +1 -1
  72. package/dist/chunk-PTMIGXZ2.js +467 -0
  73. package/dist/chunk-PTMIGXZ2.js.map +1 -0
  74. package/dist/chunk-QIWFEEWG.cjs +467 -0
  75. package/dist/chunk-QIWFEEWG.cjs.map +1 -0
  76. package/dist/{chunk-QFTVLEVN.js → chunk-RIXTW3C4.js} +3 -3
  77. package/dist/{chunk-WBOAXDKD.js → chunk-VODBAO32.js} +222 -57
  78. package/dist/chunk-VODBAO32.js.map +1 -0
  79. package/dist/chunk-WWJNC7SX.js +3848 -0
  80. package/dist/chunk-WWJNC7SX.js.map +1 -0
  81. package/dist/{chunk-2DEBI6KU.cjs → chunk-YZZMX6V7.cjs} +10 -10
  82. package/dist/{chunk-2DEBI6KU.cjs.map → chunk-YZZMX6V7.cjs.map} +1 -1
  83. package/dist/commands/index.d.cts +1 -1
  84. package/dist/commands/index.d.ts +1 -1
  85. package/dist/{controller-DS3drIvy.d.cts → controller-CX0QfSv0.d.cts} +53 -2
  86. package/dist/{controller-BdKzaxs2.d.ts → controller-DscWQbjO.d.ts} +53 -2
  87. package/dist/diagram/index.cjs +1146 -0
  88. package/dist/diagram/index.cjs.map +1 -0
  89. package/dist/diagram/index.d.cts +787 -0
  90. package/dist/diagram/index.d.ts +787 -0
  91. package/dist/diagram/index.js +1146 -0
  92. package/dist/diagram/index.js.map +1 -0
  93. package/dist/{easing-DTmX99QG.d.cts → easing-CNGk-W6d.d.cts} +1 -1
  94. package/dist/{easing-DTmX99QG.d.ts → easing-CNGk-W6d.d.ts} +1 -1
  95. package/dist/export/index.cjs +4 -4
  96. package/dist/export/index.js +3 -3
  97. package/dist/extensions/index.cjs +6 -6
  98. package/dist/extensions/index.d.cts +2 -2
  99. package/dist/extensions/index.d.ts +2 -2
  100. package/dist/extensions/index.js +5 -5
  101. package/dist/generation/index.d.cts +2 -2
  102. package/dist/generation/index.d.ts +2 -2
  103. package/dist/image-editor/index.d.cts +1 -1
  104. package/dist/image-editor/index.d.ts +1 -1
  105. package/dist/{index-Dt9lzydb.d.ts → index-CALDD35B.d.ts} +1 -1
  106. package/dist/{index-DOy9HzfC.d.cts → index-DIWB6xMf.d.cts} +1 -1
  107. package/dist/index.cjs +13 -13
  108. package/dist/index.d.cts +3 -3
  109. package/dist/index.d.ts +3 -3
  110. package/dist/index.js +6 -6
  111. package/dist/parameters/index.d.cts +1 -1
  112. package/dist/parameters/index.d.ts +1 -1
  113. package/dist/player-DSMjdgQ9.d.cts +225 -0
  114. package/dist/player-DdfVrKWq.d.ts +225 -0
  115. package/dist/presence-Cb6WhcrQ.d.cts +77 -0
  116. package/dist/presence-Cb6WhcrQ.d.ts +77 -0
  117. package/dist/{registry-CSlH4iUn.d.ts → registry-7AZFuand.d.ts} +1 -1
  118. package/dist/{registry-B4l-lYts.d.cts → registry-DIpIaCkH.d.cts} +1 -1
  119. package/dist/tools/index.cjs +10 -2
  120. package/dist/tools/index.cjs.map +1 -1
  121. package/dist/tools/index.d.cts +3 -74
  122. package/dist/tools/index.d.ts +3 -74
  123. package/dist/tools/index.js +12 -4
  124. package/dist/types-BULrFyuQ.d.cts +316 -0
  125. package/dist/types-BULrFyuQ.d.ts +316 -0
  126. package/dist/vector/index.d.cts +1 -1
  127. package/dist/vector/index.d.ts +1 -1
  128. package/package.json +14 -1
  129. package/dist/chunk-3ZBAXET6.cjs.map +0 -1
  130. package/dist/chunk-5TWIN7ZJ.js.map +0 -1
  131. package/dist/chunk-AMWXSYCI.js.map +0 -1
  132. package/dist/chunk-GTZXF4BI.cjs.map +0 -1
  133. package/dist/chunk-JOX6MJW4.cjs.map +0 -1
  134. package/dist/chunk-OV7UAKIY.js.map +0 -1
  135. package/dist/chunk-TGBCBQFV.cjs.map +0 -1
  136. package/dist/chunk-UAW5FEMD.js.map +0 -1
  137. package/dist/chunk-WBOAXDKD.js.map +0 -1
  138. package/dist/chunk-XFYUFVAX.cjs +0 -826
  139. package/dist/chunk-XFYUFVAX.cjs.map +0 -1
  140. /package/dist/{chunk-5N6AQCVB.js.map → chunk-BQQZ6MOI.js.map} +0 -0
  141. /package/dist/{chunk-YMKPMXZ4.js.map → chunk-OIKYP7XC.js.map} +0 -0
  142. /package/dist/{chunk-QFTVLEVN.js.map → chunk-RIXTW3C4.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-CaR7LC6W.cjs';
2
2
  export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-CaR7LC6W.cjs';
3
- import { A as AgentToolProvider } from '../registry-B4l-lYts.cjs';
3
+ import { A as AgentToolProvider } from '../registry-DIpIaCkH.cjs';
4
4
  export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, H as HistoryCommandOptions, c as HistoryCommandTarget, S as ShapeCommandOptions, d as ShapeCommandTarget, e as SpreadsheetCommandOptions, f as SpreadsheetCommandTarget, g as createArrangeCommands, h as createComponentCommands, i as createHistoryCommands, j as createShapeCommands, k as createSpreadsheetCommands, l as hasVariantCommands, m as matchHistoryShortcut } from '../builtins-1kqwLUnb.cjs';
5
5
  import '../schema-Di0CS6Pe.cjs';
6
6
  import '../types-DsiXGmjo.cjs';
@@ -1,6 +1,6 @@
1
1
  import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-rVtFJjRM.js';
2
2
  export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-rVtFJjRM.js';
3
- import { A as AgentToolProvider } from '../registry-CSlH4iUn.js';
3
+ import { A as AgentToolProvider } from '../registry-7AZFuand.js';
4
4
  export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, H as HistoryCommandOptions, c as HistoryCommandTarget, S as ShapeCommandOptions, d as ShapeCommandTarget, e as SpreadsheetCommandOptions, f as SpreadsheetCommandTarget, g as createArrangeCommands, h as createComponentCommands, i as createHistoryCommands, j as createShapeCommands, k as createSpreadsheetCommands, l as hasVariantCommands, m as matchHistoryShortcut } from '../builtins-BKYlHH1s.js';
5
5
  import '../schema-Di0CS6Pe.js';
6
6
  import '../types-DsiXGmjo.js';
@@ -43,6 +43,32 @@ interface ChartTrendline {
43
43
  /** CSS colour (default: the series colour). */
44
44
  color?: string;
45
45
  }
46
+ /** How error amounts are worked out (as in spreadsheets: Excel's `c:errValType`). */
47
+ type ChartErrorBarType = 'fixed' | 'percent' | 'stddev' | 'stderr' | 'custom';
48
+ /**
49
+ * Error bars on a series (Excel's `c:errBars`). Amounts are in data units and drawn from each
50
+ * point, except `stddev`, which is drawn around the series mean as Excel does.
51
+ */
52
+ interface ChartErrorBars {
53
+ /**
54
+ * - `fixed`: the same amount at every point (`value`, default 1).
55
+ * - `percent`: `value` percent of each point's value (default 5).
56
+ * - `stddev`: `value` standard deviations of the series (default 1), around the series mean.
57
+ * - `stderr`: the standard error of the series (sample standard deviation / √n) at every point.
58
+ * - `custom`: per-point amounts from `plus` and `minus`.
59
+ */
60
+ type: ChartErrorBarType;
61
+ /** The amount for `fixed`, `percent` and `stddev` (see `type` for defaults). */
62
+ value?: number;
63
+ /** Custom amounts above each point (0 or more; `null`: none). */
64
+ plus?: ChartValue[];
65
+ /** Custom amounts below each point (0 or more; `null`: none). Defaults to `plus`. */
66
+ minus?: ChartValue[];
67
+ /** Which way the bars go (default `both`). */
68
+ direction?: 'both' | 'plus' | 'minus';
69
+ /** Draw end caps (default `true`). */
70
+ cap?: boolean;
71
+ }
46
72
  interface ChartSeries {
47
73
  /** Stable id (unique within the chart). */
48
74
  id: string;
@@ -73,6 +99,10 @@ interface ChartSeries {
73
99
  format?: ChartNumberFormat;
74
100
  /** Fitted lines drawn over the series. */
75
101
  trendlines?: ChartTrendline[];
102
+ /** Error bars along the value axis (bar, line, area and scatter series). */
103
+ errorBars?: ChartErrorBars;
104
+ /** Error bars along the numeric x axis (scatter charts with x values). */
105
+ xErrorBars?: ChartErrorBars;
76
106
  }
77
107
  interface ChartNumberFormat {
78
108
  /** `number` (default), `percent` (0.25 → 25%), `currency` or `compact` (1.2K). */
@@ -109,6 +139,16 @@ interface ChartAxis {
109
139
  * `2024`), labels them with calendar steps that fit, and thins the rest.
110
140
  */
111
141
  kind?: 'category' | 'date';
142
+ /**
143
+ * Value axes (and the numeric x axis of scatter and bubble charts): `log` spaces ticks by
144
+ * powers of `logBase`. Values of 0 or less cannot be drawn and are skipped. Not allowed with
145
+ * percent stacking. Absent means `linear`.
146
+ */
147
+ scale?: 'linear' | 'log';
148
+ /** Base of a logarithmic axis, 2–1000 (default 10). */
149
+ logBase?: number;
150
+ /** Run the axis the other way: values from the top down, or categories from right to left. */
151
+ reverse?: boolean;
112
152
  }
113
153
  type ChartLegendPosition = 'top' | 'bottom' | 'left' | 'right';
114
154
  interface ChartLegend {
@@ -215,7 +255,7 @@ interface ChartRect {
215
255
  height: number;
216
256
  }
217
257
  /** What a mark is, for styling and tests. */
218
- type ChartMarkRole = 'background' | 'title' | 'subtitle' | 'grid' | 'axis' | 'tick' | 'tick-label' | 'axis-title' | 'bar' | 'line' | 'area' | 'point' | 'slice' | 'cell' | 'box' | 'whisker' | 'outlier' | 'connector' | 'trendline' | 'trendline-label' | 'data-label' | 'legend-swatch' | 'legend-label' | 'drag-readout' | 'selection' | 'empty';
258
+ type ChartMarkRole = 'background' | 'title' | 'subtitle' | 'grid' | 'axis' | 'tick' | 'tick-label' | 'axis-title' | 'bar' | 'line' | 'area' | 'point' | 'slice' | 'cell' | 'box' | 'whisker' | 'outlier' | 'connector' | 'trendline' | 'trendline-label' | 'error-bar' | 'data-label' | 'legend-swatch' | 'legend-label' | 'drag-readout' | 'selection' | 'empty';
219
259
  interface ChartMarkBase {
220
260
  /** Unique within the scene (a stable key for frameworks). */
221
261
  key: string;
@@ -286,6 +326,8 @@ interface ChartValueScale {
286
326
  domain: [number, number];
287
327
  range: [number, number];
288
328
  ticks: number[];
329
+ /** Set when the axis is logarithmic: values map by their logarithm in this base. */
330
+ logBase?: number;
289
331
  }
290
332
  /** Something the layout had to leave out or shorten, as a sentence (for agents and screen readers). */
291
333
  interface ChartWarning {
@@ -324,6 +366,7 @@ declare const CHART_MARKERS: readonly ChartMarker[];
324
366
  declare const CHART_TRENDLINE_TYPES: readonly ChartTrendlineType[];
325
367
  declare const CHART_LABEL_POSITIONS: readonly ChartLabelPosition[];
326
368
  declare const CHART_AXIS_KINDS: readonly NonNullable<ChartAxis['kind']>[];
369
+ declare const CHART_AXIS_SCALES: readonly NonNullable<ChartAxis['scale']>[];
327
370
  declare const CHART_SERIES_TYPES: readonly ChartSeriesType[];
328
371
  declare const CHART_STACKINGS: readonly ChartStacking[];
329
372
  declare const CHART_CURVES: readonly ChartCurve[];
@@ -372,6 +415,8 @@ declare function parseChartValue(input: unknown): ChartValue | undefined;
372
415
  declare function normalizeChartAxis(value: unknown, fallback: ChartAxis, path: string, issues?: ChartIssue[]): ChartAxis;
373
416
  /** Values as numbers or nulls; bad entries become null and are reported. */
374
417
  declare function normalizeChartValues(value: unknown, length: number | undefined, path: string, issues?: ChartIssue[]): ChartValue[];
418
+ /** Checks one set of error bars; `null` (reported) when it is unusable. Custom amounts are padded to `length`. */
419
+ declare function normalizeChartErrorBars(value: unknown, length: number, path: string, issues?: ChartIssue[]): ChartErrorBars | null;
375
420
  /** Checks one trendline; `null` (reported) when it is unusable. */
376
421
  declare function normalizeChartTrendline(value: unknown, path: string, issues?: ChartIssue[]): ChartTrendline | null;
377
422
  /**
@@ -614,6 +659,8 @@ interface ChartSeriesInput {
614
659
  dataLabels?: boolean;
615
660
  format?: ChartNumberFormat;
616
661
  trendlines?: readonly ChartTrendline[];
662
+ errorBars?: ChartErrorBars;
663
+ xErrorBars?: ChartErrorBars;
617
664
  }
618
665
  /** Changes to one series; `null` resets a field to the chart's default. */
619
666
  interface ChartSeriesPatch {
@@ -631,6 +678,10 @@ interface ChartSeriesPatch {
631
678
  curve?: ChartCurve | null;
632
679
  dataLabels?: boolean | null;
633
680
  format?: ChartNumberFormat | null;
681
+ /** `null` removes the error bars. */
682
+ errorBars?: ChartErrorBars | null;
683
+ /** `null` removes the x error bars. */
684
+ xErrorBars?: ChartErrorBars | null;
634
685
  }
635
686
  interface ChartEditOptions {
636
687
  /** Undo step label. */
@@ -819,4 +870,4 @@ declare class ChartController {
819
870
  }
820
871
  declare function createChartController(options?: ChartControllerOptions): ChartController;
821
872
 
822
- export { type ChartSvgOptions as $, CHART_TRENDLINE_TYPES as A, CHART_TYPES as B, type ChartNumberFormat as C, CHART_TYPE_LABELS as D, CSS_VARIABLE_CHART_THEME as E, type ChartActionResult as F, type ChartCircleMark as G, type ChartControllerOptions as H, type ChartCurve as I, type ChartDomSpec as J, type ChartEditOptions as K, type ChartFamily as L, type ChartLabelPosition as M, type ChartLegendPosition as N, type ChartLineMark as O, type ChartMark as P, type ChartMarkRole as Q, type ChartMarker as R, type ChartOrientation as S, type ChartPathMark as T, type ChartRectMark as U, type ChartSeriesInput as V, type ChartSeriesPatch as W, type ChartSeriesType as X, type ChartSparklineKind as Y, type ChartSparklineOptions as Z, type ChartState as _, type ChartValue as a, type ChartTableData as a0, type ChartTableOptions as a1, type ChartTextMark as a2, type ChartTextMeasure as a3, type ChartTrendFit as a4, type ChartTrendline as a5, type ChartTrendlineType as a6, DEFAULT_CHART_PALETTE as a7, DEFAULT_CHART_THEME as a8, chartColorInputValue as a9, layoutSparkline as aA, normalizeChartAxis as aB, normalizeChartSpec as aC, normalizeChartTrendline as aD, normalizeChartValues as aE, parseChartValue as aF, sameChartSelection as aG, sparklineToSvg as aH, trendNumberText as aI, uniqueChartSeriesId as aJ, chartColorsByCategory as aa, chartDataFromTable as ab, chartDataToTable as ac, chartFamily as ad, chartMovingAverage as ae, chartPointColor as af, chartSceneToDomSpec as ag, chartSceneToSvg as ah, chartSeriesColor as ai, chartSeriesType as aj, chartSliceColor as ak, chartSupportsTrendlines as al, chartTextBaseline as am, chartTextTransform as an, chartToSvg as ao, chartTrendlineName as ap, cloneChartSeries as aq, cloneChartSpec as ar, contrastingTextColor as as, createChartController as at, createChartSpec as au, defaultChartAxis as av, estimateChartTextWidth as aw, fitChartTrendline as ax, isCartesianChart as ay, isXyChart as az, type ChartRect as b, type ChartScene as c, type ChartSpec as d, type ChartLayoutOptions as e, type ChartTheme as f, type ChartWarning as g, type ChartAxis as h, type ChartLegend as i, type ChartType as j, type ChartStacking as k, type ChartSeries as l, type ChartIssue as m, ChartController as n, type ChartValueScale as o, type ChartSelection as p, type ChartSpecPatch as q, CHART_AXIS_KINDS as r, CHART_CURVES as s, CHART_LABEL_POSITIONS as t, CHART_LEGEND_POSITIONS as u, CHART_MARKERS as v, CHART_NUMBER_STYLES as w, CHART_ORIENTATIONS as x, CHART_SERIES_TYPES as y, CHART_STACKINGS as z };
873
+ export { type ChartSparklineKind as $, CHART_ORIENTATIONS as A, CHART_SERIES_TYPES as B, type ChartValueScale as C, CHART_STACKINGS as D, CHART_TRENDLINE_TYPES as E, CHART_TYPES as F, CHART_TYPE_LABELS as G, CSS_VARIABLE_CHART_THEME as H, type ChartActionResult as I, type ChartCircleMark as J, type ChartControllerOptions as K, type ChartCurve as L, type ChartDomSpec as M, type ChartEditOptions as N, type ChartFamily as O, type ChartLabelPosition as P, type ChartLegendPosition as Q, type ChartLineMark as R, type ChartMark as S, type ChartMarkRole as T, type ChartMarker as U, type ChartOrientation as V, type ChartPathMark as W, type ChartRectMark as X, type ChartSeriesInput as Y, type ChartSeriesPatch as Z, type ChartSeriesType as _, type ChartNumberFormat as a, type ChartSparklineOptions as a0, type ChartState as a1, type ChartSvgOptions as a2, type ChartTableData as a3, type ChartTableOptions as a4, type ChartTextMark as a5, type ChartTextMeasure as a6, type ChartTrendFit as a7, type ChartTrendline as a8, type ChartTrendlineType as a9, fitChartTrendline as aA, isCartesianChart as aB, isXyChart as aC, layoutSparkline as aD, normalizeChartAxis as aE, normalizeChartErrorBars as aF, normalizeChartSpec as aG, normalizeChartTrendline as aH, normalizeChartValues as aI, parseChartValue as aJ, sameChartSelection as aK, sparklineToSvg as aL, trendNumberText as aM, uniqueChartSeriesId as aN, DEFAULT_CHART_PALETTE as aa, DEFAULT_CHART_THEME as ab, chartColorInputValue as ac, chartColorsByCategory as ad, chartDataFromTable as ae, chartDataToTable as af, chartFamily as ag, chartMovingAverage as ah, chartPointColor as ai, chartSceneToDomSpec as aj, chartSceneToSvg as ak, chartSeriesColor as al, chartSeriesType as am, chartSliceColor as an, chartSupportsTrendlines as ao, chartTextBaseline as ap, chartTextTransform as aq, chartToSvg as ar, chartTrendlineName as as, cloneChartSeries as at, cloneChartSpec as au, contrastingTextColor as av, createChartController as aw, createChartSpec as ax, defaultChartAxis as ay, estimateChartTextWidth as az, type ChartValue as b, type ChartRect as c, type ChartErrorBars as d, type ChartErrorBarType as e, type ChartScene as f, type ChartSpec as g, type ChartLayoutOptions as h, type ChartTheme as i, type ChartWarning as j, type ChartAxis as k, type ChartLegend as l, type ChartType as m, type ChartStacking as n, type ChartSeries as o, type ChartIssue as p, ChartController as q, type ChartSelection as r, type ChartSpecPatch as s, CHART_AXIS_KINDS as t, CHART_AXIS_SCALES as u, CHART_CURVES as v, CHART_LABEL_POSITIONS as w, CHART_LEGEND_POSITIONS as x, CHART_MARKERS as y, CHART_NUMBER_STYLES as z };
@@ -43,6 +43,32 @@ interface ChartTrendline {
43
43
  /** CSS colour (default: the series colour). */
44
44
  color?: string;
45
45
  }
46
+ /** How error amounts are worked out (as in spreadsheets: Excel's `c:errValType`). */
47
+ type ChartErrorBarType = 'fixed' | 'percent' | 'stddev' | 'stderr' | 'custom';
48
+ /**
49
+ * Error bars on a series (Excel's `c:errBars`). Amounts are in data units and drawn from each
50
+ * point, except `stddev`, which is drawn around the series mean as Excel does.
51
+ */
52
+ interface ChartErrorBars {
53
+ /**
54
+ * - `fixed`: the same amount at every point (`value`, default 1).
55
+ * - `percent`: `value` percent of each point's value (default 5).
56
+ * - `stddev`: `value` standard deviations of the series (default 1), around the series mean.
57
+ * - `stderr`: the standard error of the series (sample standard deviation / √n) at every point.
58
+ * - `custom`: per-point amounts from `plus` and `minus`.
59
+ */
60
+ type: ChartErrorBarType;
61
+ /** The amount for `fixed`, `percent` and `stddev` (see `type` for defaults). */
62
+ value?: number;
63
+ /** Custom amounts above each point (0 or more; `null`: none). */
64
+ plus?: ChartValue[];
65
+ /** Custom amounts below each point (0 or more; `null`: none). Defaults to `plus`. */
66
+ minus?: ChartValue[];
67
+ /** Which way the bars go (default `both`). */
68
+ direction?: 'both' | 'plus' | 'minus';
69
+ /** Draw end caps (default `true`). */
70
+ cap?: boolean;
71
+ }
46
72
  interface ChartSeries {
47
73
  /** Stable id (unique within the chart). */
48
74
  id: string;
@@ -73,6 +99,10 @@ interface ChartSeries {
73
99
  format?: ChartNumberFormat;
74
100
  /** Fitted lines drawn over the series. */
75
101
  trendlines?: ChartTrendline[];
102
+ /** Error bars along the value axis (bar, line, area and scatter series). */
103
+ errorBars?: ChartErrorBars;
104
+ /** Error bars along the numeric x axis (scatter charts with x values). */
105
+ xErrorBars?: ChartErrorBars;
76
106
  }
77
107
  interface ChartNumberFormat {
78
108
  /** `number` (default), `percent` (0.25 → 25%), `currency` or `compact` (1.2K). */
@@ -109,6 +139,16 @@ interface ChartAxis {
109
139
  * `2024`), labels them with calendar steps that fit, and thins the rest.
110
140
  */
111
141
  kind?: 'category' | 'date';
142
+ /**
143
+ * Value axes (and the numeric x axis of scatter and bubble charts): `log` spaces ticks by
144
+ * powers of `logBase`. Values of 0 or less cannot be drawn and are skipped. Not allowed with
145
+ * percent stacking. Absent means `linear`.
146
+ */
147
+ scale?: 'linear' | 'log';
148
+ /** Base of a logarithmic axis, 2–1000 (default 10). */
149
+ logBase?: number;
150
+ /** Run the axis the other way: values from the top down, or categories from right to left. */
151
+ reverse?: boolean;
112
152
  }
113
153
  type ChartLegendPosition = 'top' | 'bottom' | 'left' | 'right';
114
154
  interface ChartLegend {
@@ -215,7 +255,7 @@ interface ChartRect {
215
255
  height: number;
216
256
  }
217
257
  /** What a mark is, for styling and tests. */
218
- type ChartMarkRole = 'background' | 'title' | 'subtitle' | 'grid' | 'axis' | 'tick' | 'tick-label' | 'axis-title' | 'bar' | 'line' | 'area' | 'point' | 'slice' | 'cell' | 'box' | 'whisker' | 'outlier' | 'connector' | 'trendline' | 'trendline-label' | 'data-label' | 'legend-swatch' | 'legend-label' | 'drag-readout' | 'selection' | 'empty';
258
+ type ChartMarkRole = 'background' | 'title' | 'subtitle' | 'grid' | 'axis' | 'tick' | 'tick-label' | 'axis-title' | 'bar' | 'line' | 'area' | 'point' | 'slice' | 'cell' | 'box' | 'whisker' | 'outlier' | 'connector' | 'trendline' | 'trendline-label' | 'error-bar' | 'data-label' | 'legend-swatch' | 'legend-label' | 'drag-readout' | 'selection' | 'empty';
219
259
  interface ChartMarkBase {
220
260
  /** Unique within the scene (a stable key for frameworks). */
221
261
  key: string;
@@ -286,6 +326,8 @@ interface ChartValueScale {
286
326
  domain: [number, number];
287
327
  range: [number, number];
288
328
  ticks: number[];
329
+ /** Set when the axis is logarithmic: values map by their logarithm in this base. */
330
+ logBase?: number;
289
331
  }
290
332
  /** Something the layout had to leave out or shorten, as a sentence (for agents and screen readers). */
291
333
  interface ChartWarning {
@@ -324,6 +366,7 @@ declare const CHART_MARKERS: readonly ChartMarker[];
324
366
  declare const CHART_TRENDLINE_TYPES: readonly ChartTrendlineType[];
325
367
  declare const CHART_LABEL_POSITIONS: readonly ChartLabelPosition[];
326
368
  declare const CHART_AXIS_KINDS: readonly NonNullable<ChartAxis['kind']>[];
369
+ declare const CHART_AXIS_SCALES: readonly NonNullable<ChartAxis['scale']>[];
327
370
  declare const CHART_SERIES_TYPES: readonly ChartSeriesType[];
328
371
  declare const CHART_STACKINGS: readonly ChartStacking[];
329
372
  declare const CHART_CURVES: readonly ChartCurve[];
@@ -372,6 +415,8 @@ declare function parseChartValue(input: unknown): ChartValue | undefined;
372
415
  declare function normalizeChartAxis(value: unknown, fallback: ChartAxis, path: string, issues?: ChartIssue[]): ChartAxis;
373
416
  /** Values as numbers or nulls; bad entries become null and are reported. */
374
417
  declare function normalizeChartValues(value: unknown, length: number | undefined, path: string, issues?: ChartIssue[]): ChartValue[];
418
+ /** Checks one set of error bars; `null` (reported) when it is unusable. Custom amounts are padded to `length`. */
419
+ declare function normalizeChartErrorBars(value: unknown, length: number, path: string, issues?: ChartIssue[]): ChartErrorBars | null;
375
420
  /** Checks one trendline; `null` (reported) when it is unusable. */
376
421
  declare function normalizeChartTrendline(value: unknown, path: string, issues?: ChartIssue[]): ChartTrendline | null;
377
422
  /**
@@ -614,6 +659,8 @@ interface ChartSeriesInput {
614
659
  dataLabels?: boolean;
615
660
  format?: ChartNumberFormat;
616
661
  trendlines?: readonly ChartTrendline[];
662
+ errorBars?: ChartErrorBars;
663
+ xErrorBars?: ChartErrorBars;
617
664
  }
618
665
  /** Changes to one series; `null` resets a field to the chart's default. */
619
666
  interface ChartSeriesPatch {
@@ -631,6 +678,10 @@ interface ChartSeriesPatch {
631
678
  curve?: ChartCurve | null;
632
679
  dataLabels?: boolean | null;
633
680
  format?: ChartNumberFormat | null;
681
+ /** `null` removes the error bars. */
682
+ errorBars?: ChartErrorBars | null;
683
+ /** `null` removes the x error bars. */
684
+ xErrorBars?: ChartErrorBars | null;
634
685
  }
635
686
  interface ChartEditOptions {
636
687
  /** Undo step label. */
@@ -819,4 +870,4 @@ declare class ChartController {
819
870
  }
820
871
  declare function createChartController(options?: ChartControllerOptions): ChartController;
821
872
 
822
- export { type ChartSvgOptions as $, CHART_TRENDLINE_TYPES as A, CHART_TYPES as B, type ChartNumberFormat as C, CHART_TYPE_LABELS as D, CSS_VARIABLE_CHART_THEME as E, type ChartActionResult as F, type ChartCircleMark as G, type ChartControllerOptions as H, type ChartCurve as I, type ChartDomSpec as J, type ChartEditOptions as K, type ChartFamily as L, type ChartLabelPosition as M, type ChartLegendPosition as N, type ChartLineMark as O, type ChartMark as P, type ChartMarkRole as Q, type ChartMarker as R, type ChartOrientation as S, type ChartPathMark as T, type ChartRectMark as U, type ChartSeriesInput as V, type ChartSeriesPatch as W, type ChartSeriesType as X, type ChartSparklineKind as Y, type ChartSparklineOptions as Z, type ChartState as _, type ChartValue as a, type ChartTableData as a0, type ChartTableOptions as a1, type ChartTextMark as a2, type ChartTextMeasure as a3, type ChartTrendFit as a4, type ChartTrendline as a5, type ChartTrendlineType as a6, DEFAULT_CHART_PALETTE as a7, DEFAULT_CHART_THEME as a8, chartColorInputValue as a9, layoutSparkline as aA, normalizeChartAxis as aB, normalizeChartSpec as aC, normalizeChartTrendline as aD, normalizeChartValues as aE, parseChartValue as aF, sameChartSelection as aG, sparklineToSvg as aH, trendNumberText as aI, uniqueChartSeriesId as aJ, chartColorsByCategory as aa, chartDataFromTable as ab, chartDataToTable as ac, chartFamily as ad, chartMovingAverage as ae, chartPointColor as af, chartSceneToDomSpec as ag, chartSceneToSvg as ah, chartSeriesColor as ai, chartSeriesType as aj, chartSliceColor as ak, chartSupportsTrendlines as al, chartTextBaseline as am, chartTextTransform as an, chartToSvg as ao, chartTrendlineName as ap, cloneChartSeries as aq, cloneChartSpec as ar, contrastingTextColor as as, createChartController as at, createChartSpec as au, defaultChartAxis as av, estimateChartTextWidth as aw, fitChartTrendline as ax, isCartesianChart as ay, isXyChart as az, type ChartRect as b, type ChartScene as c, type ChartSpec as d, type ChartLayoutOptions as e, type ChartTheme as f, type ChartWarning as g, type ChartAxis as h, type ChartLegend as i, type ChartType as j, type ChartStacking as k, type ChartSeries as l, type ChartIssue as m, ChartController as n, type ChartValueScale as o, type ChartSelection as p, type ChartSpecPatch as q, CHART_AXIS_KINDS as r, CHART_CURVES as s, CHART_LABEL_POSITIONS as t, CHART_LEGEND_POSITIONS as u, CHART_MARKERS as v, CHART_NUMBER_STYLES as w, CHART_ORIENTATIONS as x, CHART_SERIES_TYPES as y, CHART_STACKINGS as z };
873
+ export { type ChartSparklineKind as $, CHART_ORIENTATIONS as A, CHART_SERIES_TYPES as B, type ChartValueScale as C, CHART_STACKINGS as D, CHART_TRENDLINE_TYPES as E, CHART_TYPES as F, CHART_TYPE_LABELS as G, CSS_VARIABLE_CHART_THEME as H, type ChartActionResult as I, type ChartCircleMark as J, type ChartControllerOptions as K, type ChartCurve as L, type ChartDomSpec as M, type ChartEditOptions as N, type ChartFamily as O, type ChartLabelPosition as P, type ChartLegendPosition as Q, type ChartLineMark as R, type ChartMark as S, type ChartMarkRole as T, type ChartMarker as U, type ChartOrientation as V, type ChartPathMark as W, type ChartRectMark as X, type ChartSeriesInput as Y, type ChartSeriesPatch as Z, type ChartSeriesType as _, type ChartNumberFormat as a, type ChartSparklineOptions as a0, type ChartState as a1, type ChartSvgOptions as a2, type ChartTableData as a3, type ChartTableOptions as a4, type ChartTextMark as a5, type ChartTextMeasure as a6, type ChartTrendFit as a7, type ChartTrendline as a8, type ChartTrendlineType as a9, fitChartTrendline as aA, isCartesianChart as aB, isXyChart as aC, layoutSparkline as aD, normalizeChartAxis as aE, normalizeChartErrorBars as aF, normalizeChartSpec as aG, normalizeChartTrendline as aH, normalizeChartValues as aI, parseChartValue as aJ, sameChartSelection as aK, sparklineToSvg as aL, trendNumberText as aM, uniqueChartSeriesId as aN, DEFAULT_CHART_PALETTE as aa, DEFAULT_CHART_THEME as ab, chartColorInputValue as ac, chartColorsByCategory as ad, chartDataFromTable as ae, chartDataToTable as af, chartFamily as ag, chartMovingAverage as ah, chartPointColor as ai, chartSceneToDomSpec as aj, chartSceneToSvg as ak, chartSeriesColor as al, chartSeriesType as am, chartSliceColor as an, chartSupportsTrendlines as ao, chartTextBaseline as ap, chartTextTransform as aq, chartToSvg as ar, chartTrendlineName as as, cloneChartSeries as at, cloneChartSpec as au, contrastingTextColor as av, createChartController as aw, createChartSpec as ax, defaultChartAxis as ay, estimateChartTextWidth as az, type ChartValue as b, type ChartRect as c, type ChartErrorBars as d, type ChartErrorBarType as e, type ChartScene as f, type ChartSpec as g, type ChartLayoutOptions as h, type ChartTheme as i, type ChartWarning as j, type ChartAxis as k, type ChartLegend as l, type ChartType as m, type ChartStacking as n, type ChartSeries as o, type ChartIssue as p, ChartController as q, type ChartSelection as r, type ChartSpecPatch as s, CHART_AXIS_KINDS as t, CHART_AXIS_SCALES as u, CHART_CURVES as v, CHART_LABEL_POSITIONS as w, CHART_LEGEND_POSITIONS as x, CHART_MARKERS as y, CHART_NUMBER_STYLES as z };