@bicharts/chart-host 0.5.114 → 0.5.116
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.
|
@@ -435,7 +435,7 @@ var require_papaparse_min = __commonJS({
|
|
|
435
435
|
});
|
|
436
436
|
|
|
437
437
|
// src/contract.ts
|
|
438
|
-
var HOST_CONTRACT_VERSION = "1.
|
|
438
|
+
var HOST_CONTRACT_VERSION = "1.10.0";
|
|
439
439
|
var GEO_POINT_PRECISIONS = ["latlon", "city", "zip3", "state", "country"];
|
|
440
440
|
var MARK_CLASS = "d3-mark";
|
|
441
441
|
var LEGEND_MARK_CLASS = "d3-legend-mark";
|
|
@@ -839,6 +839,9 @@ function resolveOptions(p2) {
|
|
|
839
839
|
allowTooltips: p2.allowTooltips,
|
|
840
840
|
noDataText: p2.noDataText,
|
|
841
841
|
onSelect: p2.onSelect,
|
|
842
|
+
// Item 639. Passed straight through like onSelect: the host owns what a gesture MEANS,
|
|
843
|
+
// and a host that supplies nothing leaves every control behaving exactly as before.
|
|
844
|
+
onControlChange: p2.onControlChange,
|
|
842
845
|
// ---- live-restyle knobs: `raw || undefined` / `.toString() || undefined` ----
|
|
843
846
|
colorScaleLow: p2.colorScaleLow || void 0,
|
|
844
847
|
colorScaleHigh: p2.colorScaleHigh || void 0,
|
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
package/dist/types/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const HOST_CONTRACT_VERSION = "1.
|
|
1
|
+
export declare const HOST_CONTRACT_VERSION = "1.10.0";
|
|
2
2
|
export type GeoPointPrecision = "latlon" | "city" | "zip3" | "state" | "country";
|
|
3
3
|
/** Every valid tier, ordered most precise → coarsest. Runtime form of GeoPointPrecision. */
|
|
4
4
|
export declare const GEO_POINT_PRECISIONS: readonly GeoPointPrecision[];
|
|
@@ -141,4 +141,33 @@ export interface RenderOptions {
|
|
|
141
141
|
flipMode?: FlipMode;
|
|
142
142
|
cardBackgroundColor?: string;
|
|
143
143
|
onSelect?: (rowIdxs: number[]) => void;
|
|
144
|
+
/**
|
|
145
|
+
* A reader WORKED one of the chart's own controls — the segmented row today, the slider and
|
|
146
|
+
* the scrubber when they follow. ADVISORY TELEMETRY: the host logs it, and nothing about the
|
|
147
|
+
* chart depends on a host supplying it.
|
|
148
|
+
*
|
|
149
|
+
* Until now no host could tell a control that fired from a control that does nothing. One
|
|
150
|
+
* host left an INDIRECT trace, because working a control persists view-state and that write
|
|
151
|
+
* is logged there; another host's write was silent, so a reader reporting "the buttons do
|
|
152
|
+
* nothing" left no record anywhere. Establishing that a control had in fact fired meant
|
|
153
|
+
* pulling the generated source out of storage and reading it by hand.
|
|
154
|
+
*
|
|
155
|
+
* CLICKS ONLY, and there is deliberately no `phase`. A control also settles on a value at
|
|
156
|
+
* first paint, on every resize and on every re-render; reporting those would bury the
|
|
157
|
+
* gestures under repaints, and the restored value is already in the persisted view-state, so
|
|
158
|
+
* nothing is lost by leaving it out. This field reports what a PERSON did.
|
|
159
|
+
*
|
|
160
|
+
* NEVER FATAL. It is called from inside a click handler, so a host that throws here must not
|
|
161
|
+
* take the reader's gesture with it: the helper swallows anything this raises.
|
|
162
|
+
*/
|
|
163
|
+
onControlChange?: (e: ChartControlChange) => void;
|
|
164
|
+
}
|
|
165
|
+
/** One reader gesture on a chart's own control. */
|
|
166
|
+
export interface ChartControlChange {
|
|
167
|
+
/** The helper family that owns the control — "segmented" today. */
|
|
168
|
+
control: string;
|
|
169
|
+
/** The control's name inside the chart: "sort", "form", "measure". */
|
|
170
|
+
key: string;
|
|
171
|
+
/** The value the reader chose. */
|
|
172
|
+
value: string;
|
|
144
173
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, } from "./contract";
|
|
1
|
+
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, } from "./contract";
|
|
2
2
|
export { resolveOptions, type ResolveOptionsInput } from "./defaults";
|
|
3
3
|
export { loadGeo, geoFromCache, registerGeo, registerGeoAsset, geoAssetFor, clearGeoCache, type GeoAssetName, } from "./geoLazy";
|
|
4
4
|
/** REPLACE the bundled city gazetteer with another packed table. Rarely needed — see the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.116",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|