@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.
- package/dist/agent/index.cjs +37 -29
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +4 -3
- package/dist/agent/index.d.ts +4 -3
- package/dist/agent/index.js +16 -8
- package/dist/agent/index.js.map +1 -1
- package/dist/animation/index.cjs +15 -1
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +3 -226
- package/dist/animation/index.d.ts +3 -226
- package/dist/animation/index.js +14 -0
- package/dist/bridge/cli.cjs +36 -0
- package/dist/bridge/cli.cjs.map +1 -0
- package/dist/bridge/cli.d.cts +1 -0
- package/dist/bridge/cli.d.ts +1 -0
- package/dist/bridge/cli.js +36 -0
- package/dist/bridge/cli.js.map +1 -0
- package/dist/bridge/index.cjs +16 -0
- package/dist/bridge/index.cjs.map +1 -0
- package/dist/bridge/index.d.cts +65 -0
- package/dist/bridge/index.d.ts +65 -0
- package/dist/bridge/index.js +16 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge-client-C5OziCRK.d.cts +148 -0
- package/dist/bridge-client-C5dRjrz5.d.ts +148 -0
- package/dist/canvas/index.cjs +1308 -528
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +309 -5
- package/dist/canvas/index.d.ts +309 -5
- package/dist/canvas/index.js +1295 -515
- package/dist/canvas/index.js.map +1 -1
- package/dist/chart/index.cjs +193 -192
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +77 -59
- package/dist/chart/index.d.ts +77 -59
- package/dist/chart/index.js +87 -86
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-UAW5FEMD.js → chunk-3S72F46R.js} +66 -8
- package/dist/chunk-3S72F46R.js.map +1 -0
- package/dist/{chunk-5TWIN7ZJ.js → chunk-47WWV3LI.js} +34 -4
- package/dist/chunk-47WWV3LI.js.map +1 -0
- package/dist/{chunk-OV7UAKIY.js → chunk-633QC34G.js} +172 -1
- package/dist/chunk-633QC34G.js.map +1 -0
- package/dist/chunk-AWKPSOSX.js +401 -0
- package/dist/chunk-AWKPSOSX.js.map +1 -0
- package/dist/chunk-B6DSIEXA.js +96 -0
- package/dist/chunk-B6DSIEXA.js.map +1 -0
- package/dist/{chunk-5N6AQCVB.js → chunk-BQQZ6MOI.js} +3 -3
- package/dist/{chunk-M5Z77GFH.cjs → chunk-C3JHII3M.cjs} +53 -53
- package/dist/{chunk-M5Z77GFH.cjs.map → chunk-C3JHII3M.cjs.map} +1 -1
- package/dist/{chunk-JOX6MJW4.cjs → chunk-CKRNELPO.cjs} +176 -5
- package/dist/chunk-CKRNELPO.cjs.map +1 -0
- package/dist/{chunk-TGBCBQFV.cjs → chunk-DK6QBGCS.cjs} +45 -15
- package/dist/chunk-DK6QBGCS.cjs.map +1 -0
- package/dist/chunk-EGFUVXKK.cjs +96 -0
- package/dist/chunk-EGFUVXKK.cjs.map +1 -0
- package/dist/{chunk-AMWXSYCI.js → chunk-GPWNYQ7R.js} +2 -370
- package/dist/chunk-GPWNYQ7R.js.map +1 -0
- package/dist/chunk-H5K77C7Y.cjs +3848 -0
- package/dist/chunk-H5K77C7Y.cjs.map +1 -0
- package/dist/chunk-K73CKYUM.cjs +458 -0
- package/dist/chunk-K73CKYUM.cjs.map +1 -0
- package/dist/{chunk-GTZXF4BI.cjs → chunk-NK3WL5TJ.cjs} +298 -133
- package/dist/chunk-NK3WL5TJ.cjs.map +1 -0
- package/dist/{chunk-3ZBAXET6.cjs → chunk-NN3JGUSX.cjs} +80 -22
- package/dist/chunk-NN3JGUSX.cjs.map +1 -0
- package/dist/chunk-NV22EMOZ.cjs +401 -0
- package/dist/chunk-NV22EMOZ.cjs.map +1 -0
- package/dist/{chunk-YMKPMXZ4.js → chunk-OIKYP7XC.js} +4 -4
- package/dist/{chunk-FEMIVHN3.cjs → chunk-P43HUQRX.cjs} +16 -16
- package/dist/{chunk-FEMIVHN3.cjs.map → chunk-P43HUQRX.cjs.map} +1 -1
- package/dist/chunk-PTMIGXZ2.js +467 -0
- package/dist/chunk-PTMIGXZ2.js.map +1 -0
- package/dist/chunk-QIWFEEWG.cjs +467 -0
- package/dist/chunk-QIWFEEWG.cjs.map +1 -0
- package/dist/{chunk-QFTVLEVN.js → chunk-RIXTW3C4.js} +3 -3
- package/dist/{chunk-WBOAXDKD.js → chunk-VODBAO32.js} +222 -57
- package/dist/chunk-VODBAO32.js.map +1 -0
- package/dist/chunk-WWJNC7SX.js +3848 -0
- package/dist/chunk-WWJNC7SX.js.map +1 -0
- package/dist/{chunk-2DEBI6KU.cjs → chunk-YZZMX6V7.cjs} +10 -10
- package/dist/{chunk-2DEBI6KU.cjs.map → chunk-YZZMX6V7.cjs.map} +1 -1
- package/dist/commands/index.d.cts +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/{controller-DS3drIvy.d.cts → controller-CX0QfSv0.d.cts} +53 -2
- package/dist/{controller-BdKzaxs2.d.ts → controller-DscWQbjO.d.ts} +53 -2
- package/dist/diagram/index.cjs +1146 -0
- package/dist/diagram/index.cjs.map +1 -0
- package/dist/diagram/index.d.cts +787 -0
- package/dist/diagram/index.d.ts +787 -0
- package/dist/diagram/index.js +1146 -0
- package/dist/diagram/index.js.map +1 -0
- package/dist/{easing-DTmX99QG.d.cts → easing-CNGk-W6d.d.cts} +1 -1
- package/dist/{easing-DTmX99QG.d.ts → easing-CNGk-W6d.d.ts} +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +6 -6
- package/dist/extensions/index.d.cts +2 -2
- package/dist/extensions/index.d.ts +2 -2
- package/dist/extensions/index.js +5 -5
- package/dist/generation/index.d.cts +2 -2
- package/dist/generation/index.d.ts +2 -2
- package/dist/image-editor/index.d.cts +1 -1
- package/dist/image-editor/index.d.ts +1 -1
- package/dist/{index-Dt9lzydb.d.ts → index-CALDD35B.d.ts} +1 -1
- package/dist/{index-DOy9HzfC.d.cts → index-DIWB6xMf.d.cts} +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/parameters/index.d.cts +1 -1
- package/dist/parameters/index.d.ts +1 -1
- package/dist/player-DSMjdgQ9.d.cts +225 -0
- package/dist/player-DdfVrKWq.d.ts +225 -0
- package/dist/presence-Cb6WhcrQ.d.cts +77 -0
- package/dist/presence-Cb6WhcrQ.d.ts +77 -0
- package/dist/{registry-CSlH4iUn.d.ts → registry-7AZFuand.d.ts} +1 -1
- package/dist/{registry-B4l-lYts.d.cts → registry-DIpIaCkH.d.cts} +1 -1
- package/dist/tools/index.cjs +10 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +3 -74
- package/dist/tools/index.d.ts +3 -74
- package/dist/tools/index.js +12 -4
- package/dist/types-BULrFyuQ.d.cts +316 -0
- package/dist/types-BULrFyuQ.d.ts +316 -0
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/package.json +14 -1
- package/dist/chunk-3ZBAXET6.cjs.map +0 -1
- package/dist/chunk-5TWIN7ZJ.js.map +0 -1
- package/dist/chunk-AMWXSYCI.js.map +0 -1
- package/dist/chunk-GTZXF4BI.cjs.map +0 -1
- package/dist/chunk-JOX6MJW4.cjs.map +0 -1
- package/dist/chunk-OV7UAKIY.js.map +0 -1
- package/dist/chunk-TGBCBQFV.cjs.map +0 -1
- package/dist/chunk-UAW5FEMD.js.map +0 -1
- package/dist/chunk-WBOAXDKD.js.map +0 -1
- package/dist/chunk-XFYUFVAX.cjs +0 -826
- package/dist/chunk-XFYUFVAX.cjs.map +0 -1
- /package/dist/{chunk-5N6AQCVB.js.map → chunk-BQQZ6MOI.js.map} +0 -0
- /package/dist/{chunk-YMKPMXZ4.js.map → chunk-OIKYP7XC.js.map} +0 -0
- /package/dist/{chunk-QFTVLEVN.js.map → chunk-RIXTW3C4.js.map} +0 -0
package/dist/chart/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChartValueScale, a as ChartNumberFormat, b as ChartValue, c as ChartRect, d as ChartErrorBars, e as ChartErrorBarType, f as ChartScene, g as ChartSpec, h as ChartLayoutOptions, i as ChartTheme, j as ChartWarning, k as ChartAxis, l as ChartLegend, m as ChartType, n as ChartStacking, o as ChartSeries, p as ChartIssue, q as ChartController, r as ChartSelection, s as ChartSpecPatch } from '../controller-CX0QfSv0.cjs';
|
|
2
|
+
export { t as CHART_AXIS_KINDS, u as CHART_AXIS_SCALES, v as CHART_CURVES, w as CHART_LABEL_POSITIONS, x as CHART_LEGEND_POSITIONS, y as CHART_MARKERS, z as CHART_NUMBER_STYLES, A as CHART_ORIENTATIONS, B as CHART_SERIES_TYPES, D as CHART_STACKINGS, E as CHART_TRENDLINE_TYPES, F as CHART_TYPES, G as CHART_TYPE_LABELS, H as CSS_VARIABLE_CHART_THEME, I as ChartActionResult, J as ChartCircleMark, K as ChartControllerOptions, L as ChartCurve, M as ChartDomSpec, N as ChartEditOptions, O as ChartFamily, P as ChartLabelPosition, Q as ChartLegendPosition, R as ChartLineMark, S as ChartMark, T as ChartMarkRole, U as ChartMarker, V as ChartOrientation, W as ChartPathMark, X as ChartRectMark, Y as ChartSeriesInput, Z as ChartSeriesPatch, _ as ChartSeriesType, $ as ChartSparklineKind, a0 as ChartSparklineOptions, a1 as ChartState, a2 as ChartSvgOptions, a3 as ChartTableData, a4 as ChartTableOptions, a5 as ChartTextMark, a6 as ChartTextMeasure, a7 as ChartTrendFit, a8 as ChartTrendline, a9 as ChartTrendlineType, aa as DEFAULT_CHART_PALETTE, ab as DEFAULT_CHART_THEME, ac as chartColorInputValue, ad as chartColorsByCategory, ae as chartDataFromTable, af as chartDataToTable, ag as chartFamily, ah as chartMovingAverage, ai as chartPointColor, aj as chartSceneToDomSpec, ak as chartSceneToSvg, al as chartSeriesColor, am as chartSeriesType, an as chartSliceColor, ao as chartSupportsTrendlines, ap as chartTextBaseline, aq as chartTextTransform, ar as chartToSvg, as as chartTrendlineName, at as cloneChartSeries, au as cloneChartSpec, av as contrastingTextColor, aw as createChartController, ax as createChartSpec, ay as defaultChartAxis, az as estimateChartTextWidth, aA as fitChartTrendline, aB as isCartesianChart, aC as isXyChart, aD as layoutSparkline, aE as normalizeChartAxis, aF as normalizeChartErrorBars, aG as normalizeChartSpec, aH as normalizeChartTrendline, aI as normalizeChartValues, aJ as parseChartValue, aK as sameChartSelection, aL as sparklineToSvg, aM as trendNumberText, aN as uniqueChartSeriesId } from '../controller-CX0QfSv0.cjs';
|
|
3
3
|
import { C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
4
|
-
import { A as AgentToolProvider } from '../registry-
|
|
4
|
+
import { A as AgentToolProvider } from '../registry-DIpIaCkH.cjs';
|
|
5
|
+
import { e as PresenceClock, g as PresenceStore, d as PresenceActorInfo, c as PresenceActor, f as PresenceState, h as createInstantPresenceClock } from '../presence-Cb6WhcrQ.cjs';
|
|
5
6
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
|
|
6
7
|
import '../HistoryManager-DeQQMBCj.cjs';
|
|
7
8
|
import '../types-DsiXGmjo.cjs';
|
|
@@ -31,6 +32,20 @@ declare function stepDecimals(step: number): number;
|
|
|
31
32
|
declare function formatChartNumber(value: number | null | undefined, format?: ChartNumberFormat, fallbackDecimals?: number): string;
|
|
32
33
|
/** Linear map from `domain` to `range`. */
|
|
33
34
|
declare function linearMap(value: number, domain: readonly [number, number], range: readonly [number, number]): number;
|
|
35
|
+
/**
|
|
36
|
+
* A logarithmic scale over `[lo, hi]` (only positive values count): the ends extend to whole
|
|
37
|
+
* powers of `base` unless fixed, and ticks sit on the powers, thinned to about `count`, or, in
|
|
38
|
+
* base 10 over a few decades, on the 1-2-5 steps between them. `step` is the base. Non-positive
|
|
39
|
+
* or non-finite ends fall back to the data, and no positive data at all gives 1 to `base`.
|
|
40
|
+
*/
|
|
41
|
+
declare function niceLogScale(lo: number, hi: number, count?: number, base?: number, fixedMin?: number | null, fixedMax?: number | null): NiceScale;
|
|
42
|
+
/**
|
|
43
|
+
* A data value's pixel on a value scale: linear, or by logarithm when `scale.logBase` is set
|
|
44
|
+
* (values of 0 or less have no pixel there and give NaN).
|
|
45
|
+
*/
|
|
46
|
+
declare function chartScaleToPixel(value: number, scale: Pick<ChartValueScale, 'domain' | 'range' | 'logBase'>): number;
|
|
47
|
+
/** The data value at a pixel on a value scale (the inverse of `chartScaleToPixel`). */
|
|
48
|
+
declare function chartScaleFromPixel(px: number, scale: Pick<ChartValueScale, 'domain' | 'range' | 'logBase'>): number;
|
|
34
49
|
|
|
35
50
|
/**
|
|
36
51
|
* A compiled spreadsheet number format code for chart labels, e.g. `#,##0.00`, `0.0%`,
|
|
@@ -256,6 +271,39 @@ declare function summarizeChartSeries(series: {
|
|
|
256
271
|
values: readonly ChartValue[];
|
|
257
272
|
}, categories: readonly string[]): ChartSeriesSummary;
|
|
258
273
|
|
|
274
|
+
declare const CHART_ERROR_BAR_TYPES: readonly ChartErrorBarType[];
|
|
275
|
+
declare const CHART_ERROR_BAR_DIRECTIONS: readonly NonNullable<ChartErrorBars['direction']>[];
|
|
276
|
+
/** Labels for pickers, shared by the React and Svelte components. */
|
|
277
|
+
declare const CHART_ERROR_BAR_LABELS: Readonly<Record<ChartErrorBarType, string>>;
|
|
278
|
+
/** The default `value` per type (`fixed` 1, `percent` 5, `stddev` 1). */
|
|
279
|
+
declare function defaultChartErrorBarValue(type: ChartErrorBarType): number | undefined;
|
|
280
|
+
/** One point's error bar: where it is centred and how far it reaches each way (both 0 or more). */
|
|
281
|
+
interface ChartErrorAmount {
|
|
282
|
+
/** The point's value, or the series mean for `stddev` (as Excel draws it). */
|
|
283
|
+
center: number;
|
|
284
|
+
plus: number;
|
|
285
|
+
minus: number;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The error bar at each point of `values` (a series' values, or its x values for x error
|
|
289
|
+
* bars), following Excel's error amount types: `fixed` and `percent` from `value`, `stddev`
|
|
290
|
+
* around the series mean, `stderr` (sample standard deviation / √n) and `custom` amounts from
|
|
291
|
+
* `plus` / `minus`. Gaps (and custom points without an amount) give `null`.
|
|
292
|
+
*/
|
|
293
|
+
declare function chartErrorAmounts(bars: ChartErrorBars, values: readonly ChartValue[]): (ChartErrorAmount | null)[];
|
|
294
|
+
/** A one-line description of error bars ("±5% error bars", "±1 standard deviation error bars"). */
|
|
295
|
+
declare function describeChartErrorBars(bars: ChartErrorBars): string;
|
|
296
|
+
/**
|
|
297
|
+
* Error bars for a picker change: `null` for none, else bars of `type` that keep the current
|
|
298
|
+
* direction and caps. Switching to `custom` starts from the amounts the current bars (or ±1)
|
|
299
|
+
* draw, so the picture does not jump. Shared by the React and Svelte inspectors.
|
|
300
|
+
*/
|
|
301
|
+
declare function chartErrorBarsOfType(type: ChartErrorBarType | '' | null, current: ChartErrorBars | undefined, values: readonly ChartValue[]): ChartErrorBars | null;
|
|
302
|
+
/** Custom amounts as text for an input: "1, 2, -, 0.5" (`-` is a point without a bar). */
|
|
303
|
+
declare function formatChartAmountList(values: readonly ChartValue[] | undefined): string;
|
|
304
|
+
/** Reads amounts typed as "1, 2, -, 0.5" (commas, semicolons or spaces; `-` or blank for none). */
|
|
305
|
+
declare function parseChartAmountList(text: string): (string | null)[];
|
|
306
|
+
|
|
259
307
|
/**
|
|
260
308
|
* Lays a chart out as drawing primitives (rects, paths, circles, lines and text) in a
|
|
261
309
|
* `width × height` box. Pure and DOM-free: the React and Svelte canvases render the marks
|
|
@@ -267,7 +315,7 @@ declare function layoutChart(spec: ChartSpec, options: ChartLayoutOptions): Char
|
|
|
267
315
|
/**
|
|
268
316
|
* The data value at a scene point along the value axis (for dragging a bar or point), or
|
|
269
317
|
* `undefined` when the scene has no value scale or is percent-stacked. `secondary` reads the
|
|
270
|
-
* secondary axis.
|
|
318
|
+
* secondary axis. Reversed and logarithmic axes are mapped as drawn.
|
|
271
319
|
*/
|
|
272
320
|
declare function chartValueAtPoint(scene: ChartScene, point: {
|
|
273
321
|
x: number;
|
|
@@ -278,8 +326,12 @@ declare function chartXAtPoint(scene: ChartScene, point: {
|
|
|
278
326
|
x: number;
|
|
279
327
|
y: number;
|
|
280
328
|
}): number | undefined;
|
|
281
|
-
/**
|
|
282
|
-
|
|
329
|
+
/**
|
|
330
|
+
* The value a drag should store: snapped to a tenth of the tick step (or `step`) and kept
|
|
331
|
+
* finite. On a logarithmic axis (`logBase`, without a `step`) ticks are not evenly spaced, so
|
|
332
|
+
* the value is rounded to two significant digits instead.
|
|
333
|
+
*/
|
|
334
|
+
declare function snapChartValue(scene: ChartScene, value: number, step?: number, ticks?: readonly number[], logBase?: number): number;
|
|
283
335
|
|
|
284
336
|
/** Data labels are skipped on series with more points than this. */
|
|
285
337
|
declare const MAX_CHART_DATA_LABELS = 200;
|
|
@@ -368,27 +420,23 @@ declare function downloadChartPng(spec: ChartSpec, options?: DownloadChartPngOpt
|
|
|
368
420
|
filename: string;
|
|
369
421
|
}>;
|
|
370
422
|
|
|
423
|
+
/** An axis as drawn. `logBase` is set on a logarithmic axis, `reversed` when it runs the other way. */
|
|
424
|
+
interface ChartAxisSummary {
|
|
425
|
+
min: number;
|
|
426
|
+
max: number;
|
|
427
|
+
ticks: number[];
|
|
428
|
+
logBase?: number;
|
|
429
|
+
reversed?: boolean;
|
|
430
|
+
}
|
|
371
431
|
interface ChartSummary {
|
|
372
432
|
type: ChartSpec['type'];
|
|
373
433
|
title: string;
|
|
374
434
|
categories: number;
|
|
375
435
|
series: ChartSeriesSummary[];
|
|
376
436
|
/** The value axis as drawn: range and ticks (absent for pies and treemaps). */
|
|
377
|
-
valueAxis?:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
ticks: number[];
|
|
381
|
-
};
|
|
382
|
-
secondaryAxis?: {
|
|
383
|
-
min: number;
|
|
384
|
-
max: number;
|
|
385
|
-
ticks: number[];
|
|
386
|
-
};
|
|
387
|
-
xAxis?: {
|
|
388
|
-
min: number;
|
|
389
|
-
max: number;
|
|
390
|
-
ticks: number[];
|
|
391
|
-
};
|
|
437
|
+
valueAxis?: ChartAxisSummary;
|
|
438
|
+
secondaryAxis?: ChartAxisSummary;
|
|
439
|
+
xAxis?: ChartAxisSummary;
|
|
392
440
|
/** What the layout left out at this size (hidden labels, thinned lines, …). */
|
|
393
441
|
warnings: ChartWarning[];
|
|
394
442
|
/** Whether the series colours can be told apart (also with colour-blindness). */
|
|
@@ -727,42 +775,17 @@ interface ChartOoxmlWriteResult {
|
|
|
727
775
|
*/
|
|
728
776
|
declare function chartToOoxml(spec: ChartSpec): ChartOoxmlWriteResult;
|
|
729
777
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
name: string;
|
|
733
|
-
color: string;
|
|
734
|
-
/** Cursor position in scene coordinates. */
|
|
735
|
-
x: number;
|
|
736
|
-
y: number;
|
|
737
|
-
/** The button is down (dragging). */
|
|
738
|
-
pressed: boolean;
|
|
739
|
-
/** A short note shown next to the cursor (what the agent is doing). */
|
|
740
|
-
message?: string;
|
|
741
|
-
}
|
|
742
|
-
interface ChartPresenceState {
|
|
743
|
-
actors: readonly ChartPresenceActor[];
|
|
744
|
-
}
|
|
778
|
+
type ChartPresenceActor = PresenceActor;
|
|
779
|
+
type ChartPresenceState = PresenceState;
|
|
745
780
|
/** Cursor positions and notes of agents acting on a chart, for an overlay. */
|
|
746
|
-
declare class ChartPresence {
|
|
747
|
-
private state;
|
|
748
|
-
private readonly listeners;
|
|
749
|
-
getState: () => ChartPresenceState;
|
|
750
|
-
subscribe: (listener: (state: ChartPresenceState) => void) => (() => void);
|
|
751
|
-
/** Adds or changes an actor. */
|
|
752
|
-
set(actor: Pick<ChartPresenceActor, 'id'> & Partial<ChartPresenceActor>): void;
|
|
753
|
-
remove(id: string): void;
|
|
781
|
+
declare class ChartPresence extends PresenceStore {
|
|
754
782
|
}
|
|
755
783
|
declare const CHART_PRESENCE_COLORS: readonly string[];
|
|
756
784
|
/** Time for performances: real timers, or an instant clock for tests and recordings. */
|
|
757
|
-
|
|
758
|
-
now(): number;
|
|
759
|
-
wait(ms: number): Promise<void>;
|
|
760
|
-
}
|
|
785
|
+
type ChartClock = PresenceClock;
|
|
761
786
|
declare const realChartClock: ChartClock;
|
|
762
787
|
/** A clock whose waits finish at once while its time still advances (repeatable performances). */
|
|
763
|
-
declare
|
|
764
|
-
elapsed(): number;
|
|
765
|
-
};
|
|
788
|
+
declare const createInstantChartClock: typeof createInstantPresenceClock;
|
|
766
789
|
/** What an agent asks for. Each command commits as one undo step. */
|
|
767
790
|
type ChartAgentCommand = {
|
|
768
791
|
kind: 'setValue';
|
|
@@ -830,11 +853,7 @@ interface ChartDirectorOptions {
|
|
|
830
853
|
/** Hide each actor's cursor this long after its last command (ms, default 1500; 0 keeps it). */
|
|
831
854
|
linger?: number;
|
|
832
855
|
}
|
|
833
|
-
|
|
834
|
-
id: string;
|
|
835
|
-
name?: string;
|
|
836
|
-
color?: string;
|
|
837
|
-
}
|
|
856
|
+
type ChartDirectorActor = PresenceActorInfo;
|
|
838
857
|
type ChartPerformanceResult = {
|
|
839
858
|
ok: true;
|
|
840
859
|
command: ChartAgentCommand;
|
|
@@ -853,9 +872,8 @@ declare class ChartDirector {
|
|
|
853
872
|
private readonly controller;
|
|
854
873
|
readonly presence: ChartPresence;
|
|
855
874
|
private readonly options;
|
|
856
|
-
private readonly queues;
|
|
857
875
|
private readonly clock;
|
|
858
|
-
private
|
|
876
|
+
private readonly queue;
|
|
859
877
|
constructor(controller: ChartController, presence: ChartPresence, options: ChartDirectorOptions);
|
|
860
878
|
/** Acts out `commands` in order for `actor`. Resolves with one result per command. */
|
|
861
879
|
perform(actor: ChartDirectorActor, commands: readonly ChartAgentCommand[]): Promise<ChartPerformanceResult[]>;
|
|
@@ -1064,4 +1082,4 @@ interface OfficeChartToolProviderOptions {
|
|
|
1064
1082
|
*/
|
|
1065
1083
|
declare function createOfficeChartToolProvider(options?: OfficeChartToolProviderOptions): AgentToolProvider;
|
|
1066
1084
|
|
|
1067
|
-
export { CHART_COLOR_SCHEMES, CHART_DATE_STEPS, CHART_LAYOUT_PRESETS, CHART_MERMAID_META_PREFIX, CHART_OOXML_CONTENT_TYPE, CHART_OOXML_NS, CHART_OOXML_RELATIONSHIP, CHART_PALETTE_SHADES, CHART_PRESENCE_COLORS, CHART_RASTER_MAX_SIZE, type ChartAgentCommand, ChartAxis, type ChartBoxStats, type ChartClock, type ChartColorCheck, type ChartColorCheckOptions, type ChartColorPair, type ChartColorScheme, type ChartCommandOptions, ChartController, type ChartDateLabels, type ChartDateStep, ChartDirector, type ChartDirectorActor, type ChartDirectorOptions, type ChartDragMoveOptions, type ChartFormatCode, type ChartFromTable, type ChartHistogramBin, ChartIssue, type ChartKeyInput, ChartLayoutOptions, type ChartLayoutPreset, ChartLegend, type ChartMermaidFamily, type ChartMermaidOptions, type ChartMermaidParseOptions, type ChartMermaidResult, ChartNumberFormat, type ChartOoxmlReadOptions, type ChartOoxmlReadResult, type ChartOoxmlWriteResult, type ChartPaintScope, type ChartPerformanceResult, type ChartPerformanceStep, type ChartPointDrag, ChartPresence, type ChartPresenceActor, type ChartPresenceState, type ChartPresetPatch, type ChartRasterImage, type ChartRecommendation, ChartRect, type ChartRgb, ChartScene, ChartSelection, ChartSeries, type ChartSeriesSummary, type ChartSnapOptions, ChartSpec, ChartSpecPatch, ChartStacking, ChartStream, type ChartStreamFormat, type ChartStreamResult, type ChartSummary, type ChartTableShape, ChartTheme, type ChartToolProviderOptions, ChartType, ChartValue, ChartValueScale, type ChartVision, ChartWarning, type DownloadChartPngOptions, type FoundChartMermaid, MAX_CHART_DATA_LABELS, MAX_CHART_LINE_POINTS, MAX_CHART_MARKERS, type NiceScale, type OfficeChartFile, type OfficeChartFileFormat, type OfficeChartToolProviderOptions, OfficeChartsError, type OfficeChartsReadOptions, type OfficeChartsResult, type OfficeFileChart, RENDER_CHART_INSTRUCTIONS, type RasterizeChartOptions, analyzeChartTable, blendChartScenes, canDragChartPoint, chartBoxStats, chartClientToScene, chartColorDistance, chartContrastRatio, chartDateLabels, chartDateToSerial, chartFileName, chartFormatToCode, chartFromMermaid, chartFromOoxml, chartFromTable, chartHistogram, chartHitTest, chartLuminance, chartMermaidFamily, chartPointAnchor, chartPresetPatch, chartQuantile, chartRasterSize, chartRgbToHex, chartRgbToOklab, chartSerialToDate, chartSquarify, chartTextOn, chartToMermaid, chartToOoxml, chartValueAtPoint, chartXAtPoint, checkChartColors, compileChartFormatCode, createChartCommands, createChartRasterizer, createChartToolProvider, createInstantChartClock, createOfficeChartToolProvider, cyclePaletteColor, decimateChartPoints, describeChart, describeChartSelection, describeOfficeChartPlace, downloadChartPng, easeChartTween, extractDocxCharts, extractOfficeCharts, extractPptxCharts, extractXlsxCharts, findMermaidCharts, formatChartDate, formatChartNumber, formatChartValueWithCode, handleChartKey, layoutChart, linearMap, monochromeChartPalette, niceScale, niceStep, parseChartColor, parseChartDate, parsePartialChartJson, planChartCommand, rasterizeChartSvg, realChartClock, recommendChartTypes, recommendForShape, resolveChartSvgPaints, shadeChartColor, simulateChartVision, snapChartDragValue, snapChartValue, startChartPointDrag, stepDecimals, summarizeChart, summarizeChartSeries };
|
|
1085
|
+
export { CHART_COLOR_SCHEMES, CHART_DATE_STEPS, CHART_ERROR_BAR_DIRECTIONS, CHART_ERROR_BAR_LABELS, CHART_ERROR_BAR_TYPES, CHART_LAYOUT_PRESETS, CHART_MERMAID_META_PREFIX, CHART_OOXML_CONTENT_TYPE, CHART_OOXML_NS, CHART_OOXML_RELATIONSHIP, CHART_PALETTE_SHADES, CHART_PRESENCE_COLORS, CHART_RASTER_MAX_SIZE, type ChartAgentCommand, ChartAxis, type ChartAxisSummary, type ChartBoxStats, type ChartClock, type ChartColorCheck, type ChartColorCheckOptions, type ChartColorPair, type ChartColorScheme, type ChartCommandOptions, ChartController, type ChartDateLabels, type ChartDateStep, ChartDirector, type ChartDirectorActor, type ChartDirectorOptions, type ChartDragMoveOptions, type ChartErrorAmount, ChartErrorBarType, ChartErrorBars, type ChartFormatCode, type ChartFromTable, type ChartHistogramBin, ChartIssue, type ChartKeyInput, ChartLayoutOptions, type ChartLayoutPreset, ChartLegend, type ChartMermaidFamily, type ChartMermaidOptions, type ChartMermaidParseOptions, type ChartMermaidResult, ChartNumberFormat, type ChartOoxmlReadOptions, type ChartOoxmlReadResult, type ChartOoxmlWriteResult, type ChartPaintScope, type ChartPerformanceResult, type ChartPerformanceStep, type ChartPointDrag, ChartPresence, type ChartPresenceActor, type ChartPresenceState, type ChartPresetPatch, type ChartRasterImage, type ChartRecommendation, ChartRect, type ChartRgb, ChartScene, ChartSelection, ChartSeries, type ChartSeriesSummary, type ChartSnapOptions, ChartSpec, ChartSpecPatch, ChartStacking, ChartStream, type ChartStreamFormat, type ChartStreamResult, type ChartSummary, type ChartTableShape, ChartTheme, type ChartToolProviderOptions, ChartType, ChartValue, ChartValueScale, type ChartVision, ChartWarning, type DownloadChartPngOptions, type FoundChartMermaid, MAX_CHART_DATA_LABELS, MAX_CHART_LINE_POINTS, MAX_CHART_MARKERS, type NiceScale, type OfficeChartFile, type OfficeChartFileFormat, type OfficeChartToolProviderOptions, OfficeChartsError, type OfficeChartsReadOptions, type OfficeChartsResult, type OfficeFileChart, RENDER_CHART_INSTRUCTIONS, type RasterizeChartOptions, analyzeChartTable, blendChartScenes, canDragChartPoint, chartBoxStats, chartClientToScene, chartColorDistance, chartContrastRatio, chartDateLabels, chartDateToSerial, chartErrorAmounts, chartErrorBarsOfType, chartFileName, chartFormatToCode, chartFromMermaid, chartFromOoxml, chartFromTable, chartHistogram, chartHitTest, chartLuminance, chartMermaidFamily, chartPointAnchor, chartPresetPatch, chartQuantile, chartRasterSize, chartRgbToHex, chartRgbToOklab, chartScaleFromPixel, chartScaleToPixel, chartSerialToDate, chartSquarify, chartTextOn, chartToMermaid, chartToOoxml, chartValueAtPoint, chartXAtPoint, checkChartColors, compileChartFormatCode, createChartCommands, createChartRasterizer, createChartToolProvider, createInstantChartClock, createOfficeChartToolProvider, cyclePaletteColor, decimateChartPoints, defaultChartErrorBarValue, describeChart, describeChartErrorBars, describeChartSelection, describeOfficeChartPlace, downloadChartPng, easeChartTween, extractDocxCharts, extractOfficeCharts, extractPptxCharts, extractXlsxCharts, findMermaidCharts, formatChartAmountList, formatChartDate, formatChartNumber, formatChartValueWithCode, handleChartKey, layoutChart, linearMap, monochromeChartPalette, niceLogScale, niceScale, niceStep, parseChartAmountList, parseChartColor, parseChartDate, parsePartialChartJson, planChartCommand, rasterizeChartSvg, realChartClock, recommendChartTypes, recommendForShape, resolveChartSvgPaints, shadeChartColor, simulateChartVision, snapChartDragValue, snapChartValue, startChartPointDrag, stepDecimals, summarizeChart, summarizeChartSeries };
|
package/dist/chart/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChartValueScale, a as ChartNumberFormat, b as ChartValue, c as ChartRect, d as ChartErrorBars, e as ChartErrorBarType, f as ChartScene, g as ChartSpec, h as ChartLayoutOptions, i as ChartTheme, j as ChartWarning, k as ChartAxis, l as ChartLegend, m as ChartType, n as ChartStacking, o as ChartSeries, p as ChartIssue, q as ChartController, r as ChartSelection, s as ChartSpecPatch } from '../controller-DscWQbjO.js';
|
|
2
|
+
export { t as CHART_AXIS_KINDS, u as CHART_AXIS_SCALES, v as CHART_CURVES, w as CHART_LABEL_POSITIONS, x as CHART_LEGEND_POSITIONS, y as CHART_MARKERS, z as CHART_NUMBER_STYLES, A as CHART_ORIENTATIONS, B as CHART_SERIES_TYPES, D as CHART_STACKINGS, E as CHART_TRENDLINE_TYPES, F as CHART_TYPES, G as CHART_TYPE_LABELS, H as CSS_VARIABLE_CHART_THEME, I as ChartActionResult, J as ChartCircleMark, K as ChartControllerOptions, L as ChartCurve, M as ChartDomSpec, N as ChartEditOptions, O as ChartFamily, P as ChartLabelPosition, Q as ChartLegendPosition, R as ChartLineMark, S as ChartMark, T as ChartMarkRole, U as ChartMarker, V as ChartOrientation, W as ChartPathMark, X as ChartRectMark, Y as ChartSeriesInput, Z as ChartSeriesPatch, _ as ChartSeriesType, $ as ChartSparklineKind, a0 as ChartSparklineOptions, a1 as ChartState, a2 as ChartSvgOptions, a3 as ChartTableData, a4 as ChartTableOptions, a5 as ChartTextMark, a6 as ChartTextMeasure, a7 as ChartTrendFit, a8 as ChartTrendline, a9 as ChartTrendlineType, aa as DEFAULT_CHART_PALETTE, ab as DEFAULT_CHART_THEME, ac as chartColorInputValue, ad as chartColorsByCategory, ae as chartDataFromTable, af as chartDataToTable, ag as chartFamily, ah as chartMovingAverage, ai as chartPointColor, aj as chartSceneToDomSpec, ak as chartSceneToSvg, al as chartSeriesColor, am as chartSeriesType, an as chartSliceColor, ao as chartSupportsTrendlines, ap as chartTextBaseline, aq as chartTextTransform, ar as chartToSvg, as as chartTrendlineName, at as cloneChartSeries, au as cloneChartSpec, av as contrastingTextColor, aw as createChartController, ax as createChartSpec, ay as defaultChartAxis, az as estimateChartTextWidth, aA as fitChartTrendline, aB as isCartesianChart, aC as isXyChart, aD as layoutSparkline, aE as normalizeChartAxis, aF as normalizeChartErrorBars, aG as normalizeChartSpec, aH as normalizeChartTrendline, aI as normalizeChartValues, aJ as parseChartValue, aK as sameChartSelection, aL as sparklineToSvg, aM as trendNumberText, aN as uniqueChartSeriesId } from '../controller-DscWQbjO.js';
|
|
3
3
|
import { C as CommandSpec } from '../registry-rVtFJjRM.js';
|
|
4
|
-
import { A as AgentToolProvider } from '../registry-
|
|
4
|
+
import { A as AgentToolProvider } from '../registry-7AZFuand.js';
|
|
5
|
+
import { e as PresenceClock, g as PresenceStore, d as PresenceActorInfo, c as PresenceActor, f as PresenceState, h as createInstantPresenceClock } from '../presence-Cb6WhcrQ.js';
|
|
5
6
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.js';
|
|
6
7
|
import '../HistoryManager-DWSLd6Tf.js';
|
|
7
8
|
import '../types-DsiXGmjo.js';
|
|
@@ -31,6 +32,20 @@ declare function stepDecimals(step: number): number;
|
|
|
31
32
|
declare function formatChartNumber(value: number | null | undefined, format?: ChartNumberFormat, fallbackDecimals?: number): string;
|
|
32
33
|
/** Linear map from `domain` to `range`. */
|
|
33
34
|
declare function linearMap(value: number, domain: readonly [number, number], range: readonly [number, number]): number;
|
|
35
|
+
/**
|
|
36
|
+
* A logarithmic scale over `[lo, hi]` (only positive values count): the ends extend to whole
|
|
37
|
+
* powers of `base` unless fixed, and ticks sit on the powers, thinned to about `count`, or, in
|
|
38
|
+
* base 10 over a few decades, on the 1-2-5 steps between them. `step` is the base. Non-positive
|
|
39
|
+
* or non-finite ends fall back to the data, and no positive data at all gives 1 to `base`.
|
|
40
|
+
*/
|
|
41
|
+
declare function niceLogScale(lo: number, hi: number, count?: number, base?: number, fixedMin?: number | null, fixedMax?: number | null): NiceScale;
|
|
42
|
+
/**
|
|
43
|
+
* A data value's pixel on a value scale: linear, or by logarithm when `scale.logBase` is set
|
|
44
|
+
* (values of 0 or less have no pixel there and give NaN).
|
|
45
|
+
*/
|
|
46
|
+
declare function chartScaleToPixel(value: number, scale: Pick<ChartValueScale, 'domain' | 'range' | 'logBase'>): number;
|
|
47
|
+
/** The data value at a pixel on a value scale (the inverse of `chartScaleToPixel`). */
|
|
48
|
+
declare function chartScaleFromPixel(px: number, scale: Pick<ChartValueScale, 'domain' | 'range' | 'logBase'>): number;
|
|
34
49
|
|
|
35
50
|
/**
|
|
36
51
|
* A compiled spreadsheet number format code for chart labels, e.g. `#,##0.00`, `0.0%`,
|
|
@@ -256,6 +271,39 @@ declare function summarizeChartSeries(series: {
|
|
|
256
271
|
values: readonly ChartValue[];
|
|
257
272
|
}, categories: readonly string[]): ChartSeriesSummary;
|
|
258
273
|
|
|
274
|
+
declare const CHART_ERROR_BAR_TYPES: readonly ChartErrorBarType[];
|
|
275
|
+
declare const CHART_ERROR_BAR_DIRECTIONS: readonly NonNullable<ChartErrorBars['direction']>[];
|
|
276
|
+
/** Labels for pickers, shared by the React and Svelte components. */
|
|
277
|
+
declare const CHART_ERROR_BAR_LABELS: Readonly<Record<ChartErrorBarType, string>>;
|
|
278
|
+
/** The default `value` per type (`fixed` 1, `percent` 5, `stddev` 1). */
|
|
279
|
+
declare function defaultChartErrorBarValue(type: ChartErrorBarType): number | undefined;
|
|
280
|
+
/** One point's error bar: where it is centred and how far it reaches each way (both 0 or more). */
|
|
281
|
+
interface ChartErrorAmount {
|
|
282
|
+
/** The point's value, or the series mean for `stddev` (as Excel draws it). */
|
|
283
|
+
center: number;
|
|
284
|
+
plus: number;
|
|
285
|
+
minus: number;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The error bar at each point of `values` (a series' values, or its x values for x error
|
|
289
|
+
* bars), following Excel's error amount types: `fixed` and `percent` from `value`, `stddev`
|
|
290
|
+
* around the series mean, `stderr` (sample standard deviation / √n) and `custom` amounts from
|
|
291
|
+
* `plus` / `minus`. Gaps (and custom points without an amount) give `null`.
|
|
292
|
+
*/
|
|
293
|
+
declare function chartErrorAmounts(bars: ChartErrorBars, values: readonly ChartValue[]): (ChartErrorAmount | null)[];
|
|
294
|
+
/** A one-line description of error bars ("±5% error bars", "±1 standard deviation error bars"). */
|
|
295
|
+
declare function describeChartErrorBars(bars: ChartErrorBars): string;
|
|
296
|
+
/**
|
|
297
|
+
* Error bars for a picker change: `null` for none, else bars of `type` that keep the current
|
|
298
|
+
* direction and caps. Switching to `custom` starts from the amounts the current bars (or ±1)
|
|
299
|
+
* draw, so the picture does not jump. Shared by the React and Svelte inspectors.
|
|
300
|
+
*/
|
|
301
|
+
declare function chartErrorBarsOfType(type: ChartErrorBarType | '' | null, current: ChartErrorBars | undefined, values: readonly ChartValue[]): ChartErrorBars | null;
|
|
302
|
+
/** Custom amounts as text for an input: "1, 2, -, 0.5" (`-` is a point without a bar). */
|
|
303
|
+
declare function formatChartAmountList(values: readonly ChartValue[] | undefined): string;
|
|
304
|
+
/** Reads amounts typed as "1, 2, -, 0.5" (commas, semicolons or spaces; `-` or blank for none). */
|
|
305
|
+
declare function parseChartAmountList(text: string): (string | null)[];
|
|
306
|
+
|
|
259
307
|
/**
|
|
260
308
|
* Lays a chart out as drawing primitives (rects, paths, circles, lines and text) in a
|
|
261
309
|
* `width × height` box. Pure and DOM-free: the React and Svelte canvases render the marks
|
|
@@ -267,7 +315,7 @@ declare function layoutChart(spec: ChartSpec, options: ChartLayoutOptions): Char
|
|
|
267
315
|
/**
|
|
268
316
|
* The data value at a scene point along the value axis (for dragging a bar or point), or
|
|
269
317
|
* `undefined` when the scene has no value scale or is percent-stacked. `secondary` reads the
|
|
270
|
-
* secondary axis.
|
|
318
|
+
* secondary axis. Reversed and logarithmic axes are mapped as drawn.
|
|
271
319
|
*/
|
|
272
320
|
declare function chartValueAtPoint(scene: ChartScene, point: {
|
|
273
321
|
x: number;
|
|
@@ -278,8 +326,12 @@ declare function chartXAtPoint(scene: ChartScene, point: {
|
|
|
278
326
|
x: number;
|
|
279
327
|
y: number;
|
|
280
328
|
}): number | undefined;
|
|
281
|
-
/**
|
|
282
|
-
|
|
329
|
+
/**
|
|
330
|
+
* The value a drag should store: snapped to a tenth of the tick step (or `step`) and kept
|
|
331
|
+
* finite. On a logarithmic axis (`logBase`, without a `step`) ticks are not evenly spaced, so
|
|
332
|
+
* the value is rounded to two significant digits instead.
|
|
333
|
+
*/
|
|
334
|
+
declare function snapChartValue(scene: ChartScene, value: number, step?: number, ticks?: readonly number[], logBase?: number): number;
|
|
283
335
|
|
|
284
336
|
/** Data labels are skipped on series with more points than this. */
|
|
285
337
|
declare const MAX_CHART_DATA_LABELS = 200;
|
|
@@ -368,27 +420,23 @@ declare function downloadChartPng(spec: ChartSpec, options?: DownloadChartPngOpt
|
|
|
368
420
|
filename: string;
|
|
369
421
|
}>;
|
|
370
422
|
|
|
423
|
+
/** An axis as drawn. `logBase` is set on a logarithmic axis, `reversed` when it runs the other way. */
|
|
424
|
+
interface ChartAxisSummary {
|
|
425
|
+
min: number;
|
|
426
|
+
max: number;
|
|
427
|
+
ticks: number[];
|
|
428
|
+
logBase?: number;
|
|
429
|
+
reversed?: boolean;
|
|
430
|
+
}
|
|
371
431
|
interface ChartSummary {
|
|
372
432
|
type: ChartSpec['type'];
|
|
373
433
|
title: string;
|
|
374
434
|
categories: number;
|
|
375
435
|
series: ChartSeriesSummary[];
|
|
376
436
|
/** The value axis as drawn: range and ticks (absent for pies and treemaps). */
|
|
377
|
-
valueAxis?:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
ticks: number[];
|
|
381
|
-
};
|
|
382
|
-
secondaryAxis?: {
|
|
383
|
-
min: number;
|
|
384
|
-
max: number;
|
|
385
|
-
ticks: number[];
|
|
386
|
-
};
|
|
387
|
-
xAxis?: {
|
|
388
|
-
min: number;
|
|
389
|
-
max: number;
|
|
390
|
-
ticks: number[];
|
|
391
|
-
};
|
|
437
|
+
valueAxis?: ChartAxisSummary;
|
|
438
|
+
secondaryAxis?: ChartAxisSummary;
|
|
439
|
+
xAxis?: ChartAxisSummary;
|
|
392
440
|
/** What the layout left out at this size (hidden labels, thinned lines, …). */
|
|
393
441
|
warnings: ChartWarning[];
|
|
394
442
|
/** Whether the series colours can be told apart (also with colour-blindness). */
|
|
@@ -727,42 +775,17 @@ interface ChartOoxmlWriteResult {
|
|
|
727
775
|
*/
|
|
728
776
|
declare function chartToOoxml(spec: ChartSpec): ChartOoxmlWriteResult;
|
|
729
777
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
name: string;
|
|
733
|
-
color: string;
|
|
734
|
-
/** Cursor position in scene coordinates. */
|
|
735
|
-
x: number;
|
|
736
|
-
y: number;
|
|
737
|
-
/** The button is down (dragging). */
|
|
738
|
-
pressed: boolean;
|
|
739
|
-
/** A short note shown next to the cursor (what the agent is doing). */
|
|
740
|
-
message?: string;
|
|
741
|
-
}
|
|
742
|
-
interface ChartPresenceState {
|
|
743
|
-
actors: readonly ChartPresenceActor[];
|
|
744
|
-
}
|
|
778
|
+
type ChartPresenceActor = PresenceActor;
|
|
779
|
+
type ChartPresenceState = PresenceState;
|
|
745
780
|
/** Cursor positions and notes of agents acting on a chart, for an overlay. */
|
|
746
|
-
declare class ChartPresence {
|
|
747
|
-
private state;
|
|
748
|
-
private readonly listeners;
|
|
749
|
-
getState: () => ChartPresenceState;
|
|
750
|
-
subscribe: (listener: (state: ChartPresenceState) => void) => (() => void);
|
|
751
|
-
/** Adds or changes an actor. */
|
|
752
|
-
set(actor: Pick<ChartPresenceActor, 'id'> & Partial<ChartPresenceActor>): void;
|
|
753
|
-
remove(id: string): void;
|
|
781
|
+
declare class ChartPresence extends PresenceStore {
|
|
754
782
|
}
|
|
755
783
|
declare const CHART_PRESENCE_COLORS: readonly string[];
|
|
756
784
|
/** Time for performances: real timers, or an instant clock for tests and recordings. */
|
|
757
|
-
|
|
758
|
-
now(): number;
|
|
759
|
-
wait(ms: number): Promise<void>;
|
|
760
|
-
}
|
|
785
|
+
type ChartClock = PresenceClock;
|
|
761
786
|
declare const realChartClock: ChartClock;
|
|
762
787
|
/** A clock whose waits finish at once while its time still advances (repeatable performances). */
|
|
763
|
-
declare
|
|
764
|
-
elapsed(): number;
|
|
765
|
-
};
|
|
788
|
+
declare const createInstantChartClock: typeof createInstantPresenceClock;
|
|
766
789
|
/** What an agent asks for. Each command commits as one undo step. */
|
|
767
790
|
type ChartAgentCommand = {
|
|
768
791
|
kind: 'setValue';
|
|
@@ -830,11 +853,7 @@ interface ChartDirectorOptions {
|
|
|
830
853
|
/** Hide each actor's cursor this long after its last command (ms, default 1500; 0 keeps it). */
|
|
831
854
|
linger?: number;
|
|
832
855
|
}
|
|
833
|
-
|
|
834
|
-
id: string;
|
|
835
|
-
name?: string;
|
|
836
|
-
color?: string;
|
|
837
|
-
}
|
|
856
|
+
type ChartDirectorActor = PresenceActorInfo;
|
|
838
857
|
type ChartPerformanceResult = {
|
|
839
858
|
ok: true;
|
|
840
859
|
command: ChartAgentCommand;
|
|
@@ -853,9 +872,8 @@ declare class ChartDirector {
|
|
|
853
872
|
private readonly controller;
|
|
854
873
|
readonly presence: ChartPresence;
|
|
855
874
|
private readonly options;
|
|
856
|
-
private readonly queues;
|
|
857
875
|
private readonly clock;
|
|
858
|
-
private
|
|
876
|
+
private readonly queue;
|
|
859
877
|
constructor(controller: ChartController, presence: ChartPresence, options: ChartDirectorOptions);
|
|
860
878
|
/** Acts out `commands` in order for `actor`. Resolves with one result per command. */
|
|
861
879
|
perform(actor: ChartDirectorActor, commands: readonly ChartAgentCommand[]): Promise<ChartPerformanceResult[]>;
|
|
@@ -1064,4 +1082,4 @@ interface OfficeChartToolProviderOptions {
|
|
|
1064
1082
|
*/
|
|
1065
1083
|
declare function createOfficeChartToolProvider(options?: OfficeChartToolProviderOptions): AgentToolProvider;
|
|
1066
1084
|
|
|
1067
|
-
export { CHART_COLOR_SCHEMES, CHART_DATE_STEPS, CHART_LAYOUT_PRESETS, CHART_MERMAID_META_PREFIX, CHART_OOXML_CONTENT_TYPE, CHART_OOXML_NS, CHART_OOXML_RELATIONSHIP, CHART_PALETTE_SHADES, CHART_PRESENCE_COLORS, CHART_RASTER_MAX_SIZE, type ChartAgentCommand, ChartAxis, type ChartBoxStats, type ChartClock, type ChartColorCheck, type ChartColorCheckOptions, type ChartColorPair, type ChartColorScheme, type ChartCommandOptions, ChartController, type ChartDateLabels, type ChartDateStep, ChartDirector, type ChartDirectorActor, type ChartDirectorOptions, type ChartDragMoveOptions, type ChartFormatCode, type ChartFromTable, type ChartHistogramBin, ChartIssue, type ChartKeyInput, ChartLayoutOptions, type ChartLayoutPreset, ChartLegend, type ChartMermaidFamily, type ChartMermaidOptions, type ChartMermaidParseOptions, type ChartMermaidResult, ChartNumberFormat, type ChartOoxmlReadOptions, type ChartOoxmlReadResult, type ChartOoxmlWriteResult, type ChartPaintScope, type ChartPerformanceResult, type ChartPerformanceStep, type ChartPointDrag, ChartPresence, type ChartPresenceActor, type ChartPresenceState, type ChartPresetPatch, type ChartRasterImage, type ChartRecommendation, ChartRect, type ChartRgb, ChartScene, ChartSelection, ChartSeries, type ChartSeriesSummary, type ChartSnapOptions, ChartSpec, ChartSpecPatch, ChartStacking, ChartStream, type ChartStreamFormat, type ChartStreamResult, type ChartSummary, type ChartTableShape, ChartTheme, type ChartToolProviderOptions, ChartType, ChartValue, ChartValueScale, type ChartVision, ChartWarning, type DownloadChartPngOptions, type FoundChartMermaid, MAX_CHART_DATA_LABELS, MAX_CHART_LINE_POINTS, MAX_CHART_MARKERS, type NiceScale, type OfficeChartFile, type OfficeChartFileFormat, type OfficeChartToolProviderOptions, OfficeChartsError, type OfficeChartsReadOptions, type OfficeChartsResult, type OfficeFileChart, RENDER_CHART_INSTRUCTIONS, type RasterizeChartOptions, analyzeChartTable, blendChartScenes, canDragChartPoint, chartBoxStats, chartClientToScene, chartColorDistance, chartContrastRatio, chartDateLabels, chartDateToSerial, chartFileName, chartFormatToCode, chartFromMermaid, chartFromOoxml, chartFromTable, chartHistogram, chartHitTest, chartLuminance, chartMermaidFamily, chartPointAnchor, chartPresetPatch, chartQuantile, chartRasterSize, chartRgbToHex, chartRgbToOklab, chartSerialToDate, chartSquarify, chartTextOn, chartToMermaid, chartToOoxml, chartValueAtPoint, chartXAtPoint, checkChartColors, compileChartFormatCode, createChartCommands, createChartRasterizer, createChartToolProvider, createInstantChartClock, createOfficeChartToolProvider, cyclePaletteColor, decimateChartPoints, describeChart, describeChartSelection, describeOfficeChartPlace, downloadChartPng, easeChartTween, extractDocxCharts, extractOfficeCharts, extractPptxCharts, extractXlsxCharts, findMermaidCharts, formatChartDate, formatChartNumber, formatChartValueWithCode, handleChartKey, layoutChart, linearMap, monochromeChartPalette, niceScale, niceStep, parseChartColor, parseChartDate, parsePartialChartJson, planChartCommand, rasterizeChartSvg, realChartClock, recommendChartTypes, recommendForShape, resolveChartSvgPaints, shadeChartColor, simulateChartVision, snapChartDragValue, snapChartValue, startChartPointDrag, stepDecimals, summarizeChart, summarizeChartSeries };
|
|
1085
|
+
export { CHART_COLOR_SCHEMES, CHART_DATE_STEPS, CHART_ERROR_BAR_DIRECTIONS, CHART_ERROR_BAR_LABELS, CHART_ERROR_BAR_TYPES, CHART_LAYOUT_PRESETS, CHART_MERMAID_META_PREFIX, CHART_OOXML_CONTENT_TYPE, CHART_OOXML_NS, CHART_OOXML_RELATIONSHIP, CHART_PALETTE_SHADES, CHART_PRESENCE_COLORS, CHART_RASTER_MAX_SIZE, type ChartAgentCommand, ChartAxis, type ChartAxisSummary, type ChartBoxStats, type ChartClock, type ChartColorCheck, type ChartColorCheckOptions, type ChartColorPair, type ChartColorScheme, type ChartCommandOptions, ChartController, type ChartDateLabels, type ChartDateStep, ChartDirector, type ChartDirectorActor, type ChartDirectorOptions, type ChartDragMoveOptions, type ChartErrorAmount, ChartErrorBarType, ChartErrorBars, type ChartFormatCode, type ChartFromTable, type ChartHistogramBin, ChartIssue, type ChartKeyInput, ChartLayoutOptions, type ChartLayoutPreset, ChartLegend, type ChartMermaidFamily, type ChartMermaidOptions, type ChartMermaidParseOptions, type ChartMermaidResult, ChartNumberFormat, type ChartOoxmlReadOptions, type ChartOoxmlReadResult, type ChartOoxmlWriteResult, type ChartPaintScope, type ChartPerformanceResult, type ChartPerformanceStep, type ChartPointDrag, ChartPresence, type ChartPresenceActor, type ChartPresenceState, type ChartPresetPatch, type ChartRasterImage, type ChartRecommendation, ChartRect, type ChartRgb, ChartScene, ChartSelection, ChartSeries, type ChartSeriesSummary, type ChartSnapOptions, ChartSpec, ChartSpecPatch, ChartStacking, ChartStream, type ChartStreamFormat, type ChartStreamResult, type ChartSummary, type ChartTableShape, ChartTheme, type ChartToolProviderOptions, ChartType, ChartValue, ChartValueScale, type ChartVision, ChartWarning, type DownloadChartPngOptions, type FoundChartMermaid, MAX_CHART_DATA_LABELS, MAX_CHART_LINE_POINTS, MAX_CHART_MARKERS, type NiceScale, type OfficeChartFile, type OfficeChartFileFormat, type OfficeChartToolProviderOptions, OfficeChartsError, type OfficeChartsReadOptions, type OfficeChartsResult, type OfficeFileChart, RENDER_CHART_INSTRUCTIONS, type RasterizeChartOptions, analyzeChartTable, blendChartScenes, canDragChartPoint, chartBoxStats, chartClientToScene, chartColorDistance, chartContrastRatio, chartDateLabels, chartDateToSerial, chartErrorAmounts, chartErrorBarsOfType, chartFileName, chartFormatToCode, chartFromMermaid, chartFromOoxml, chartFromTable, chartHistogram, chartHitTest, chartLuminance, chartMermaidFamily, chartPointAnchor, chartPresetPatch, chartQuantile, chartRasterSize, chartRgbToHex, chartRgbToOklab, chartScaleFromPixel, chartScaleToPixel, chartSerialToDate, chartSquarify, chartTextOn, chartToMermaid, chartToOoxml, chartValueAtPoint, chartXAtPoint, checkChartColors, compileChartFormatCode, createChartCommands, createChartRasterizer, createChartToolProvider, createInstantChartClock, createOfficeChartToolProvider, cyclePaletteColor, decimateChartPoints, defaultChartErrorBarValue, describeChart, describeChartErrorBars, describeChartSelection, describeOfficeChartPlace, downloadChartPng, easeChartTween, extractDocxCharts, extractOfficeCharts, extractPptxCharts, extractXlsxCharts, findMermaidCharts, formatChartAmountList, formatChartDate, formatChartNumber, formatChartValueWithCode, handleChartKey, layoutChart, linearMap, monochromeChartPalette, niceLogScale, niceScale, niceStep, parseChartAmountList, parseChartColor, parseChartDate, parsePartialChartJson, planChartCommand, rasterizeChartSvg, realChartClock, recommendChartTypes, recommendForShape, resolveChartSvgPaints, shadeChartColor, simulateChartVision, snapChartDragValue, snapChartValue, startChartPointDrag, stepDecimals, summarizeChart, summarizeChartSeries };
|