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/dist/index.d.cts
CHANGED
|
@@ -1370,7 +1370,7 @@ export declare function registerIcons(icons: readonly Icon[]): void;
|
|
|
1370
1370
|
* has the same rules. For a CSP that allows no inline styles at all.
|
|
1371
1371
|
*/
|
|
1372
1372
|
export declare function configure(options: StyleOptions): void;
|
|
1373
|
-
export declare const VERSION = "0.
|
|
1373
|
+
export declare const VERSION = "1.0.0";
|
|
1374
1374
|
/**
|
|
1375
1375
|
* A bar chart in `target` (an element or a selector). The axis whose values aren't numbers is the
|
|
1376
1376
|
* category; `stack` stacks numeric fields; `on` attaches effects by slot.
|
|
@@ -1416,9 +1416,4 @@ export declare function fromVegaView<D = Record<string, unknown>>(view: VegaView
|
|
|
1416
1416
|
* the motion it shows and sets, default the page-wide one. `persist: "key"` saves the choice in localStorage.
|
|
1417
1417
|
*/
|
|
1418
1418
|
export declare function motionSwitch(target: string | Element, options?: MotionSwitchOptions): MotionSwitch;
|
|
1419
|
-
/**
|
|
1420
|
-
* @deprecated Since 0.13.0, and gone in 1.0. Pass the motion among the options:
|
|
1421
|
-
* `motionSwitch(target, { motion, ...options })`, or `motionSwitch(target, options)` for the page-wide one.
|
|
1422
|
-
*/
|
|
1423
|
-
export declare function motionSwitch(target: string | Element, motion: Motion | undefined, options?: MotionSwitchOptions): MotionSwitch;
|
|
1424
1419
|
export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type OutlineOptions, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, animated, createClock, createMotion, defaultClock, defaultScaling, describe, easeInOutCubic, easeOutCubic, interpolateNumber, interpolatePoint, interpolateRecord, linear, manualClock, matrix, mediaReducedMotion, motion, offset, playback, samplesAlong, scaleDuration, tween };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as scaleDuration, B as manualClock, C as ScalingRule, D as defaultScaling, E as createMotion, F as Clock, I as FrameSource, L as ManualClock, M as easeInOutCubic, N as easeOutCubic, O as mediaReducedMotion, P as linear, R as createClock, S as ScalingOverrides, T as Timing, _ as Motion, a as GeometryEffect, b as MotionView, c as TransitionContext, d as Sample, f as MotionEnv, g as tween, h as TweenResult, i as EffectContext, j as Easing, k as motion, l as TransitionEffect, m as TweenOptions, n as Combined, o as MarkEffect, p as Tween, r as DataEffect, s as TextSpace, t as AnyMarkEffect, u as MarkData, v as MotionMode, w as ScalingTable, x as ReducedMotionSource, y as MotionOptions, z as defaultClock } from "./effect-GgFkjYSV.js";
|
|
2
1
|
import { _ as Rect, a as MarkStyle, c as PathHandle, d as Icon, f as IconShape, g as Point, h as Outline, i as MarkHandle, l as TextHandle, m as MarkGeometry, n as IconHandle, o as Matrix, p as IconSource, r as Layer, s as Paint, t as Color, u as TextStyle } from "./drawing-qGmuUkoL.js";
|
|
2
|
+
import { A as scaleDuration, B as manualClock, C as ScalingRule, D as defaultScaling, E as createMotion, F as Clock, I as FrameSource, L as ManualClock, M as easeInOutCubic, N as easeOutCubic, O as mediaReducedMotion, P as linear, R as createClock, S as ScalingOverrides, T as Timing, _ as Motion, a as GeometryEffect, b as MotionView, c as TransitionContext, d as Sample, f as MotionEnv, g as tween, h as TweenResult, i as EffectContext, j as Easing, k as motion, l as TransitionEffect, m as TweenOptions, n as Combined, o as MarkEffect, p as Tween, r as DataEffect, s as TextSpace, t as AnyMarkEffect, u as MarkData, v as MotionMode, w as ScalingTable, x as ReducedMotionSource, y as MotionOptions, z as defaultClock } from "./effect-GgFkjYSV.js";
|
|
3
3
|
/** Builds a function that blends `from` into `to` as t goes from 0 to 1. */
|
|
4
4
|
type Interpolator<T> = (from: T, to: T) => (t: number) => T;
|
|
5
5
|
/** Exact at both ends, so a finished animation lands on its target. */
|
|
@@ -1650,7 +1650,7 @@ export declare function registerIcons(icons: readonly Icon[]): void;
|
|
|
1650
1650
|
* has the same rules. For a CSP that allows no inline styles at all.
|
|
1651
1651
|
*/
|
|
1652
1652
|
export declare function configure(options: StyleOptions): void;
|
|
1653
|
-
export declare const VERSION = "0.
|
|
1653
|
+
export declare const VERSION = "1.0.0";
|
|
1654
1654
|
/**
|
|
1655
1655
|
* A bar chart in `target` (an element or a selector). The axis whose values aren't numbers is the
|
|
1656
1656
|
* category; `stack` stacks numeric fields; `on` attaches effects by slot.
|
|
@@ -1696,9 +1696,4 @@ export declare function fromVegaView<D = Record<string, unknown>>(view: VegaView
|
|
|
1696
1696
|
* the motion it shows and sets, default the page-wide one. `persist: "key"` saves the choice in localStorage.
|
|
1697
1697
|
*/
|
|
1698
1698
|
export declare function motionSwitch(target: string | Element, options?: MotionSwitchOptions): MotionSwitch;
|
|
1699
|
-
/**
|
|
1700
|
-
* @deprecated Since 0.13.0, and gone in 1.0. Pass the motion among the options:
|
|
1701
|
-
* `motionSwitch(target, { motion, ...options })`, or `motionSwitch(target, options)` for the page-wide one.
|
|
1702
|
-
*/
|
|
1703
|
-
export declare function motionSwitch(target: string | Element, motion: Motion | undefined, options?: MotionSwitchOptions): MotionSwitch;
|
|
1704
1699
|
export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type OutlineOptions, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, createClock, createMotion, defaultClock, defaultScaling, easeInOutCubic, easeOutCubic, linear, manualClock, mediaReducedMotion, motion, scaleDuration, tween };
|
package/dist/index.js
CHANGED
|
@@ -13329,7 +13329,7 @@ function configure(options) {
|
|
|
13329
13329
|
}
|
|
13330
13330
|
}
|
|
13331
13331
|
// src/index.ts
|
|
13332
|
-
const VERSION = "0.
|
|
13332
|
+
const VERSION = "1.0.0";
|
|
13333
13333
|
const env = {
|
|
13334
13334
|
presets: presetRegistry,
|
|
13335
13335
|
icons: iconRegistry,
|
|
@@ -13356,13 +13356,12 @@ function expressive(target, options) {
|
|
|
13356
13356
|
function fromVegaView(view, options) {
|
|
13357
13357
|
return fromVegaView$1(view, options, env);
|
|
13358
13358
|
}
|
|
13359
|
-
function motionSwitch(target,
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
const motion$1 = old && second !== void 0 ? second : options.motion ?? motion;
|
|
13359
|
+
function motionSwitch(target, options = {}) {
|
|
13360
|
+
if (arguments[2] !== void 0 || typeof options === "object" && options !== null && "chooseMode" in options) throw new TypeError("Since 1.0 motionSwitch takes (target, options), with the motion among the options: motionSwitch(target, { motion, ...options }).");
|
|
13361
|
+
if (typeof options !== "object" || options === null) throw new TypeError(`motionSwitch: options must be an object, got ${options === null ? "null" : typeof options}.`);
|
|
13363
13362
|
return motionSwitch$1(target, {
|
|
13364
13363
|
...options,
|
|
13365
|
-
motion: motion
|
|
13364
|
+
motion: options.motion ?? motion
|
|
13366
13365
|
});
|
|
13367
13366
|
}
|
|
13368
13367
|
export { VERSION, animated, barChart, chartSwitch, colorAssignment, configure, createClock, createMotion, defaultClock, defaultScaling, defineDataEffect, defineEffect, defineIcon, delta, describe, donutChart, drawIn, easeInOutCubic, easeOutCubic, expressive, flash, fromVegaView, gaits, hostView, iconFromSvg, icons, interpolateNumber, interpolatePoint, interpolateRecord, label, lineChart, linear, link, manualClock, matrix, mediaReducedMotion, morph, motion, motionSwitch, offset, only, outline, parallel, playButton, playback, pulse, registerIcon, registerIcons, registerPreset, samplesAlong, scaleDuration, sequence, stagger, threshold, trace, travel, tween, wait, wiggle };
|