expressive-charts 0.13.0 → 1.0.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/CHANGELOG.md +15 -26
- package/README.md +5 -7
- package/dist/expressive-charts.global.js +1 -1
- package/dist/expressive-charts.global.js.map +1 -1
- package/dist/index.cjs +15 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -6
- package/dist/index.d.ts +2 -7
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,32 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Each release is listed here, newest first. [The development log](https://github.com/Deaversbp/expressive-charts/blob/main/docs/plan.md) records what each milestone built, and why.
|
|
4
4
|
|
|
5
|
-
## The
|
|
5
|
+
## The promise
|
|
6
6
|
|
|
7
|
-
The
|
|
8
|
-
|
|
9
|
-
**The effect-author API** is:
|
|
10
|
-
|
|
11
|
-
- `defineEffect` and `defineDataEffect`, with `GeometryEffectSpec` and `DataEffectSpec`;
|
|
12
|
-
- `matrix` and `offset`;
|
|
13
|
-
- `describe.bar`, `describe.arc`, `describe.line`, `describe.point` and `describe.shape`, with their specs: `BarSpec`, `BarSegmentSpec`, `Baseline`, `ArcSpec`, `LineSpec`, `PointSpec` and `ShapeSpec`;
|
|
14
|
-
- the effect contracts (`GeometryEffect`, `DataEffect`, `TransitionEffect`, `MarkEffect`, `AnyMarkEffect`, `Combined`), the contexts (`EffectContext`, `TransitionContext`) and where their text sits (`TextSpace`), the mark and its data (`MarkGeometry`, `Outline`, `Point`, `Rect`, `MarkData`, `Sample`), the drawing API (`Layer`, `MarkHandle`, `MarkStyle`, `Matrix`, `Paint`, `TextStyle`, `Color`, and the handles `IconHandle`, `PathHandle` and `TextHandle`), and icons as an effect gets them (`Icon`, `IconShape`, `IconSource`);
|
|
15
|
-
- the motion types the context uses: `MotionView`, `MotionMode`, `Timing`, `Tween`, `TweenOptions`, `TweenResult` and `Easing`;
|
|
16
|
-
- `expressive-charts/testing`: `checkEffect`, `checkTransition`, `fixtures`, `fixturePairs`, `testContext` and `play`, with their options (`CheckEffectOptions`, `CheckTransitionOptions`, `TestContextOptions`, `PlayOptions`), the fixtures' names (`FixtureName`, `FixturePairName`), the test context (`TestContext`) and what it records (`RecordingLayer`, `RecordingMark`, `Drawn`, `DrawnIcon`, `DrawnPath`, `DrawnText`, `LayerCall`, `MarkCall`, `Picture`), and the motion types they use: `Motion`, `Clock`, `ManualClock`, `ScalingOverrides` and `ScalingRule`.
|
|
17
|
-
|
|
18
|
-
That's every type these names use, so code written against them needs nothing outside the list. A test imports every name in it, so none can be renamed or removed by accident.
|
|
19
|
-
|
|
20
|
-
From 0.1.0:
|
|
21
|
-
|
|
22
|
-
- **A breaking change to that API comes only in a minor release** (0.1 → 0.2), never in a patch, and this file lists it with a migration note: what changed, and what to write instead.
|
|
23
|
-
- **A deprecated name keeps working for one minor release.** It's marked `@deprecated` with its replacement, and removed in the minor release after that.
|
|
24
|
-
- Additions (a new optional field, a new helper) can come in any release.
|
|
25
|
-
|
|
26
|
-
Everything else can still change in a minor release while the library is 0.x: the motion core (`motion`, `createMotion`, the clocks, `tween`, `animated`, `playback`, and the types the list doesn't name), the charts, the adapters, the built-in effects and the controls. Those changes are listed here too. [docs/effects-guide.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/effects-guide.md) is the guide to the author API.
|
|
27
|
-
|
|
28
|
-
### What 1.0 will promise
|
|
29
|
-
|
|
30
|
-
From 1.0 the whole package follows semantic versioning, not the effect-author API alone. A breaking change to anything promised below comes only in a major release, with a migration note, and a deprecated name is taken out only in a major release. 0.13.0 is the last 0.x: 1.0 takes out what 0.13.0 deprecates and changes nothing else.
|
|
7
|
+
The package follows [semantic versioning](https://semver.org): from 1.0, the whole package, not the effect-author API alone. A breaking change to anything promised below comes only in a major release, with a migration note, and a deprecated name is taken out only in a major release.
|
|
31
8
|
|
|
32
9
|
**Promised:**
|
|
33
10
|
|
|
@@ -49,9 +26,21 @@ A page that needs one of these to stay as it is sets it itself: a duration or a
|
|
|
49
26
|
|
|
50
27
|
Additions can come in any minor release: a new export, a new optional field or option.
|
|
51
28
|
|
|
29
|
+
**Before 1.0,** from 0.1.0 to 0.13.0, the promise covered the effect-author API alone: `defineEffect` and `defineDataEffect`, `matrix` and `offset`, `describe`, the effect contracts and `expressive-charts/testing`. A breaking change to it came only in a minor release, with a migration note, and a deprecated name kept working for one minor release. Everything else could change in a minor release. The entries below list every change either way.
|
|
30
|
+
|
|
31
|
+
## 1.0.0 (20 November 2026)
|
|
32
|
+
|
|
33
|
+
The first stable release. From 1.0 the whole package follows semantic versioning: every name it exports, their types, what docs/api.md says each does, and the `--ec-*` custom properties, as [the promise](#the-promise) above says. One form is taken out, as 0.13.0 said it would be: `motionSwitch(target, motion, options)`, which 0.13.0 deprecated. Write `motionSwitch(target, { motion, ...options })` instead. Nothing else changes, so a page that runs on 0.13.0 without that form runs on 1.0.0 as it did. Before the release, VoiceOver and Safari read a page of each kind, and every step passed ([a11y-check.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/a11y-check.md#results)).
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
- **`motionSwitch(target, motion, options?)`,** the form with the motion as its second argument, which 0.13.0 deprecated. Write `motionSwitch(target, { motion, ...options })` instead, or `motionSwitch(target, options)` where the motion was `undefined`.
|
|
38
|
+
- In TypeScript the old form is a type error. In JavaScript it throws a `TypeError` that names the new form, and builds nothing: a `Motion` second argument, or a third argument. Without the error, the switch would read the motion as its options and show the page-wide one.
|
|
39
|
+
- Options that aren't an object throw a `TypeError` too, as a second argument that was neither options nor a `Motion` did.
|
|
40
|
+
|
|
52
41
|
## 0.13.0 (18 November 2026)
|
|
53
42
|
|
|
54
|
-
The last 0.x release: the API shaped for 1.0. Two changes can break a page or an effect, and one form is deprecated; they come first below, each with what to write instead. `expressive()`'s `geometry` takes `(datum, element, key)`: swap its first two arguments. `IconShape.linecap` and `Paint.linecap` gain `"square"`, and `IconShape.linejoin` gains `"bevel"`, a breaking change to the effect-author API for code that reads them and handles every case: add a case for each. And `motionSwitch(target, motion, options)` is deprecated: write `motionSwitch(target, { motion, ...options })`. The old form works in 0.13.0 as it did. 1.0 takes it out and changes nothing else; [what 1.0 will promise](#
|
|
43
|
+
The last 0.x release: the API shaped for 1.0. Two changes can break a page or an effect, and one form is deprecated; they come first below, each with what to write instead. `expressive()`'s `geometry` takes `(datum, element, key)`: swap its first two arguments. `IconShape.linecap` and `Paint.linecap` gain `"square"`, and `IconShape.linejoin` gains `"bevel"`, a breaking change to the effect-author API for code that reads them and handles every case: add a case for each. And `motionSwitch(target, motion, options)` is deprecated: write `motionSwitch(target, { motion, ...options })`. The old form works in 0.13.0 as it did. 1.0 takes it out and changes nothing else; [what 1.0 will promise](#the-promise) is above. The rest needs nothing written instead: two built-in effects, `outline()` and `wait()`; `labelBounds` on `expressive()` and `fromVegaView()`; a refresh that keeps a hover's effects; `iconFromSvg` keeping square caps and bevel joins; and, in Safari, a chart's text laid out with a viewer's letter and word spacing. The demo site gains a page of examples on the library's own charts: revenue against its target, a measurement against its control, and traffic by source.
|
|
55
44
|
|
|
56
45
|
### Changed
|
|
57
46
|
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Composable motion and expressive effects for web charts. Hover, update and morph
|
|
|
15
15
|
|
|
16
16
|
Each picture plays once and stops where its effect ends. **[The demo site](https://deaversbp.github.io/expressive-charts/)** has every effect to try, on the library's charts and on D3, Vega-Lite and hand-written ones, with the motion modes and reduced motion.
|
|
17
17
|
|
|
18
|
-
> **Status: 0.
|
|
18
|
+
> **Status: 1.0.0 (November 2026).** The package follows semantic versioning: [the promise](#the-promise) says what it covers. [CHANGELOG.md](https://github.com/Deaversbp/expressive-charts/blob/main/CHANGELOG.md#100-20-november-2026) lists what changed since 0.13.0.
|
|
19
19
|
|
|
20
20
|
- **Effects first.** The mark effects `travel`, `flash`, `wiggle`, `pulse`, `trace`, `drawIn`, `outline` and the data effects `threshold`, `delta` and `label`, put together with `sequence`, `parallel`, `only` and `stagger`, with `wait` to hold a part back; and the transition effect `morph`, which `chartSwitch` plays to turn each mark of one chart into its mark in the next (a transition can't go into a combinator). An effect reads only a shared description of the mark, so one effect works on every chart, and effects of your own work everywhere the built-in ones do.
|
|
21
21
|
- **Charts and adapters.** Bar, donut and line charts, a switch that morphs one into another, adapters that bring the same effects to SVG marks drawn by other code, and hover linked across them.
|
|
@@ -34,7 +34,7 @@ On a page with no bundler, the script-tag bundle defines one global, `Expressive
|
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
36
|
<div id="traffic"></div>
|
|
37
|
-
<script src="https://cdn.jsdelivr.net/npm/expressive-charts@
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/expressive-charts@1/dist/expressive-charts.global.js"></script>
|
|
38
38
|
<script>
|
|
39
39
|
const { barChart } = ExpressiveCharts;
|
|
40
40
|
barChart("#traffic", {
|
|
@@ -197,7 +197,7 @@ The package lists its CSS under `sideEffects`, so bundlers keep that import. Cha
|
|
|
197
197
|
- **Motion.** Reduced motion jumps every animation to its end state unless the viewer picks a mode on the page, with `motionSwitch()`. Nothing plays by itself, and a playback has its pause control in `playButton()` (WCAG 2.2.2).
|
|
198
198
|
- **Other people's charts.** `expressive()` adds the same keyboard focus with `keyboard: true`, and one name per mark with `markLabel`.
|
|
199
199
|
|
|
200
|
-
The demo pages with the library's charts on them have had a written WCAG 2.2 AA audit ([a11y-audit.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/a11y-audit.md)), and the test suite runs axe's WCAG rules on every demo page in Chromium, Firefox and WebKit, in light and dark, at 320 px wide and under forced colours. Screen-reader scripts for NVDA and Chrome, with their results, are in [a11y-check.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/a11y-check.md#results). The tooltip can be hovered, and dismissed with Escape. Known gap: VoiceOver hasn't been run.
|
|
200
|
+
The demo pages with the library's charts on them have had a written WCAG 2.2 AA audit ([a11y-audit.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/a11y-audit.md)), and the test suite runs axe's WCAG rules on every demo page in Chromium, Firefox and WebKit, in light and dark, at 320 px wide and under forced colours. Screen-reader scripts for NVDA and Chrome, and for VoiceOver and Safari, with their results, are in [a11y-check.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/a11y-check.md#results). The tooltip can be hovered, and dismissed with Escape. Known gap: VoiceOver has read a page of each kind, not every script, and hasn't been run on iOS.
|
|
201
201
|
|
|
202
202
|
## Limits
|
|
203
203
|
|
|
@@ -214,11 +214,9 @@ SVG charts stay smooth up to a few hundred moving marks. Measured on `demo/stres
|
|
|
214
214
|
|
|
215
215
|
The first draw of 1,000 static bars takes about 90 ms, and of 10,000 about a second. [architecture.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/architecture.md#limits) has the method and the numbers.
|
|
216
216
|
|
|
217
|
-
## The
|
|
217
|
+
## The promise
|
|
218
218
|
|
|
219
|
-
From
|
|
220
|
-
|
|
221
|
-
From 1.0 the whole package will follow semantic versioning: every name it exports, their types, what docs/api.md says each does, and the `--ec-*` custom properties. It won't promise the `ec-*` class names, the elements a chart builds, exact pixels, default durations or the words of a default announcement. [What 1.0 will promise](https://github.com/Deaversbp/expressive-charts/blob/main/CHANGELOG.md#what-10-will-promise) has the list.
|
|
219
|
+
From 1.0 the whole package follows semantic versioning: every name it exports, their types, what [docs/api.md](https://github.com/Deaversbp/expressive-charts/blob/main/docs/api.md) says each does, and the `--ec-*` custom properties. A breaking change to any of them comes only in a major release, with a migration note. It doesn't promise the `ec-*` class names, the elements a chart builds, exact pixels, default durations or the words of a default announcement. [CHANGELOG.md](https://github.com/Deaversbp/expressive-charts/blob/main/CHANGELOG.md#the-promise) has the lists.
|
|
222
220
|
|
|
223
221
|
## Links
|
|
224
222
|
|