@d3plus/core 4.6.0 → 4.7.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/README.md +728 -1454
- package/es/index.js.map +1 -1
- package/es/internal.js +5 -0
- package/es/internal.js.map +1 -1
- package/es/src/charts/Chord/index.js +2 -0
- package/es/src/charts/Chord/index.js.map +1 -1
- package/es/src/charts/Geomap/applyLayout.js +3 -1
- package/es/src/charts/Geomap/applyLayout.js.map +1 -1
- package/es/src/charts/Geomap/index.js +3 -1
- package/es/src/charts/Geomap/index.js.map +1 -1
- package/es/src/charts/Matrix/emit.js +5 -4
- package/es/src/charts/Matrix/emit.js.map +1 -1
- package/es/src/charts/Network/index.js +4 -0
- package/es/src/charts/Network/index.js.map +1 -1
- package/es/src/charts/Pack/emit.js +6 -6
- package/es/src/charts/Pack/emit.js.map +1 -1
- package/es/src/charts/Pack/index.js +2 -0
- package/es/src/charts/Pack/index.js.map +1 -1
- package/es/src/charts/Pie/emit.js +5 -6
- package/es/src/charts/Pie/emit.js.map +1 -1
- package/es/src/charts/Pie/index.js +2 -0
- package/es/src/charts/Pie/index.js.map +1 -1
- package/es/src/charts/Plot/index.js +15 -1
- package/es/src/charts/Plot/index.js.map +1 -1
- package/es/src/charts/Plot/insetRegion.js +21 -0
- package/es/src/charts/Plot/insetRegion.js.map +1 -0
- package/es/src/charts/Plot/sharedHover.js +117 -16
- package/es/src/charts/Plot/sharedHover.js.map +1 -1
- package/es/src/charts/Plot/sharedTooltip.js +35 -15
- package/es/src/charts/Plot/sharedTooltip.js.map +1 -1
- package/es/src/charts/Plot/trendLines.js +140 -38
- package/es/src/charts/Plot/trendLines.js.map +1 -1
- package/es/src/charts/Plot/trendProjection.js +120 -0
- package/es/src/charts/Plot/trendProjection.js.map +1 -0
- package/es/src/charts/Plot/trendScene.js +33 -19
- package/es/src/charts/Plot/trendScene.js.map +1 -1
- package/es/src/charts/Plot/trendTooltip.js +79 -17
- package/es/src/charts/Plot/trendTooltip.js.map +1 -1
- package/es/src/charts/Priestley/emit.js +3 -4
- package/es/src/charts/Priestley/emit.js.map +1 -1
- package/es/src/charts/RadialMatrix/emit.js +4 -4
- package/es/src/charts/RadialMatrix/emit.js.map +1 -1
- package/es/src/charts/Rings/index.js +5 -1
- package/es/src/charts/Rings/index.js.map +1 -1
- package/es/src/charts/Sankey/index.js +2 -0
- package/es/src/charts/Sankey/index.js.map +1 -1
- package/es/src/charts/Tree/index.js +2 -0
- package/es/src/charts/Tree/index.js.map +1 -1
- package/es/src/charts/Treemap/emit.js +3 -4
- package/es/src/charts/Treemap/emit.js.map +1 -1
- package/es/src/charts/definition/ChartDefinition.js.map +1 -1
- package/es/src/charts/definition/makeChart.js +8 -2
- package/es/src/charts/definition/makeChart.js.map +1 -1
- package/es/src/charts/drawSteps/bottomRightControls.js +3 -0
- package/es/src/charts/drawSteps/bottomRightControls.js.map +1 -1
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +135 -4
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js.map +1 -1
- package/es/src/charts/drawSteps/searchControlsMarkup.js +15 -38
- package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -1
- package/es/src/charts/events/click.legend.js +10 -5
- package/es/src/charts/events/click.legend.js.map +1 -1
- package/es/src/charts/events/mousemove.shape.js +8 -1
- package/es/src/charts/events/mousemove.shape.js.map +1 -1
- package/es/src/charts/features/emitHelpers.js +19 -5
- package/es/src/charts/features/emitHelpers.js.map +1 -1
- package/es/src/charts/features/features.js +3 -108
- package/es/src/charts/features/features.js.map +1 -1
- package/es/src/charts/features/featuresColorScale.js +161 -0
- package/es/src/charts/features/featuresColorScale.js.map +1 -0
- package/es/src/charts/features/featuresLegend.js +145 -32
- package/es/src/charts/features/featuresLegend.js.map +1 -1
- package/es/src/charts/features/insetState.js +174 -0
- package/es/src/charts/features/insetState.js.map +1 -0
- package/es/src/charts/features/sceneBounds.js +271 -0
- package/es/src/charts/features/sceneBounds.js.map +1 -0
- package/es/src/charts/features/tooltipSwatch.js +73 -0
- package/es/src/charts/features/tooltipSwatch.js.map +1 -0
- package/es/src/charts/pipeline/insetPlacement.js +406 -0
- package/es/src/charts/pipeline/insetPlacement.js.map +1 -0
- package/es/src/charts/pipeline/runVizPipeline.js +6 -2
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
- package/es/src/charts/viz/Viz.js +18 -3
- package/es/src/charts/viz/Viz.js.map +1 -1
- package/es/src/charts/viz/VizBaseConfig.js +20 -24
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
- package/es/src/charts/viz/interactionOpacity.js +21 -13
- package/es/src/charts/viz/interactionOpacity.js.map +1 -1
- package/es/src/charts/viz/linkGroup.js +386 -0
- package/es/src/charts/viz/linkGroup.js.map +1 -0
- package/es/src/charts/viz/sceneRows.js +33 -0
- package/es/src/charts/viz/sceneRows.js.map +1 -0
- package/es/src/charts/viz/vizDefaults.js +13 -8
- package/es/src/charts/viz/vizDefaults.js.map +1 -1
- package/es/src/charts/viz/vizTypes.js.map +1 -1
- package/es/src/components/Axis/AxisBottom.js +1 -1
- package/es/src/components/Axis/AxisBottom.js.map +1 -1
- package/es/src/components/Axis/AxisLeft.js +1 -1
- package/es/src/components/Axis/AxisLeft.js.map +1 -1
- package/es/src/components/Axis/AxisRight.js +1 -1
- package/es/src/components/Axis/AxisRight.js.map +1 -1
- package/es/src/components/Axis/AxisTop.js +1 -1
- package/es/src/components/Axis/AxisTop.js.map +1 -1
- package/es/src/components/Axis/axisLayoutLabels.js +13 -1
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
- package/es/src/components/ColorScale/ColorScale.js.map +1 -1
- package/es/src/components/Legend/legendConfig.js +2 -1
- package/es/src/components/Legend/legendConfig.js.map +1 -1
- package/es/src/components/Legend/legendRender.js +42 -5
- package/es/src/components/Legend/legendRender.js.map +1 -1
- package/es/src/components/TextBox.js +1 -1
- package/es/src/components/TextBox.js.map +1 -1
- package/es/src/shapes/Bar.js +1 -1
- package/es/src/shapes/Bar.js.map +1 -1
- package/es/src/shapes/Box.js +1 -1
- package/es/src/shapes/Box.js.map +1 -1
- package/es/src/shapes/Rect.js +1 -1
- package/es/src/shapes/Rect.js.map +1 -1
- package/es/src/shapes/Shape.js +9 -36
- package/es/src/shapes/Shape.js.map +1 -1
- package/es/src/shapes/Whisker.js +1 -1
- package/es/src/shapes/Whisker.js.map +1 -1
- package/es/src/shapes/textureKey.js +104 -0
- package/es/src/shapes/textureKey.js.map +1 -0
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/package.json +10 -9
- package/types/index.d.ts +1 -0
- package/types/internal.d.ts +7 -0
- package/types/src/charts/Plot/index.d.ts +8 -0
- package/types/src/charts/Plot/insetRegion.d.ts +4 -0
- package/types/src/charts/Plot/sharedHover.d.ts +5 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +10 -0
- package/types/src/charts/Plot/trendLines.d.ts +23 -3
- package/types/src/charts/Plot/trendProjection.d.ts +28 -0
- package/types/src/charts/Plot/trendScene.d.ts +2 -1
- package/types/src/charts/Plot/trendTooltip.d.ts +16 -5
- package/types/src/charts/definition/ChartDefinition.d.ts +9 -0
- package/types/src/charts/definition/makeChart.d.ts +2 -2
- package/types/src/charts/drawSteps/bottomRightControlsMarkup.d.ts +2 -0
- package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +7 -5
- package/types/src/charts/features/emitHelpers.d.ts +10 -4
- package/types/src/charts/features/features.d.ts +1 -8
- package/types/src/charts/features/featuresColorScale.d.ts +24 -0
- package/types/src/charts/features/featuresLegend.d.ts +15 -0
- package/types/src/charts/features/insetState.d.ts +95 -0
- package/types/src/charts/features/sceneBounds.d.ts +18 -0
- package/types/src/charts/features/tooltipSwatch.d.ts +31 -0
- package/types/src/charts/pipeline/insetPlacement.d.ts +45 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +2 -1
- package/types/src/charts/viz/Viz.d.ts +9 -1
- package/types/src/charts/viz/VizBaseConfig.d.ts +8 -12
- package/types/src/charts/viz/linkGroup.d.ts +96 -0
- package/types/src/charts/viz/sceneRows.d.ts +13 -0
- package/types/src/charts/viz/vizTypes.d.ts +17 -0
- package/types/src/components/Axis/AxisBottom.d.ts +1 -1
- package/types/src/components/Axis/AxisLeft.d.ts +1 -1
- package/types/src/components/Axis/AxisRight.d.ts +1 -1
- package/types/src/components/Axis/AxisTop.d.ts +1 -1
- package/types/src/components/ColorScale/ColorScale.d.ts +4 -4
- package/types/src/components/Legend/legendRender.d.ts +1 -1
- package/types/src/components/TextBox.d.ts +1 -1
- package/types/src/shapes/Bar.d.ts +1 -1
- package/types/src/shapes/Box.d.ts +1 -1
- package/types/src/shapes/Rect.d.ts +1 -1
- package/types/src/shapes/Whisker.d.ts +1 -1
- package/types/src/shapes/textureKey.d.ts +9 -0
- package/types/src/utils/D3plusConfig.d.ts +42 -1
- package/umd/d3plus-core.full.js +2393 -594
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +1945 -1601
- package/umd/d3plus-core.js +1744 -404
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +1401 -1087
|
@@ -99,6 +99,7 @@ import mouseenter from "../events/mouseenter.js";
|
|
|
99
99
|
import mouseleave from "../events/mouseleave.js";
|
|
100
100
|
import mousemoveLegend from "../events/mousemove.legend.js";
|
|
101
101
|
import mousemoveShape from "../events/mousemove.shape.js";
|
|
102
|
+
import { linkedColorDefaults, registerLink } from "./linkGroup.js";
|
|
102
103
|
function debounce(func, delay) {
|
|
103
104
|
var timeout;
|
|
104
105
|
return function() {
|
|
@@ -199,6 +200,13 @@ var vizSchema = [
|
|
|
199
200
|
key: "legendSort",
|
|
200
201
|
coerce: "identity"
|
|
201
202
|
},
|
|
203
|
+
{
|
|
204
|
+
key: "link",
|
|
205
|
+
coerce: "identity",
|
|
206
|
+
onSet: function onSet(viz) {
|
|
207
|
+
return registerLink(viz);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
202
210
|
{
|
|
203
211
|
key: "minimap",
|
|
204
212
|
coerce: "identity"
|
|
@@ -319,9 +327,11 @@ var vizSchema = [
|
|
|
319
327
|
};
|
|
320
328
|
// Each viz gets its own categorical scale so assignments don't leak
|
|
321
329
|
// across charts on the same page.
|
|
330
|
+
var scale = scaleOrdinal().range(colorDefaults.scale.range());
|
|
322
331
|
viz.schema.colorDefaults = _object_spread_props(_object_spread({}, colorDefaults), {
|
|
323
|
-
scale:
|
|
332
|
+
scale: scale
|
|
324
333
|
});
|
|
334
|
+
viz._autoColorScale = scale;
|
|
325
335
|
viz._colorScaleClass = new ColorScale();
|
|
326
336
|
viz.schema.colorScaleConfig = {
|
|
327
337
|
axisConfig: {
|
|
@@ -346,11 +356,6 @@ var vizSchema = [
|
|
|
346
356
|
viz.schema.detectVisible = true;
|
|
347
357
|
viz.schema.detectVisibleInterval = 1000;
|
|
348
358
|
viz.schema.detectVisibleUnload = true;
|
|
349
|
-
viz.schema.downloadButton = false;
|
|
350
|
-
viz.schema.downloadConfig = {
|
|
351
|
-
type: "png"
|
|
352
|
-
};
|
|
353
|
-
viz.schema.downloadPosition = "top";
|
|
354
359
|
viz.schema.duration = 600;
|
|
355
360
|
viz.schema.fontFamily = fontFamily;
|
|
356
361
|
viz._hidden = [];
|
|
@@ -510,7 +515,7 @@ var vizSchema = [
|
|
|
510
515
|
// light→dark ramp (built in vizPreDraw) instead of nominal categorical
|
|
511
516
|
// hues, so the color itself carries the ordering.
|
|
512
517
|
if (viz.schema.colorOrdinal && viz._ordinalColorScale) return viz._ordinalColorScale(key);
|
|
513
|
-
return colorAssign(key, viz
|
|
518
|
+
return colorAssign(key, linkedColorDefaults(viz));
|
|
514
519
|
},
|
|
515
520
|
labelConfig: {
|
|
516
521
|
// Marked so chart emitters layering user label config keep their own
|
|
@@ -526,7 +531,7 @@ var vizSchema = [
|
|
|
526
531
|
// A fill that doesn't parse as a color (e.g. "none"/"transparent" on a
|
|
527
532
|
// confidence band) has no darker shade — fall back to the fill itself.
|
|
528
533
|
var col = color(c);
|
|
529
|
-
return col ? col.darker(0.25) : c;
|
|
534
|
+
return col ? col.darker(0.25).toString() : c;
|
|
530
535
|
},
|
|
531
536
|
role: "presentation",
|
|
532
537
|
strokeWidth: constant(0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/charts/viz/vizDefaults.ts"],"sourcesContent":["import {max} from \"d3-array\";\nimport {brush} from \"d3-brush\";\nimport {color} from \"d3-color\";\nimport {scaleOrdinal} from \"d3-scale\";\nimport {zoom} from \"d3-zoom\";\n\nimport {colorAssign, colorContrast, colorDefaults} from \"@d3plus/color\";\nimport {backgroundColor} from \"@d3plus/dom\";\nimport {formatAbbreviate} from \"@d3plus/format\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {fontFamily, fontFamilyStringify} from \"@d3plus/text\";\n\nimport {ColorScale, Legend, SizeLegend, TextBox, Timeline, Tooltip} from \"../../components/index.js\";\nimport {sizeLegendFits} from \"../../components/SizeLegend/sizeLegendLayout.js\";\nimport Message from \"../../components/Message.js\";\nimport {accessor, constant} from \"../../utils/index.js\";\nimport {markDefault} from \"../../utils/configDefault.js\";\nimport {installFluent} from \"../../fluent.js\";\n\nimport {legendLabel} from \"../features/legendLabel.js\";\nimport clickShape from \"../events/click.shape.js\";\nimport clickLegend from \"../events/click.legend.js\";\nimport mouseenter from \"../events/mouseenter.js\";\nimport mouseleave from \"../events/mouseleave.js\";\nimport mousemoveLegend from \"../events/mousemove.legend.js\";\nimport mousemoveShape from \"../events/mousemove.shape.js\";\n\nimport type Viz from \"./Viz.js\";\n\nfunction debounce<A extends unknown[]>(\n func: (...args: A) => void,\n delay: number,\n): (...args: A) => void {\n let timeout: ReturnType<typeof setTimeout>;\n return function (this: unknown, ...args: A) {\n const context = this;\n clearTimeout(timeout);\n timeout = setTimeout(() => func.apply(context, args), delay);\n };\n}\n\n/**\n * Default padding logic that will return false if the screen is less than 600 pixels wide.\n * @private\n */\nfunction defaultPadding(): boolean {\n return typeof window !== \"undefined\" ? window.innerWidth > 600 : true;\n}\n\n/**\n Minimal LRU cache backed by a Map (insertion-order iteration enables O(1) eviction).\n Only .get() and .set() are used by Viz.\n @private\n*/\nclass LRU {\n private _cap: number;\n private _map: Map<string, unknown>;\n\n constructor(capacity: number) {\n this._cap = capacity;\n this._map = new Map();\n }\n get(key: string): unknown {\n if (!this._map.has(key)) return undefined;\n const val = this._map.get(key);\n this._map.delete(key);\n this._map.set(key, val);\n return val;\n }\n set(key: string, val: unknown): void {\n this._map.delete(key);\n if (this._map.size >= this._cap)\n this._map.delete(this._map.keys().next().value!);\n this._map.set(key, val);\n }\n}\n\n// E4: Viz's identity-coerce accessor schema. installFluent installs methods on\n// Viz.prototype (once via WeakSet) so BaseClass.config() reflection picks them\n// up. Constructor assignments below seed defaults (e.g. `this.schema.duration = 600`);\n// installFluent skips slots already set, so constructor values win.\nconst vizSchema = [\n {key: \"ariaHidden\", coerce: \"identity\" as const},\n {key: \"cache\", coerce: \"identity\" as const},\n {key: \"colorOrdinal\", coerce: \"identity\" as const, default: false},\n {key: \"dataCutoff\", coerce: \"identity\" as const},\n {key: \"depth\", coerce: \"identity\" as const},\n {key: \"discrete\", coerce: \"identity\" as const},\n {key: \"duration\", coerce: \"identity\" as const},\n {key: \"filter\", coerce: \"identity\" as const},\n {key: \"height\", coerce: \"identity\" as const},\n {key: \"legendSort\", coerce: \"identity\" as const},\n {key: \"minimap\", coerce: \"identity\" as const},\n {key: \"search\", coerce: \"identity\" as const},\n {key: \"svgDesc\", coerce: \"identity\" as const},\n {key: \"svgTitle\", coerce: \"identity\" as const},\n {key: \"tableView\", coerce: \"identity\" as const},\n {key: \"tableViewDownload\", coerce: \"identity\" as const},\n {key: \"tableViewSort\", coerce: \"identity\" as const},\n {key: \"timeFilter\", coerce: \"identity\" as const},\n {key: \"timeline\", coerce: \"identity\" as const},\n {key: \"width\", coerce: \"identity\" as const},\n {key: \"zoom\", coerce: \"identity\" as const},\n {key: \"zoomFactor\", coerce: \"identity\" as const},\n {key: \"zoomMax\", coerce: \"identity\" as const},\n {key: \"zoomPan\", coerce: \"identity\" as const},\n {key: \"zoomScroll\", coerce: \"identity\" as const},\n];\n\n/**\n Renderer backend, accessibility, attribution, and back-button defaults.\n @private\n*/\nfunction initBaseDefaults(viz: Viz): void {\n // `renderer()` selects the @d3plus/render backend. Default\n // `\"svg\"` (SvgRenderer); `\"canvas\"` for large N via CanvasRenderer.\n viz._renderer = \"svg\";\n viz._renderMode = \"full\";\n viz.schema.ariaHidden = true;\n viz.schema.attribution = false;\n viz.schema.attributionIcon = undefined;\n viz.schema.attributionStyle = attributionStyleDefault;\n viz.schema.cache = true;\n}\n\n/**\n Default inline style for the \"← Back\" button — structural-only, the\n same properties `zoomControlStyleDefault`/`searchControlStyleDefault`\n use, except `width: \"auto\"` (it shows an icon + the word \"Back\", not a\n single centered glyph) with a small `gap` between them and horizontal\n padding for breathing room. Also lighter/smaller than the other two's\n `font` (900 15px): that value is a holdover from when their icons were\n bold Unicode glyphs sized to read clearly (the icons are SVG now, so it\n no longer affects THEM at all) — but back is the one place that font\n actually renders visible text, where 900 15px reads oversized/heavy.\n No background/border/color, same as the other two: a plain\n browser-appearance button, letting native/host-page button chrome show\n through by default.\n @private\n*/\nexport const backControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `400 12px/1 ${fontFamilyStringify(fontFamily)}`,\n gap: \"4px\",\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: \"0 6px\",\n width: \"auto\",\n};\n\n/**\n Back-button control styling defaults.\n @private\n*/\nfunction initBackDefaults(viz: Viz): void {\n // No longer drives the button's appearance (see `.backConfig()`'s own\n // doc comment), but `.backConfig({...})` merges into this via\n // `assign(this.schema.backConfig, _)` — leaving it undefined makes that\n // throw on the very first call, on every chart.\n viz.schema.backConfig = {};\n viz.schema.backControlClassName = undefined;\n viz.schema.backControlStyle = backControlStyleDefault;\n}\n\n/**\n Color accessor and color-scale defaults.\n @private\n*/\nfunction initColorDefaults(viz: Viz): void {\n viz.schema.color = (d: DataPoint, i: number) => viz.schema.groupBy[0](d, i);\n // Each viz gets its own categorical scale so assignments don't leak\n // across charts on the same page.\n viz.schema.colorDefaults = {\n ...colorDefaults,\n scale: scaleOrdinal<string>().range(colorDefaults.scale.range()),\n };\n viz._colorScaleClass = new ColorScale();\n viz.schema.colorScaleConfig = {\n axisConfig: {\n rounding: \"inside\",\n },\n scale: \"jenks\",\n };\n viz.schema.colorScalePadding = defaultPadding;\n viz.schema.colorScalePosition = () =>\n viz.schema.width > viz.schema.height * 1.5 ? \"right\" : \"bottom\";\n viz.schema.colorScaleMaxSize = 600;\n}\n\n/**\n Data, resize/visibility detection, download, and grouping defaults.\n @private\n*/\nfunction initDataDefaults(viz: Viz): void {\n viz._data = [];\n viz.schema.dataCutoff = 100;\n viz.schema.detectResize = true;\n viz.schema.detectResizeDelay = 400;\n viz.schema.detectVisible = true;\n viz.schema.detectVisibleInterval = 1000;\n viz.schema.detectVisibleUnload = true;\n viz.schema.downloadButton = false;\n viz.schema.downloadConfig = {type: \"png\"};\n viz.schema.downloadPosition = \"top\";\n viz.schema.duration = 600;\n viz.schema.fontFamily = fontFamily;\n viz._hidden = [];\n viz.schema.hiddenColor = constant(\"#aaa\");\n viz.schema.hiddenOpacity = constant(0.5);\n viz._history = [];\n viz.schema.groupBy = [accessor(\"id\")];\n}\n\n/**\n Legend and size legend visibility, class instances, and config defaults.\n @private\n*/\nfunction initLegendDefaults(viz: Viz): void {\n viz.schema.legend = (config: Record<string, unknown>, arr: DataPoint[]) => {\n const maxGrouped = max(arr, (d: DataPoint, i: number) => {\n const id = viz.schema.groupBy[viz._legendDepth].bind(viz)(d, i);\n return id instanceof Array ? id.length : 1;\n });\n return arr.length > 1 && (maxGrouped ?? 0) <= 2;\n };\n viz._legendClass = new Legend();\n viz.schema.legendConfig = {\n label: legendLabel.bind(viz),\n shapeConfig: {\n ariaLabel: legendLabel.bind(viz),\n labelConfig: {\n // Labels read against the chart's own background (dark text on a light\n // page, light text on a dark one), not the swatch fill the chart's\n // shape labels contrast with.\n fontColor: () => colorContrast(viz._select ? backgroundColor(viz._select.node()) : \"rgb(255, 255, 255)\", viz.schema.colorDefaults),\n fontResize: false,\n padding: 0,\n },\n },\n };\n viz.schema.legendFilterInvert = constant(false);\n viz.schema.legendPadding = defaultPadding;\n viz.schema.legendPosition = () =>\n viz.schema.width > viz.schema.height * 1.5 ? \"right\" : \"bottom\";\n viz.schema.legendSort = (a: DataPoint, b: DataPoint) =>\n viz._drawLabel(a).localeCompare(viz._drawLabel(b));\n viz.schema.legendTooltip = {};\n viz._sizeLegendClass = new SizeLegend();\n Object.assign(viz.schema, {sizeLegend: sizeLegendFits, sizeLegendConfig: {}, sizeLegendPosition: \"right\"});\n}\n\n/**\n Loading/no-data message HTML, class instances, and mask/style defaults.\n @private\n*/\nfunction initMessageDefaults(viz: Viz): void {\n viz.schema.loadingHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${viz.schema.translate(\"Loading Visualization\")}</strong>\n <sub style=\"bottom: 0; display: block; line-height: 1; margin-top: 5px;\"><a href=\"https://d3plus.org\" target=\"_blank\">${viz.schema.translate(\n \"Powered by D3plus\",\n )}</a></sub>\n </div>`;\n\n viz.schema.loadingMessage = true;\n viz._lrucache = new LRU(10);\n viz._messageClass = new Message();\n viz.schema.messageMask = \"rgba(0, 0, 0, 0.05)\";\n viz.schema.messageStyle = {\n bottom: \"0\",\n left: \"0\",\n position: \"absolute\",\n right: \"0\",\n \"text-align\": \"center\",\n top: \"0\",\n };\n\n viz.schema.noDataHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${viz.schema.translate(\"No Data Available\")}</strong>\n </div>`;\n\n viz.schema.noDataMessage = true;\n}\n\n/**\n Event handler bindings, render queue, resize observer, and scroll container.\n @private\n*/\nfunction initEventDefaults(viz: Viz): void {\n viz.schema.on = {\n \"click.shape\": clickShape.bind(viz),\n \"click.legend\": clickLegend.bind(viz),\n mouseenter: mouseenter.bind(viz),\n mouseleave: mouseleave.bind(viz),\n \"mousemove.shape\": mousemoveShape.bind(viz),\n \"mousemove.legend\": mousemoveLegend.bind(viz),\n };\n viz._queue = [];\n // Applies a detected container resize: re-sizes the SVG and re-renders when\n // the observed size actually differs from what the chart last drew at.\n const applyResize = (entries: ResizeObserverEntry[]): void => {\n const {width, height} = entries[0]!.contentRect;\n if (\n ((width !== viz.schema.width && viz._autoWidth) ||\n (height !== viz.schema.height && viz._autoHeight)) &&\n width &&\n height\n ) {\n viz._setSVGSize(width, height);\n if (!viz._callback) viz.render();\n }\n };\n const debouncedResize = debounce(applyResize, viz.schema.detectResizeDelay);\n // Guarded so a chart can be constructed in an environment without a DOM (e.g.\n // before `@d3plus/ssr` installs one). Auto-resize is a browser-only feature;\n // when absent, `_resizeObserver` stays undefined and its call sites skip it.\n viz._resizeObserver =\n typeof ResizeObserver === \"undefined\"\n ? undefined\n : new ResizeObserver(\n (entries: ResizeObserverEntry[]) => {\n // The first real-size notification after `observe()` reports the\n // container's settled layout size, which on an auto-sized chart often\n // differs from the size the chart just measured pre-layout (the\n // height:100% chain resolves after the synchronous render). Apply that\n // correction SYNCHRONOUSLY rather than through the debounce: debounced,\n // it lands ~detectResizeDelay (400ms) into the 600ms entrance transition\n // and restarts it with ease-in — the visible \"pause ~75% through then\n // continue\". Applied immediately it lands before the transition is\n // visible, so the entrance plays once at the correct size. Genuine later\n // resizes (window drags) still debounce. A collapsed (0-size) first\n // notification is ignored so it doesn't waste the immediate slot.\n const {width, height} = entries[0]!.contentRect;\n if (!viz._resizeSettled) {\n if (!width || !height) return;\n viz._resizeSettled = true;\n applyResize(entries);\n } else {\n debouncedResize(entries);\n }\n },\n );\n viz.schema.scrollContainer = typeof window === \"undefined\" ? \"\" : window;\n}\n\n/**\n Shape accessor and the fill/stroke/label shapeConfig defaults.\n @private\n*/\nfunction initShapeDefaults(viz: Viz): void {\n viz.schema.shape = constant(\"Rect\");\n viz._shapes = [];\n viz.schema.shapeConfig = {\n ariaLabel: (d: DataPoint, i: number) => viz._drawLabel(d, i),\n fill: (d: DataPoint, i: number) => {\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint;\n i = d.i as number;\n }\n if (viz.schema.colorScale) {\n const c = viz.schema.colorScale(d, i);\n if (c !== undefined && c !== null) {\n const scale = viz._colorScaleClass._colorScale;\n const colors = viz._colorScaleClass.color();\n if (!scale)\n return colors instanceof Array\n ? colors[colors.length - 1]\n : colors;\n else if (!scale.domain().length)\n return scale.range()[scale.range().length - 1];\n return scale(c);\n }\n }\n const c = viz.schema.color(d, i);\n if (color(c)) return c;\n const key = typeof c === \"string\" ? c : JSON.stringify(c);\n // Ordinal color mode: an ordered discrete field takes a single-hue\n // light→dark ramp (built in vizPreDraw) instead of nominal categorical\n // hues, so the color itself carries the ordering.\n if (viz.schema.colorOrdinal && viz._ordinalColorScale)\n return viz._ordinalColorScale(key);\n return colorAssign(key, viz.schema.colorDefaults);\n },\n labelConfig: {\n // Marked so chart emitters layering user label config keep their own\n // label colors over this generic one.\n fontColor: markDefault((d: DataPoint, i: number) => {\n const c =\n typeof viz.schema.shapeConfig.fill === \"function\"\n ? viz.schema.shapeConfig.fill(d, i)\n : viz.schema.shapeConfig.fill;\n return colorContrast(c, viz.schema.colorDefaults);\n }),\n },\n opacity: constant(1),\n stroke: (d: DataPoint, i: number) => {\n const c =\n typeof viz.schema.shapeConfig.fill === \"function\"\n ? viz.schema.shapeConfig.fill(d, i)\n : viz.schema.shapeConfig.fill;\n // A fill that doesn't parse as a color (e.g. \"none\"/\"transparent\" on a\n // confidence band) has no darker shade — fall back to the fill itself.\n const col = color(c as string);\n return col ? col.darker(0.25) : c;\n },\n role: \"presentation\",\n strokeWidth: constant(0),\n };\n viz._solo = [];\n}\n\n/**\n Subtitle, title, timeline, threshold, tooltip, and total label defaults.\n @private\n*/\nfunction initLabelDefaults(viz: Viz): void {\n viz._subtitleClass = new TextBox();\n viz.schema.subtitleConfig = {\n ariaHidden: true,\n fontSize: 12,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.subtitlePadding = defaultPadding;\n\n viz.schema.svgDesc = \"\";\n viz.schema.svgTitle = \"\";\n\n viz.schema.timeline = true;\n viz._timelineClass = new Timeline().align(\"end\");\n viz.schema.timelineConfig = {\n padding: 5,\n };\n viz.schema.timelinePadding = defaultPadding;\n\n viz.schema.threshold = constant(0.0001);\n viz.schema.thresholdKey = undefined;\n viz.schema.thresholdName = () => viz.schema.translate(\"Values\");\n\n viz._titleClass = new TextBox();\n viz.schema.titleConfig = {\n ariaHidden: true,\n fontSize: 16,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.titlePadding = defaultPadding;\n\n viz.schema.tooltip = constant(true);\n viz._tooltipClass = new Tooltip();\n viz.schema.tooltipConfig = {\n pointerEvents: \"none\",\n titleStyle: {\n \"max-width\": \"200px\",\n },\n };\n\n viz._totalClass = new TextBox();\n viz.schema.totalConfig = {\n fontSize: 10,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.totalFormat = (d: number) =>\n `${viz.schema.translate(\"Total\")}: ${formatAbbreviate(d, viz.schema.locale)}`;\n viz.schema.totalPadding = defaultPadding;\n}\n\n/**\n Default attribution styles: flush to the chart area's bottom-right corner\n like the credit on a slippy map, in small type on a translucent backing\n that keeps it legible over busy tiles without boxing it in. The dark\n variant applies over a dark basemap while the style is still this\n untouched default (compared by reference, like the zoom-control styles).\n @private\n*/\nconst attributionLightBg = \"rgba(255, 255, 255, 0.7)\";\nconst attributionDarkBg = \"rgba(24, 25, 28, 0.7)\";\nconst attributionBase = {\n \"border-radius\": \"3px 0 0 0\",\n display: \"flex\",\n \"align-items\": \"center\",\n gap: \"4px\",\n font: `400 10px/1.4 ${fontFamilyStringify(fontFamily)}`,\n};\nexport const attributionStyleDefault = {\n ...attributionBase,\n background: attributionLightBg,\n color: colorContrast(attributionLightBg),\n};\nexport const attributionStyleDarkDefault = {\n ...attributionBase,\n background: attributionDarkBg,\n color: colorContrast(attributionDarkBg),\n};\n\n/**\n Default inline styles for the zoom-control buttons — structural only\n (sizing/spacing/typography); no color, background, border, or opacity.\n Letting native/host-page button chrome show through by default means a\n page styling its own buttons (Tailwind, Bootstrap, a design system) via\n `zoomControlClassName` composes cleanly instead of fighting inline color\n overrides. The active state (brush mode on) paints the OS accent color\n through CSS system colors (`AccentColor`/`AccentColorText`, falling back\n to the selection `Highlight` where unsupported), so it reads as pressed\n in the browser's own idiom; hover gets no default styling (`false`). The\n `.active` class, `aria-pressed`, and `:hover`/`:active` pseudo-classes\n stay available for a host page's own CSS to hook into. Consumers who want d3plus's old\n opinionated look can restore it via `.zoomControlStyle({...})`.\n\n Exported as stable object references (not inlined per-instance) so\n `zoomControls.ts` can tell, via `===`, whether a given viz's\n `zoomControlStyle*` is still the untouched default — that's what lets\n setting `zoomControlClassName` auto-disable the defaults without also\n clobbering a style the caller explicitly customized themselves.\n @private\n*/\nexport const zoomControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const zoomControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const zoomControlStyleHoverDefault = false as const;\n\n/**\n Default inline styles for the table-view toggle button — structural only,\n mirroring `zoomControlStyleDefault` et al. so the two chrome features look\n and behave consistently. Kept as separate object references (not shared\n with zoom's) so `tableViewControl.ts` can independently detect, via `===`,\n whether `tableViewControlStyle*` is still untouched — the same\n auto-disable-on-className trick `zoomControlClassName` uses.\n*/\nexport const tableViewControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const tableViewControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const tableViewControlStyleHoverDefault = false as const;\n\n/**\n Zoom behavior, brush, control button styling, and zoom limit defaults.\n @private\n*/\nfunction initZoomDefaults(viz: Viz): void {\n viz.schema.zoom = true;\n viz._zoomBehavior = zoom();\n viz._zoomBrush = brush();\n viz.schema.zoomBrushHandleSize = 1;\n viz.schema.zoomBrushHandleStyle = {\n fill: \"#444\",\n };\n viz.schema.zoomBrushSelectionStyle = {\n fill: \"#777\",\n \"stroke-width\": 0,\n };\n viz.schema.zoomControlClassName = undefined;\n viz.schema.zoomControlIcons = undefined;\n viz.schema.zoomControlStyle = zoomControlStyleDefault;\n viz.schema.zoomControlStyleActive = zoomControlStyleActiveDefault;\n viz.schema.zoomControlStyleHover = zoomControlStyleHoverDefault;\n viz.schema.zoomFactor = 2;\n viz.schema.zoomMax = undefined;\n viz.schema.zoomPadding = 20;\n viz.schema.zoomPan = true;\n viz.schema.zoomScroll = \"modifier\";\n}\n\n/**\n Table-view button + data-table defaults. Mirrors `initZoomDefaults`:\n a chrome toggle shown by default, styled structurally (no color/\n background) so a host page's own button styling applies through the\n cascade once `tableViewControlClassName` is set.\n @private\n*/\nfunction initTableViewDefaults(viz: Viz): void {\n viz.schema.tableView = true;\n viz.schema.tableViewClassName = undefined;\n viz.schema.tableViewControlClassName = undefined;\n viz.schema.tableViewControlStyle = tableViewControlStyleDefault;\n viz.schema.tableViewControlStyleActive = tableViewControlStyleActiveDefault;\n viz.schema.tableViewControlStyleHover = tableViewControlStyleHoverDefault;\n viz.schema.tableViewDownload = true;\n viz.schema.tableViewPageSize = 50;\n viz.schema.tableViewSort = true;\n}\n\n/**\n Default inline styles for the minimap — mirrors the zoom-control defaults'\n own reasoning (structural/neutral, easy to override or auto-disable via\n `minimapClassName`) and the same by-reference `===` trick that lets\n setting `minimapClassName` auto-disable an untouched default without\n clobbering a caller's own customization.\n @private\n*/\nexport const minimapStyleDefault = {\n background: \"rgba(255, 255, 255, 0.75)\",\n border: \"1px solid rgba(0, 0, 0, 0.25)\",\n \"border-radius\": \"2px\",\n \"box-sizing\": \"border-box\",\n};\nexport const minimapViewportStyleDefault = {\n background: \"rgba(0, 0, 0, 0.15)\",\n border: \"1px solid rgba(0, 0, 0, 0.5)\",\n \"border-radius\": \"2px\",\n cursor: \"grab\",\n};\nexport const minimapViewportStyleActiveDefault = {\n background: \"rgba(0, 0, 0, 0.25)\",\n cursor: \"grabbing\",\n};\nexport const minimapLabelStyleDefault = {\n bottom: \"2px\",\n right: \"3px\",\n color: \"rgba(0, 0, 0, 0.75)\",\n font: `400 9px/1 ${fontFamilyStringify(fontFamily)}`,\n \"pointer-events\": \"none\",\n};\n\n/**\n Minimap visibility and styling defaults.\n @private\n*/\nfunction initMinimapDefaults(viz: Viz): void {\n viz.schema.minimap = true;\n viz.schema.minimapClassName = undefined;\n viz.schema.minimapStyle = minimapStyleDefault;\n viz.schema.minimapViewportStyle = minimapViewportStyleDefault;\n viz.schema.minimapViewportStyleActive = minimapViewportStyleActiveDefault;\n viz.schema.minimapLabelStyle = minimapLabelStyleDefault;\n}\n\n/**\n Default inline styles for the search control's toggle button — the same\n structural-only values as `zoomControlStyleDefault` et al. (visual\n parity by default), kept as independent objects/consumers rather than\n shared references so restyling one doesn't affect the other.\n @private\n*/\nexport const searchControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const searchControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const searchControlStyleHoverDefault = false as const;\n\n/**\n Search-control (toggle button + input) styling defaults.\n @private\n*/\nfunction initSearchDefaults(viz: Viz): void {\n viz.schema.search = true;\n viz.schema.searchAccessor = (d: DataPoint, i: number) => viz._drawLabel(d, i);\n viz.schema.searchControlClassName = undefined;\n viz.schema.searchControlStyle = searchControlStyleDefault;\n viz.schema.searchControlStyleActive = searchControlStyleActiveDefault;\n viz.schema.searchControlStyleHover = searchControlStyleHoverDefault;\n}\n\n/**\n Seeds a fresh Viz instance's schema defaults and installs the identity-coerce\n fluent accessors. Extracted from the constructor so the seeding logic stays\n readable and the constructor stays under the per-function line budget.\n @private\n*/\nexport function initVizDefaults(viz: Viz): void {\n viz.schema.aggs = {};\n // E4: install identity-coerce accessors on the prototype. The imperative\n // `viz._x = …` assignments below seed defaults; installFluent's \"skip\n // if slot already set\" guard respects them. Methods are visible to\n // BaseClass.config()'s `getAllMethods` reflection.\n installFluent(viz, vizSchema);\n initBaseDefaults(viz);\n initColorDefaults(viz);\n initDataDefaults(viz);\n initLegendDefaults(viz);\n initMessageDefaults(viz);\n initEventDefaults(viz);\n initShapeDefaults(viz);\n initLabelDefaults(viz);\n initZoomDefaults(viz);\n initTableViewDefaults(viz);\n initMinimapDefaults(viz);\n initBackDefaults(viz);\n initSearchDefaults(viz);\n}\n"],"names":["max","brush","color","scaleOrdinal","zoom","colorAssign","colorContrast","colorDefaults","backgroundColor","formatAbbreviate","fontFamily","fontFamilyStringify","ColorScale","Legend","SizeLegend","TextBox","Timeline","Tooltip","sizeLegendFits","Message","accessor","constant","markDefault","installFluent","legendLabel","clickShape","clickLegend","mouseenter","mouseleave","mousemoveLegend","mousemoveShape","debounce","func","delay","timeout","args","context","clearTimeout","setTimeout","apply","defaultPadding","window","innerWidth","LRU","capacity","_cap","_map","Map","get","key","has","undefined","val","delete","set","size","keys","next","value","vizSchema","coerce","default","initBaseDefaults","viz","_renderer","_renderMode","schema","ariaHidden","attribution","attributionIcon","attributionStyle","attributionStyleDefault","cache","backControlStyleDefault","display","font","gap","height","padding","width","initBackDefaults","backConfig","backControlClassName","backControlStyle","initColorDefaults","d","i","groupBy","scale","range","_colorScaleClass","colorScaleConfig","axisConfig","rounding","colorScalePadding","colorScalePosition","colorScaleMaxSize","initDataDefaults","_data","dataCutoff","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","detectVisibleUnload","downloadButton","downloadConfig","type","downloadPosition","duration","_hidden","hiddenColor","hiddenOpacity","_history","initLegendDefaults","legend","config","arr","maxGrouped","id","_legendDepth","bind","Array","length","_legendClass","legendConfig","label","shapeConfig","ariaLabel","labelConfig","fontColor","_select","node","fontResize","legendFilterInvert","legendPadding","legendPosition","legendSort","a","b","_drawLabel","localeCompare","legendTooltip","_sizeLegendClass","Object","assign","sizeLegend","sizeLegendConfig","sizeLegendPosition","initMessageDefaults","loadingHTML","translate","loadingMessage","_lrucache","_messageClass","messageMask","messageStyle","bottom","left","position","right","top","noDataHTML","noDataMessage","initEventDefaults","on","_queue","applyResize","entries","contentRect","_autoWidth","_autoHeight","_setSVGSize","_callback","render","debouncedResize","_resizeObserver","ResizeObserver","_resizeSettled","scrollContainer","initShapeDefaults","shape","_shapes","fill","__d3plus__","data","colorScale","c","_colorScale","colors","domain","JSON","stringify","colorOrdinal","_ordinalColorScale","opacity","stroke","col","darker","role","strokeWidth","_solo","initLabelDefaults","_subtitleClass","subtitleConfig","fontSize","resize","textAnchor","subtitlePadding","svgDesc","svgTitle","timeline","_timelineClass","align","timelineConfig","timelinePadding","threshold","thresholdKey","thresholdName","_titleClass","titleConfig","titlePadding","tooltip","_tooltipClass","tooltipConfig","pointerEvents","titleStyle","_totalClass","totalConfig","totalFormat","locale","totalPadding","attributionLightBg","attributionDarkBg","attributionBase","background","attributionStyleDarkDefault","zoomControlStyleDefault","zoomControlStyleActiveDefault","zoomControlStyleHoverDefault","tableViewControlStyleDefault","tableViewControlStyleActiveDefault","tableViewControlStyleHoverDefault","initZoomDefaults","_zoomBehavior","_zoomBrush","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomControlClassName","zoomControlIcons","zoomControlStyle","zoomControlStyleActive","zoomControlStyleHover","zoomFactor","zoomMax","zoomPadding","zoomPan","zoomScroll","initTableViewDefaults","tableView","tableViewClassName","tableViewControlClassName","tableViewControlStyle","tableViewControlStyleActive","tableViewControlStyleHover","tableViewDownload","tableViewPageSize","tableViewSort","minimapStyleDefault","border","minimapViewportStyleDefault","cursor","minimapViewportStyleActiveDefault","minimapLabelStyleDefault","initMinimapDefaults","minimap","minimapClassName","minimapStyle","minimapViewportStyle","minimapViewportStyleActive","minimapLabelStyle","searchControlStyleDefault","searchControlStyleActiveDefault","searchControlStyleHoverDefault","initSearchDefaults","search","searchAccessor","searchControlClassName","searchControlStyle","searchControlStyleActive","searchControlStyleHover","initVizDefaults","aggs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,GAAG,QAAO,WAAW;AAC7B,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,IAAI,QAAO,UAAU;AAE7B,SAAQC,WAAW,EAAEC,aAAa,EAAEC,aAAa,QAAO,gBAAgB;AACxE,SAAQC,eAAe,QAAO,cAAc;AAC5C,SAAQC,gBAAgB,QAAO,iBAAiB;AAEhD,SAAQC,UAAU,EAAEC,mBAAmB,QAAO,eAAe;AAE7D,SAAQC,UAAU,EAAEC,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,QAAO,4BAA4B;AACrG,SAAQC,cAAc,QAAO,kDAAkD;AAC/E,OAAOC,aAAa,8BAA8B;AAClD,SAAQC,QAAQ,EAAEC,QAAQ,QAAO,uBAAuB;AACxD,SAAQC,WAAW,QAAO,+BAA+B;AACzD,SAAQC,aAAa,QAAO,kBAAkB;AAE9C,SAAQC,WAAW,QAAO,6BAA6B;AACvD,OAAOC,gBAAgB,2BAA2B;AAClD,OAA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TC,MAAM,AAAC,cAA6C,OAAhChE,oBAAoBD;IACxCmE,QAAQ;IACR,mBAAmB;IACnBC,SAAS;IACTC,OAAO;AACT,EAAE;AACF,OAAO,IAAM4M,kCAAkC;IAC7C,oBAAoB;IACpB,gBAAgB;IAChBzR,OAAO;AACT,EAAE;AACF,OAAO,IAAM0R,iCAAiC,MAAe;AAE7D;;;AAGA,GACA,SAASC,mBAAmB9N,GAAQ;IAClCA,IAAIG,MAAM,CAAC4N,MAAM,GAAG;IACpB/N,IAAIG,MAAM,CAAC6N,cAAc,GAAG,SAAC1M,GAAcC;eAAcvB,IAAI6E,UAAU,CAACvD,GAAGC;;IAC3EvB,IAAIG,MAAM,CAAC8N,sBAAsB,GAAG7O;IACpCY,IAAIG,MAAM,CAAC+N,kBAAkB,GAAGP;IAChC3N,IAAIG,MAAM,CAACgO,wBAAwB,GAAGP;IACtC5N,IAAIG,MAAM,CAACiO,uBAAuB,GAAGP;AACvC;AAEA;;;;;AAKA,GACA,OAAO,SAASQ,gBAAgBrO,GAAQ;IACtCA,IAAIG,MAAM,CAACmO,IAAI,GAAG,CAAC;IACnB,yEAAyE;IACzE,sEAAsE;IACtE,mEAAmE;IACnE,mDAAmD;IACnD9Q,cAAcwC,KAAKJ;IACnBG,iBAAiBC;IACjBqB,kBAAkBrB;IAClBkC,iBAAiBlC;IACjBmD,mBAAmBnD;IACnBsF,oBAAoBtF;IACpBqG,kBAAkBrG;IAClBqH,kBAAkBrH;IAClB2I,kBAAkB3I;IAClBoL,iBAAiBpL;IACjBoM,sBAAsBpM;IACtBoN,oBAAoBpN;IACpBiB,iBAAiBjB;IACjB8N,mBAAmB9N;AACrB"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/charts/viz/vizDefaults.ts"],"sourcesContent":["import {max} from \"d3-array\";\nimport {brush} from \"d3-brush\";\nimport {color} from \"d3-color\";\nimport {scaleOrdinal} from \"d3-scale\";\nimport {zoom} from \"d3-zoom\";\n\nimport {colorAssign, colorContrast, colorDefaults} from \"@d3plus/color\";\nimport {backgroundColor} from \"@d3plus/dom\";\nimport {formatAbbreviate} from \"@d3plus/format\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {fontFamily, fontFamilyStringify} from \"@d3plus/text\";\n\nimport {ColorScale, Legend, SizeLegend, TextBox, Timeline, Tooltip} from \"../../components/index.js\";\nimport {sizeLegendFits} from \"../../components/SizeLegend/sizeLegendLayout.js\";\nimport Message from \"../../components/Message.js\";\nimport {accessor, constant} from \"../../utils/index.js\";\nimport {markDefault} from \"../../utils/configDefault.js\";\nimport {installFluent} from \"../../fluent.js\";\n\nimport {legendLabel} from \"../features/legendLabel.js\";\nimport clickShape from \"../events/click.shape.js\";\nimport clickLegend from \"../events/click.legend.js\";\nimport mouseenter from \"../events/mouseenter.js\";\nimport mouseleave from \"../events/mouseleave.js\";\nimport mousemoveLegend from \"../events/mousemove.legend.js\";\nimport mousemoveShape from \"../events/mousemove.shape.js\";\n\nimport {linkedColorDefaults, registerLink} from \"./linkGroup.js\";\nimport type Viz from \"./Viz.js\";\nimport type {VizInstance} from \"./vizTypes.js\";\n\nfunction debounce<A extends unknown[]>(\n func: (...args: A) => void,\n delay: number,\n): (...args: A) => void {\n let timeout: ReturnType<typeof setTimeout>;\n return function (this: unknown, ...args: A) {\n const context = this;\n clearTimeout(timeout);\n timeout = setTimeout(() => func.apply(context, args), delay);\n };\n}\n\n/**\n * Default padding logic that will return false if the screen is less than 600 pixels wide.\n * @private\n */\nfunction defaultPadding(): boolean {\n return typeof window !== \"undefined\" ? window.innerWidth > 600 : true;\n}\n\n/**\n Minimal LRU cache backed by a Map (insertion-order iteration enables O(1) eviction).\n Only .get() and .set() are used by Viz.\n @private\n*/\nclass LRU {\n private _cap: number;\n private _map: Map<string, unknown>;\n\n constructor(capacity: number) {\n this._cap = capacity;\n this._map = new Map();\n }\n get(key: string): unknown {\n if (!this._map.has(key)) return undefined;\n const val = this._map.get(key);\n this._map.delete(key);\n this._map.set(key, val);\n return val;\n }\n set(key: string, val: unknown): void {\n this._map.delete(key);\n if (this._map.size >= this._cap)\n this._map.delete(this._map.keys().next().value!);\n this._map.set(key, val);\n }\n}\n\n// E4: Viz's identity-coerce accessor schema. installFluent installs methods on\n// Viz.prototype (once via WeakSet) so BaseClass.config() reflection picks them\n// up. Constructor assignments below seed defaults (e.g. `this.schema.duration = 600`);\n// installFluent skips slots already set, so constructor values win.\nconst vizSchema = [\n {key: \"ariaHidden\", coerce: \"identity\" as const},\n {key: \"cache\", coerce: \"identity\" as const},\n {key: \"colorOrdinal\", coerce: \"identity\" as const, default: false},\n {key: \"dataCutoff\", coerce: \"identity\" as const},\n {key: \"depth\", coerce: \"identity\" as const},\n {key: \"discrete\", coerce: \"identity\" as const},\n {key: \"duration\", coerce: \"identity\" as const},\n {key: \"filter\", coerce: \"identity\" as const},\n {key: \"height\", coerce: \"identity\" as const},\n {key: \"legendSort\", coerce: \"identity\" as const},\n {key: \"link\", coerce: \"identity\" as const, onSet: (viz: VizInstance) => registerLink(viz)},\n {key: \"minimap\", coerce: \"identity\" as const},\n {key: \"search\", coerce: \"identity\" as const},\n {key: \"svgDesc\", coerce: \"identity\" as const},\n {key: \"svgTitle\", coerce: \"identity\" as const},\n {key: \"tableView\", coerce: \"identity\" as const},\n {key: \"tableViewDownload\", coerce: \"identity\" as const},\n {key: \"tableViewSort\", coerce: \"identity\" as const},\n {key: \"timeFilter\", coerce: \"identity\" as const},\n {key: \"timeline\", coerce: \"identity\" as const},\n {key: \"width\", coerce: \"identity\" as const},\n {key: \"zoom\", coerce: \"identity\" as const},\n {key: \"zoomFactor\", coerce: \"identity\" as const},\n {key: \"zoomMax\", coerce: \"identity\" as const},\n {key: \"zoomPan\", coerce: \"identity\" as const},\n {key: \"zoomScroll\", coerce: \"identity\" as const},\n];\n\n/**\n Renderer backend, accessibility, attribution, and back-button defaults.\n @private\n*/\nfunction initBaseDefaults(viz: Viz): void {\n // `renderer()` selects the @d3plus/render backend. Default\n // `\"svg\"` (SvgRenderer); `\"canvas\"` for large N via CanvasRenderer.\n viz._renderer = \"svg\";\n viz._renderMode = \"full\";\n viz.schema.ariaHidden = true;\n viz.schema.attribution = false;\n viz.schema.attributionIcon = undefined;\n viz.schema.attributionStyle = attributionStyleDefault;\n viz.schema.cache = true;\n}\n\n/**\n Default inline style for the \"← Back\" button — structural-only, the\n same properties `zoomControlStyleDefault`/`searchControlStyleDefault`\n use, except `width: \"auto\"` (it shows an icon + the word \"Back\", not a\n single centered glyph) with a small `gap` between them and horizontal\n padding for breathing room. Also lighter/smaller than the other two's\n `font` (900 15px): that value is a holdover from when their icons were\n bold Unicode glyphs sized to read clearly (the icons are SVG now, so it\n no longer affects THEM at all) — but back is the one place that font\n actually renders visible text, where 900 15px reads oversized/heavy.\n No background/border/color, same as the other two: a plain\n browser-appearance button, letting native/host-page button chrome show\n through by default.\n @private\n*/\nexport const backControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `400 12px/1 ${fontFamilyStringify(fontFamily)}`,\n gap: \"4px\",\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: \"0 6px\",\n width: \"auto\",\n};\n\n/**\n Back-button control styling defaults.\n @private\n*/\nfunction initBackDefaults(viz: Viz): void {\n // No longer drives the button's appearance (see `.backConfig()`'s own\n // doc comment), but `.backConfig({...})` merges into this via\n // `assign(this.schema.backConfig, _)` — leaving it undefined makes that\n // throw on the very first call, on every chart.\n viz.schema.backConfig = {};\n viz.schema.backControlClassName = undefined;\n viz.schema.backControlStyle = backControlStyleDefault;\n}\n\n/**\n Color accessor and color-scale defaults.\n @private\n*/\nfunction initColorDefaults(viz: Viz): void {\n viz.schema.color = (d: DataPoint, i: number) => viz.schema.groupBy[0](d, i);\n // Each viz gets its own categorical scale so assignments don't leak\n // across charts on the same page.\n const scale = scaleOrdinal<string>().range(colorDefaults.scale.range());\n viz.schema.colorDefaults = {...colorDefaults, scale};\n viz._autoColorScale = scale;\n viz._colorScaleClass = new ColorScale();\n viz.schema.colorScaleConfig = {\n axisConfig: {\n rounding: \"inside\",\n },\n scale: \"jenks\",\n };\n viz.schema.colorScalePadding = defaultPadding;\n viz.schema.colorScalePosition = () =>\n viz.schema.width > viz.schema.height * 1.5 ? \"right\" : \"bottom\";\n viz.schema.colorScaleMaxSize = 600;\n}\n\n/**\n Data, resize/visibility detection, download, and grouping defaults.\n @private\n*/\nfunction initDataDefaults(viz: Viz): void {\n viz._data = [];\n viz.schema.dataCutoff = 100;\n viz.schema.detectResize = true;\n viz.schema.detectResizeDelay = 400;\n viz.schema.detectVisible = true;\n viz.schema.detectVisibleInterval = 1000;\n viz.schema.detectVisibleUnload = true;\n viz.schema.duration = 600;\n viz.schema.fontFamily = fontFamily;\n viz._hidden = [];\n viz.schema.hiddenColor = constant(\"#aaa\");\n viz.schema.hiddenOpacity = constant(0.5);\n viz._history = [];\n viz.schema.groupBy = [accessor(\"id\")];\n}\n\n/**\n Legend and size legend visibility, class instances, and config defaults.\n @private\n*/\nfunction initLegendDefaults(viz: Viz): void {\n viz.schema.legend = (config: Record<string, unknown>, arr: DataPoint[]) => {\n const maxGrouped = max(arr, (d: DataPoint, i: number) => {\n const id = viz.schema.groupBy[viz._legendDepth].bind(viz)(d, i);\n return id instanceof Array ? id.length : 1;\n });\n return arr.length > 1 && (maxGrouped ?? 0) <= 2;\n };\n viz._legendClass = new Legend();\n viz.schema.legendConfig = {\n label: legendLabel.bind(viz),\n shapeConfig: {\n ariaLabel: legendLabel.bind(viz),\n labelConfig: {\n // Labels read against the chart's own background (dark text on a light\n // page, light text on a dark one), not the swatch fill the chart's\n // shape labels contrast with.\n fontColor: () => colorContrast(viz._select ? backgroundColor(viz._select.node()) : \"rgb(255, 255, 255)\", viz.schema.colorDefaults),\n fontResize: false,\n padding: 0,\n },\n },\n };\n viz.schema.legendFilterInvert = constant(false);\n viz.schema.legendPadding = defaultPadding;\n viz.schema.legendPosition = () =>\n viz.schema.width > viz.schema.height * 1.5 ? \"right\" : \"bottom\";\n viz.schema.legendSort = (a: DataPoint, b: DataPoint) =>\n viz._drawLabel(a).localeCompare(viz._drawLabel(b));\n viz.schema.legendTooltip = {};\n viz._sizeLegendClass = new SizeLegend();\n Object.assign(viz.schema, {sizeLegend: sizeLegendFits, sizeLegendConfig: {}, sizeLegendPosition: \"right\"});\n}\n\n/**\n Loading/no-data message HTML, class instances, and mask/style defaults.\n @private\n*/\nfunction initMessageDefaults(viz: Viz): void {\n viz.schema.loadingHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${viz.schema.translate(\"Loading Visualization\")}</strong>\n <sub style=\"bottom: 0; display: block; line-height: 1; margin-top: 5px;\"><a href=\"https://d3plus.org\" target=\"_blank\">${viz.schema.translate(\n \"Powered by D3plus\",\n )}</a></sub>\n </div>`;\n\n viz.schema.loadingMessage = true;\n viz._lrucache = new LRU(10);\n viz._messageClass = new Message();\n viz.schema.messageMask = \"rgba(0, 0, 0, 0.05)\";\n viz.schema.messageStyle = {\n bottom: \"0\",\n left: \"0\",\n position: \"absolute\",\n right: \"0\",\n \"text-align\": \"center\",\n top: \"0\",\n };\n\n viz.schema.noDataHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${viz.schema.translate(\"No Data Available\")}</strong>\n </div>`;\n\n viz.schema.noDataMessage = true;\n}\n\n/**\n Event handler bindings, render queue, resize observer, and scroll container.\n @private\n*/\nfunction initEventDefaults(viz: Viz): void {\n viz.schema.on = {\n \"click.shape\": clickShape.bind(viz),\n \"click.legend\": clickLegend.bind(viz),\n mouseenter: mouseenter.bind(viz),\n mouseleave: mouseleave.bind(viz),\n \"mousemove.shape\": mousemoveShape.bind(viz),\n \"mousemove.legend\": mousemoveLegend.bind(viz),\n };\n viz._queue = [];\n // Applies a detected container resize: re-sizes the SVG and re-renders when\n // the observed size actually differs from what the chart last drew at.\n const applyResize = (entries: ResizeObserverEntry[]): void => {\n const {width, height} = entries[0]!.contentRect;\n if (\n ((width !== viz.schema.width && viz._autoWidth) ||\n (height !== viz.schema.height && viz._autoHeight)) &&\n width &&\n height\n ) {\n viz._setSVGSize(width, height);\n if (!viz._callback) viz.render();\n }\n };\n const debouncedResize = debounce(applyResize, viz.schema.detectResizeDelay);\n // Guarded so a chart can be constructed in an environment without a DOM (e.g.\n // before `@d3plus/ssr` installs one). Auto-resize is a browser-only feature;\n // when absent, `_resizeObserver` stays undefined and its call sites skip it.\n viz._resizeObserver =\n typeof ResizeObserver === \"undefined\"\n ? undefined\n : new ResizeObserver(\n (entries: ResizeObserverEntry[]) => {\n // The first real-size notification after `observe()` reports the\n // container's settled layout size, which on an auto-sized chart often\n // differs from the size the chart just measured pre-layout (the\n // height:100% chain resolves after the synchronous render). Apply that\n // correction SYNCHRONOUSLY rather than through the debounce: debounced,\n // it lands ~detectResizeDelay (400ms) into the 600ms entrance transition\n // and restarts it with ease-in — the visible \"pause ~75% through then\n // continue\". Applied immediately it lands before the transition is\n // visible, so the entrance plays once at the correct size. Genuine later\n // resizes (window drags) still debounce. A collapsed (0-size) first\n // notification is ignored so it doesn't waste the immediate slot.\n const {width, height} = entries[0]!.contentRect;\n if (!viz._resizeSettled) {\n if (!width || !height) return;\n viz._resizeSettled = true;\n applyResize(entries);\n } else {\n debouncedResize(entries);\n }\n },\n );\n viz.schema.scrollContainer = typeof window === \"undefined\" ? \"\" : window;\n}\n\n/**\n Shape accessor and the fill/stroke/label shapeConfig defaults.\n @private\n*/\nfunction initShapeDefaults(viz: Viz): void {\n viz.schema.shape = constant(\"Rect\");\n viz._shapes = [];\n viz.schema.shapeConfig = {\n ariaLabel: (d: DataPoint, i: number) => viz._drawLabel(d, i),\n fill: (d: DataPoint, i: number) => {\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint;\n i = d.i as number;\n }\n if (viz.schema.colorScale) {\n const c = viz.schema.colorScale(d, i);\n if (c !== undefined && c !== null) {\n const scale = viz._colorScaleClass._colorScale;\n const colors = viz._colorScaleClass.color();\n if (!scale)\n return colors instanceof Array\n ? colors[colors.length - 1]\n : colors;\n else if (!scale.domain().length)\n return scale.range()[scale.range().length - 1];\n return scale(c);\n }\n }\n const c = viz.schema.color(d, i);\n if (color(c)) return c;\n const key = typeof c === \"string\" ? c : JSON.stringify(c);\n // Ordinal color mode: an ordered discrete field takes a single-hue\n // light→dark ramp (built in vizPreDraw) instead of nominal categorical\n // hues, so the color itself carries the ordering.\n if (viz.schema.colorOrdinal && viz._ordinalColorScale)\n return viz._ordinalColorScale(key);\n return colorAssign(key, linkedColorDefaults(viz));\n },\n labelConfig: {\n // Marked so chart emitters layering user label config keep their own\n // label colors over this generic one.\n fontColor: markDefault((d: DataPoint, i: number) => {\n const c =\n typeof viz.schema.shapeConfig.fill === \"function\"\n ? viz.schema.shapeConfig.fill(d, i)\n : viz.schema.shapeConfig.fill;\n return colorContrast(c, viz.schema.colorDefaults);\n }),\n },\n opacity: constant(1),\n stroke: (d: DataPoint, i: number) => {\n const c =\n typeof viz.schema.shapeConfig.fill === \"function\"\n ? viz.schema.shapeConfig.fill(d, i)\n : viz.schema.shapeConfig.fill;\n // A fill that doesn't parse as a color (e.g. \"none\"/\"transparent\" on a\n // confidence band) has no darker shade — fall back to the fill itself.\n const col = color(c as string);\n return col ? col.darker(0.25).toString() : c;\n },\n role: \"presentation\",\n strokeWidth: constant(0),\n };\n viz._solo = [];\n}\n\n/**\n Subtitle, title, timeline, threshold, tooltip, and total label defaults.\n @private\n*/\nfunction initLabelDefaults(viz: Viz): void {\n viz._subtitleClass = new TextBox();\n viz.schema.subtitleConfig = {\n ariaHidden: true,\n fontSize: 12,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.subtitlePadding = defaultPadding;\n\n viz.schema.svgDesc = \"\";\n viz.schema.svgTitle = \"\";\n\n viz.schema.timeline = true;\n viz._timelineClass = new Timeline().align(\"end\");\n viz.schema.timelineConfig = {\n padding: 5,\n };\n viz.schema.timelinePadding = defaultPadding;\n\n viz.schema.threshold = constant(0.0001);\n viz.schema.thresholdKey = undefined;\n viz.schema.thresholdName = () => viz.schema.translate(\"Values\");\n\n viz._titleClass = new TextBox();\n viz.schema.titleConfig = {\n ariaHidden: true,\n fontSize: 16,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.titlePadding = defaultPadding;\n\n viz.schema.tooltip = constant(true);\n viz._tooltipClass = new Tooltip();\n viz.schema.tooltipConfig = {\n pointerEvents: \"none\",\n titleStyle: {\n \"max-width\": \"200px\",\n },\n };\n\n viz._totalClass = new TextBox();\n viz.schema.totalConfig = {\n fontSize: 10,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n viz.schema.totalFormat = (d: number) =>\n `${viz.schema.translate(\"Total\")}: ${formatAbbreviate(d, viz.schema.locale)}`;\n viz.schema.totalPadding = defaultPadding;\n}\n\n/**\n Default attribution styles: flush to the chart area's bottom-right corner\n like the credit on a slippy map, in small type on a translucent backing\n that keeps it legible over busy tiles without boxing it in. The dark\n variant applies over a dark basemap while the style is still this\n untouched default (compared by reference, like the zoom-control styles).\n @private\n*/\nconst attributionLightBg = \"rgba(255, 255, 255, 0.7)\";\nconst attributionDarkBg = \"rgba(24, 25, 28, 0.7)\";\nconst attributionBase = {\n \"border-radius\": \"3px 0 0 0\",\n display: \"flex\",\n \"align-items\": \"center\",\n gap: \"4px\",\n font: `400 10px/1.4 ${fontFamilyStringify(fontFamily)}`,\n};\nexport const attributionStyleDefault = {\n ...attributionBase,\n background: attributionLightBg,\n color: colorContrast(attributionLightBg),\n};\nexport const attributionStyleDarkDefault = {\n ...attributionBase,\n background: attributionDarkBg,\n color: colorContrast(attributionDarkBg),\n};\n\n/**\n Default inline styles for the zoom-control buttons — structural only\n (sizing/spacing/typography); no color, background, border, or opacity.\n Letting native/host-page button chrome show through by default means a\n page styling its own buttons (Tailwind, Bootstrap, a design system) via\n `zoomControlClassName` composes cleanly instead of fighting inline color\n overrides. The active state (brush mode on) paints the OS accent color\n through CSS system colors (`AccentColor`/`AccentColorText`, falling back\n to the selection `Highlight` where unsupported), so it reads as pressed\n in the browser's own idiom; hover gets no default styling (`false`). The\n `.active` class, `aria-pressed`, and `:hover`/`:active` pseudo-classes\n stay available for a host page's own CSS to hook into. Consumers who want d3plus's old\n opinionated look can restore it via `.zoomControlStyle({...})`.\n\n Exported as stable object references (not inlined per-instance) so\n `zoomControls.ts` can tell, via `===`, whether a given viz's\n `zoomControlStyle*` is still the untouched default — that's what lets\n setting `zoomControlClassName` auto-disable the defaults without also\n clobbering a style the caller explicitly customized themselves.\n @private\n*/\nexport const zoomControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const zoomControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const zoomControlStyleHoverDefault = false as const;\n\n/**\n Default inline styles for the table-view toggle button — structural only,\n mirroring `zoomControlStyleDefault` et al. so the two chrome features look\n and behave consistently. Kept as separate object references (not shared\n with zoom's) so `tableViewControl.ts` can independently detect, via `===`,\n whether `tableViewControlStyle*` is still untouched — the same\n auto-disable-on-className trick `zoomControlClassName` uses.\n*/\nexport const tableViewControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const tableViewControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const tableViewControlStyleHoverDefault = false as const;\n\n/**\n Zoom behavior, brush, control button styling, and zoom limit defaults.\n @private\n*/\nfunction initZoomDefaults(viz: Viz): void {\n viz.schema.zoom = true;\n viz._zoomBehavior = zoom();\n viz._zoomBrush = brush();\n viz.schema.zoomBrushHandleSize = 1;\n viz.schema.zoomBrushHandleStyle = {\n fill: \"#444\",\n };\n viz.schema.zoomBrushSelectionStyle = {\n fill: \"#777\",\n \"stroke-width\": 0,\n };\n viz.schema.zoomControlClassName = undefined;\n viz.schema.zoomControlIcons = undefined;\n viz.schema.zoomControlStyle = zoomControlStyleDefault;\n viz.schema.zoomControlStyleActive = zoomControlStyleActiveDefault;\n viz.schema.zoomControlStyleHover = zoomControlStyleHoverDefault;\n viz.schema.zoomFactor = 2;\n viz.schema.zoomMax = undefined;\n viz.schema.zoomPadding = 20;\n viz.schema.zoomPan = true;\n viz.schema.zoomScroll = \"modifier\";\n}\n\n/**\n Table-view button + data-table defaults. Mirrors `initZoomDefaults`:\n a chrome toggle shown by default, styled structurally (no color/\n background) so a host page's own button styling applies through the\n cascade once `tableViewControlClassName` is set.\n @private\n*/\nfunction initTableViewDefaults(viz: Viz): void {\n viz.schema.tableView = true;\n viz.schema.tableViewClassName = undefined;\n viz.schema.tableViewControlClassName = undefined;\n viz.schema.tableViewControlStyle = tableViewControlStyleDefault;\n viz.schema.tableViewControlStyleActive = tableViewControlStyleActiveDefault;\n viz.schema.tableViewControlStyleHover = tableViewControlStyleHoverDefault;\n viz.schema.tableViewDownload = true;\n viz.schema.tableViewPageSize = 50;\n viz.schema.tableViewSort = true;\n}\n\n/**\n Default inline styles for the minimap — mirrors the zoom-control defaults'\n own reasoning (structural/neutral, easy to override or auto-disable via\n `minimapClassName`) and the same by-reference `===` trick that lets\n setting `minimapClassName` auto-disable an untouched default without\n clobbering a caller's own customization.\n @private\n*/\nexport const minimapStyleDefault = {\n background: \"rgba(255, 255, 255, 0.75)\",\n border: \"1px solid rgba(0, 0, 0, 0.25)\",\n \"border-radius\": \"2px\",\n \"box-sizing\": \"border-box\",\n};\nexport const minimapViewportStyleDefault = {\n background: \"rgba(0, 0, 0, 0.15)\",\n border: \"1px solid rgba(0, 0, 0, 0.5)\",\n \"border-radius\": \"2px\",\n cursor: \"grab\",\n};\nexport const minimapViewportStyleActiveDefault = {\n background: \"rgba(0, 0, 0, 0.25)\",\n cursor: \"grabbing\",\n};\nexport const minimapLabelStyleDefault = {\n bottom: \"2px\",\n right: \"3px\",\n color: \"rgba(0, 0, 0, 0.75)\",\n font: `400 9px/1 ${fontFamilyStringify(fontFamily)}`,\n \"pointer-events\": \"none\",\n};\n\n/**\n Minimap visibility and styling defaults.\n @private\n*/\nfunction initMinimapDefaults(viz: Viz): void {\n viz.schema.minimap = true;\n viz.schema.minimapClassName = undefined;\n viz.schema.minimapStyle = minimapStyleDefault;\n viz.schema.minimapViewportStyle = minimapViewportStyleDefault;\n viz.schema.minimapViewportStyleActive = minimapViewportStyleActiveDefault;\n viz.schema.minimapLabelStyle = minimapLabelStyleDefault;\n}\n\n/**\n Default inline styles for the search control's toggle button — the same\n structural-only values as `zoomControlStyleDefault` et al. (visual\n parity by default), kept as independent objects/consumers rather than\n shared references so restyling one doesn't affect the other.\n @private\n*/\nexport const searchControlStyleDefault = {\n \"align-items\": \"center\",\n display: \"inline-flex\",\n font: `900 15px/1 ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n \"justify-content\": \"center\",\n padding: 0,\n width: \"20px\",\n};\nexport const searchControlStyleActiveDefault = {\n \"background-color\": \"AccentColor\",\n \"border-color\": \"AccentColor\",\n color: \"AccentColorText\",\n};\nexport const searchControlStyleHoverDefault = false as const;\n\n/**\n Search-control (toggle button + input) styling defaults.\n @private\n*/\nfunction initSearchDefaults(viz: Viz): void {\n viz.schema.search = true;\n viz.schema.searchAccessor = (d: DataPoint, i: number) => viz._drawLabel(d, i);\n viz.schema.searchControlClassName = undefined;\n viz.schema.searchControlStyle = searchControlStyleDefault;\n viz.schema.searchControlStyleActive = searchControlStyleActiveDefault;\n viz.schema.searchControlStyleHover = searchControlStyleHoverDefault;\n}\n\n/**\n Seeds a fresh Viz instance's schema defaults and installs the identity-coerce\n fluent accessors. Extracted from the constructor so the seeding logic stays\n readable and the constructor stays under the per-function line budget.\n @private\n*/\nexport function initVizDefaults(viz: Viz): void {\n viz.schema.aggs = {};\n // E4: install identity-coerce accessors on the prototype. The imperative\n // `viz._x = …` assignments below seed defaults; installFluent's \"skip\n // if slot already set\" guard respects them. Methods are visible to\n // BaseClass.config()'s `getAllMethods` reflection.\n installFluent(viz, vizSchema);\n initBaseDefaults(viz);\n initColorDefaults(viz);\n initDataDefaults(viz);\n initLegendDefaults(viz);\n initMessageDefaults(viz);\n initEventDefaults(viz);\n initShapeDefaults(viz);\n initLabelDefaults(viz);\n initZoomDefaults(viz);\n initTableViewDefaults(viz);\n initMinimapDefaults(viz);\n initBackDefaults(viz);\n initSearchDefaults(viz);\n}\n"],"names":["max","brush","color","scaleOrdinal","zoom","colorAssign","colorContrast","colorDefaults","backgroundColor","formatAbbreviate","fontFamily","fontFamilyStringify","ColorScale","Legend","SizeLegend","TextBox","Timeline","Tooltip","sizeLegendFits","Message","accessor","constant","markDefault","installFluent","legendLabel","clickShape","clickLegend","mouseenter","mouseleave","mousemoveLegend","mousemoveShape","linkedColorDefaults","registerLink","debounce","func","delay","timeout","args","context","clearTimeout","setTimeout","apply","defaultPadding","window","innerWidth","LRU","capacity","_cap","_map","Map","get","key","has","undefined","val","delete","set","size","keys","next","value","vizSchema","coerce","default","onSet","viz","initBaseDefaults","_renderer","_renderMode","schema","ariaHidden","attribution","attributionIcon","attributionStyle","attributionStyleDefault","cache","backControlStyleDefault","display","font","gap","height","padding","width","initBackDefaults","backConfig","backControlClassName","backControlStyle","initColorDefaults","d","i","groupBy","scale","range","_autoColorScale","_colorScaleClass","colorScaleConfig","axisConfig","rounding","colorScalePadding","colorScalePosition","colorScaleMaxSize","initDataDefaults","_data","dataCutoff","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","detectVisibleUnload","duration","_hidden","hiddenColor","hiddenOpacity","_history","initLegendDefaults","legend","config","arr","maxGrouped","id","_legendDepth","bind","Array","length","_legendClass","legendConfig","label","shapeConfig","ariaLabel","labelConfig","fontColor","_select","node","fontResize","legendFilterInvert","legendPadding","legendPosition","legendSort","a","b","_drawLabel","localeCompare","legendTooltip","_sizeLegendClass","Object","assign","sizeLegend","sizeLegendConfig","sizeLegendPosition","initMessageDefaults","loadingHTML","translate","loadingMessage","_lrucache","_messageClass","messageMask","messageStyle","bottom","left","position","right","top","noDataHTML","noDataMessage","initEventDefaults","on","_queue","applyResize","entries","contentRect","_autoWidth","_autoHeight","_setSVGSize","_callback","render","debouncedResize","_resizeObserver","ResizeObserver","_resizeSettled","scrollContainer","initShapeDefaults","shape","_shapes","fill","__d3plus__","data","colorScale","c","_colorScale","colors","domain","JSON","stringify","colorOrdinal","_ordinalColorScale","opacity","stroke","col","darker","toString","role","strokeWidth","_solo","initLabelDefaults","_subtitleClass","subtitleConfig","fontSize","resize","textAnchor","subtitlePadding","svgDesc","svgTitle","timeline","_timelineClass","align","timelineConfig","timelinePadding","threshold","thresholdKey","thresholdName","_titleClass","titleConfig","titlePadding","tooltip","_tooltipClass","tooltipConfig","pointerEvents","titleStyle","_totalClass","totalConfig","totalFormat","locale","totalPadding","attributionLightBg","attributionDarkBg","attributionBase","background","attributionStyleDarkDefault","zoomControlStyleDefault","zoomControlStyleActiveDefault","zoomControlStyleHoverDefault","tableViewControlStyleDefault","tableViewControlStyleActiveDefault","tableViewControlStyleHoverDefault","initZoomDefaults","_zoomBehavior","_zoomBrush","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomControlClassName","zoomControlIcons","zoomControlStyle","zoomControlStyleActive","zoomControlStyleHover","zoomFactor","zoomMax","zoomPadding","zoomPan","zoomScroll","initTableViewDefaults","tableView","tableViewClassName","tableViewControlClassName","tableViewControlStyle","tableViewControlStyleActive","tableViewControlStyleHover","tableViewDownload","tableViewPageSize","tableViewSort","minimapStyleDefault","border","minimapViewportStyleDefault","cursor","minimapViewportStyleActiveDefault","minimapLabelStyleDefault","initMinimapDefaults","minimap","minimapClassName","minimapStyle","minimapViewportStyle","minimapViewportStyleActive","minimapLabelStyle","searchControlStyleDefault","searchControlStyleActiveDefault","searchControlStyleHoverDefault","initSearchDefaults","search","searchAccessor","searchControlClassName","searchControlStyle","searchControlStyleActive","searchControlStyleHover","initVizDefaults","aggs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,GAAG,QAAO,WAAW;AAC7B,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,IAAI,QAAO,UAAU;AAE7B,SAAQC,WAAW,EAAEC,aAAa,EAAEC,aAAa,QAAO,gBAAgB;AACxE,SAAQC,eAAe,QAAO,cAAc;AAC5C,SAAQC,gBAAgB,QAAO,iBAAiB;AAEhD,SAAQC,UAAU,EAAEC,mBAAmB,QAAO,eAAe;AAE7D,SAAQC,UAAU,EAAEC,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,QAAO,4BAA4B;AACrG,SAAQC,cAAc,QAAO,kDAAkD;AAC/E,OAAOC,aAAa,8BAA8B;AAClD,SAAQC,QAAQ,EAAEC,QAAQ,QAAO,uBAAuB;AACxD,SAAQC,WAAW,QAAO,+BAA+B;AACzD,SAAQC,aAAa,QAAO,kBAAkB;AAE9C,SAAQC,WAAW,QAAO,6BAA6B;AACvD,OAAOC,gBAAgB,2BAA2B;AAClD,OAAOC,iBAAiB,4BAA4B;AACpD,OAAOC,gBAAgB,0BAA0B;AACjD,OAAOC,gBAAgB,0BAA0B;AACjD,OAAOC,qBAAqB,gCAAgC;AAC5D,OAAOC,oBAAoB,+BAA+B;AAE1D,SAAQC,mBAAmB,EAAEC,YAAY,QAAO,iBAAiB;AAIjE,SAASC,SACPC,IAA0B,EAC1BC,KAAa;IAEb,IAAIC;IACJ,OAAO;QAAyB,IAAA,IAAA,OAAA,UAAA,QAAA,AAA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pD,GAAGC;;IAC3ExB,IAAII,MAAM,CAAC4N,sBAAsB,GAAG5O;IACpCY,IAAII,MAAM,CAAC6N,kBAAkB,GAAGP;IAChC1N,IAAII,MAAM,CAAC8N,wBAAwB,GAAGP;IACtC3N,IAAII,MAAM,CAAC+N,uBAAuB,GAAGP;AACvC;AAEA;;;;;AAKA,GACA,OAAO,SAASQ,gBAAgBpO,GAAQ;IACtCA,IAAII,MAAM,CAACiO,IAAI,GAAG,CAAC;IACnB,yEAAyE;IACzE,sEAAsE;IACtE,mEAAmE;IACnE,mDAAmD;IACnD/Q,cAAc0C,KAAKJ;IACnBK,iBAAiBD;IACjBsB,kBAAkBtB;IAClBoC,iBAAiBpC;IACjBiD,mBAAmBjD;IACnBoF,oBAAoBpF;IACpBmG,kBAAkBnG;IAClBmH,kBAAkBnH;IAClB0I,kBAAkB1I;IAClBmL,iBAAiBnL;IACjBmM,sBAAsBnM;IACtBmN,oBAAoBnN;IACpBkB,iBAAiBlB;IACjB6N,mBAAmB7N;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/charts/viz/vizTypes.ts"],"sourcesContent":["/**\n `Viz` — the typed contract for the runtime Viz surface that v4's free\n functions (plotPaint, vizPreDrawPure, vizDrawPure, runVizPipeline,\n apply*Layout stages, FeatureModules) read and write.\n\n This replaces `viz: any` across the free-function surface. The\n interface enumerates ~140 fields the audit found across the runtime\n code paths, grouped by category. Each entry is the BEST-EFFORT type\n inferred from usage; fields that are deeply chart-specific or\n loosely-shaped use `any` rather than half-accurate narrowing.\n\n Compatibility:\n - The class hierarchy (Viz/Plot/BarChart/.../Pie/Tree) already has\n `[key: string]: any` index signatures. Casting `this as Viz` from\n inside a class method is a widening, not a narrowing — TypeScript\n accepts it.\n - Chart-specific extensions (TreeViz/PieViz/etc.) can extend this\n interface to add stash slots (`_treeCtx`, `_pieData`, …). Today\n the index signature on the chart classes covers those.\n\n @module\n*/\n\nimport type {PlotZoomBase, ZoomState} from \"../Plot/plotZoom.js\";\nimport type {TrendFit, TrendLineType} from \"../Plot/trendLines.js\";\nimport type {ZoomControlIconKey} from \"../drawSteps/zoomControlsMarkup.js\";\nimport type {BottomRightBox} from \"../drawSteps/bottomRightControlsMarkup.js\";\nimport type {ZoomTransform} from \"d3-zoom\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {ClipShape, SceneNode, Transform, TransitionRect} from \"@d3plus/render\";\n\nimport type {\n Axis,\n ColorScale,\n Legend,\n Message,\n SizeLegend,\n TextBox,\n Timeline,\n Tooltip,\n} from \"../../components/index.js\";\nimport type {SizeLegendScale} from \"../../components/SizeLegend/sizeLegendLayout.js\";\nimport type Shape from \"../../shapes/Shape.js\";\nimport type {D3plusConfig, D3Scale} from \"../../utils/index.js\";\nimport type {PlotPaintContext} from \"../features/plotPaint.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type {ResolvedSpec} from \"../pipeline/resolveSpec.js\";\n\n/** Margin object with all four sides. */\nexport interface Margin {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\n/** Padding object with all four sides. */\nexport interface Padding {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\n/** One entry on the drill-down history stack (`Viz._history`), pushed by a click.shape drill-down and popped by Back. */\nexport interface DrillDownHistoryEntry {\n depth: number;\n filter?: (d: DataPoint, i: number) => boolean;\n /** `groupBy[groupDepth]`'s value for the clicked node — identifies the reunion node the Back morph grows back into. */\n groupId?: unknown;\n /** The groupBy index `groupId` was read at (== `_drawDepth` when the node was clicked). */\n groupDepth?: number;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n D3-style selection — deliberately loose. d3-selection's element/datum\n generics are invariant, so a single typed alias can't accept every\n `select(...)` result the chart code assigns to `_select`/`_container`/etc.;\n the `any` methods + index signature are the escape hatch (same rationale as\n the per-class fluent-accessor index signatures).\n*/\nexport type D3Selection = {\n node(): any;\n attr(name: string, ...args: any[]): any;\n style(name: string, ...args: any[]): any;\n selectAll(selector: string): any;\n select(selector: string | any): any;\n on(event: string, handler: any): any;\n call(...args: any[]): any;\n transition(...args: any[]): any;\n [key: string]: any;\n};\n\n/** A Renderer instance — loose to accept any backend (svg/canvas). */\nexport interface VizRenderer {\n kind: \"svg\" | \"canvas\";\n target(): {container: Element; width: number; height: number} | undefined;\n destroy(): void;\n drawScene(scene: any, opts?: any): any;\n toSVGString?(): string;\n toCanvas?(): HTMLCanvasElement;\n whenSettled?(): Promise<void>;\n [key: string]: any;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n The structural contract free functions read/write on a chart instance.\n Class instances satisfy it via their `[key: string]: any` signature;\n chart-specific extensions (TreeViz, PieViz, etc.) add stash slots.\n*/\nexport interface VizInstance {\n /**\n Post-coercion fluent storage. `any` is deliberate (see BaseClass.schema):\n accessor/const fields are stored as functions and called as such.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: Record<string, any>;\n /** Chart-internal scratch (d3 layout instances, computed derived state). */\n ctx: Record<string, unknown>;\n\n /* 1. Dimensions & layout */\n _width: number;\n _height: number;\n _margin: Margin;\n _padding: Padding;\n\n /* 2. Data & filtering */\n _data: DataPoint[];\n _filteredData: DataPoint[];\n _formattedData?: DataPoint[];\n _legendData: DataPoint[];\n _hidden: (string | number)[];\n _solo: (string | number)[];\n _filter?: (d: DataPoint, i: number) => boolean;\n _timeFilter?: (d: DataPoint, i: number) => boolean;\n _noDataMessage?: false | string | ((config: VizInstance) => string);\n\n /* 3. Grouping & aggregation */\n _groupBy: ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[];\n _depth?: number;\n _drawDepth: number;\n _discrete?: \"x\" | \"y\";\n _aggs: Record<string, (leaves: DataPoint[]) => unknown>;\n\n /* 4. Accessors */\n _id: (d: DataPoint, i: number) => string | number;\n _ids: (d: DataPoint, i: number) => string[];\n _drawLabel: (d: DataPoint, i: number, depth?: number) => string;\n _x?: (d: DataPoint, i: number) => number | Date | string;\n _y?: (d: DataPoint, i: number) => number | Date | string;\n _x2?: (d: DataPoint, i: number) => number | Date | string;\n _y2?: (d: DataPoint, i: number) => number | Date | string;\n _shape: (d: DataPoint, i: number) => string;\n _size?: (d: DataPoint, i?: number) => number;\n /** The data key `size` was set to, when it was set with a string; the size legend's default title. */\n _sizeKey?: string;\n _value?: (d: DataPoint, i: number) => number;\n _time?: (d: DataPoint, i: number) => string | number | Date;\n _sort?: ((a: DataPoint, b: DataPoint) => number) | null;\n _label?: (d: DataPoint, i: number) => string;\n _thresholdName?: (d: DataPoint, i: number) => string;\n _sum?: (d: DataPoint, i: number) => number;\n\n /* 5. Config slots */\n _xConfig?: Record<string, unknown>;\n _yConfig?: Record<string, unknown>;\n _x2Config?: Record<string, unknown>;\n _y2Config?: Record<string, unknown>;\n _backgroundConfig?: Record<string, unknown>;\n _legendConfig?: Record<string, unknown>;\n _colorScaleConfig?: Record<string, unknown>;\n _timelineConfig?: Record<string, unknown>;\n _backConfig?: Record<string, unknown>;\n _titleConfig?: Record<string, unknown>;\n _subtitleConfig?: Record<string, unknown>;\n _axisConfig?: Record<string, unknown>;\n\n /* 6. Scene & output */\n _chartScene?: SceneNode[];\n _chartTransform?: Transform;\n _chartClip?: ClipShape;\n _featurePanels?: SceneNode[];\n _shapes?: Shape[];\n _previousShapes?: string[];\n _previousAnnotations?: Record<string, string[]>;\n _zoomTransform?: Transform;\n /** Data-shape nodes the automatic `zoomMax` measures when they aren't `_chartScene`'s top level (Plot). */\n _zoomShapes?: SceneNode[];\n /** The unzoomed Plot draw an axis-rescaling zoom rescales from. */\n _plotZoomBase?: PlotZoomBase;\n /** Pending repaint that drops a Plot's zoom clip once an animated reset settles. */\n _plotUnclipTimer?: ReturnType<typeof setTimeout>;\n /**\n Chart-specific zoom: repaints for a transform and returns true, or\n returns false to fall back to picture zoom (Plot rescales its axes).\n */\n _zoomRescale?: (t: ZoomState, duration?: number) => boolean;\n /** Cleanup functions returned by `zoomControlIcons`' mount functions, keyed by button. */\n _zoomIconCleanup?: Partial<Record<ZoomControlIconKey, () => void>>;\n /** Cleanup function returned by an `attributionIcon` mount function. */\n _attributionIconCleanup?: () => void;\n\n /* 7. Lifecycle & rendering */\n _select?: D3Selection;\n _sceneTarget?: Element;\n _sceneRenderer?: VizRenderer;\n _duration: number;\n _renderer?: \"svg\" | \"canvas\";\n _renderMode?: \"full\" | \"compute\";\n _focus?: string | number | undefined;\n _active?: ((d: DataPoint, i?: number) => boolean) | false;\n _hover?: ((d: DataPoint, i?: number) => boolean) | false;\n /** True while the current hover came from a colorScale bucket swatch. */\n _hoverBucket?: boolean;\n _highlight?: ((d: DataPoint, i?: number) => boolean) | false;\n /** Whether the search control's input is currently open. */\n _searchOpen?: boolean;\n /** The search control's current (lowercased) search term. */\n _searchTerm?: string;\n /** The `_highlight` predicate saved when the search box opened, restored when it closes. */\n _searchPrevHighlight?: ((d: DataPoint, i?: number) => boolean) | false;\n /** 0-based index of the current match within `searchMatches(...)`, once Enter/Shift+Enter has stepped to one. */\n _searchMatchIndex?: number;\n _ordinalColorScale?: ((value: string) => string) | undefined;\n _hoverDatum?: DataPoint | null;\n /** Epoch ms until which an animated transition is in flight (pointer routing pauses). */\n _transitionEndsAt?: number;\n _userHover?: number;\n _userDuration?: number;\n _dataCutoff: number;\n _brushing?: boolean;\n /** Whether the table-view toggle is currently showing the data table instead of the chart. */\n _tableView?: boolean;\n /** The data table's current page (0-indexed), when `tableViewPageSize` paginates it. */\n _tableViewPage?: number;\n /** The data table's current sort column + direction, when the user has clicked a header. */\n _tableViewSort?: {column: string; direction: \"asc\" | \"desc\"};\n /** Which dataset the data table currently shows — `viz._data` (raw) once toggled, `viz._filteredData` (aggregate) by default. */\n _tableViewDataSource?: \"raw\" | \"aggregate\";\n /** Cached first-occurrence-index lookups (exact JSON match, and groupBy-key fallback) for restoring `.data()` insertion order to the aggregate view; invalidated by comparing against the raw array reference they were built from. */\n _tableViewGroupOrder?: {data: DataPoint[]; exact: Map<string, number>; group: Map<string, number>};\n /** Timeline brush selection (timeline feature). */\n _timelineSelection?: (Date | number)[] | false;\n /** The last drawn timeline value (ms), to detect multi-period trail jumps. */\n _trailSeq?: number;\n /** The user-set data, retained to detect changes across `.data()` calls. */\n _userData?: DataPoint[] | string;\n /** Drill-down history stack (back button). */\n _history?: DrillDownHistoryEntry[];\n /**\n The local, chart-family-defined \"body rect\" flip-morph fractions are\n measured against — e.g. Treemap/Pack's margin-adjusted chart area at\n local origin, or Plot's measured axis plot rect. Set by `runChartDraw`\n (via `ChartDefinition.chartBodyRect`) or by Plot's own paint pipeline.\n */\n _bodyRect?: {x: number; y: number; width: number; height: number};\n /**\n One-shot: the clicked node's rect, captured at click time and\n normalized as fractions of the *pre-click* `_bodyRect`, armed by\n `clickShape`. Resolved into `_resolvedEnterFrom` (against the *new*\n draw's `_bodyRect`) and cleared by `resolveDrillMorph`. Also carries:\n `key`, the clicked node's own scene key, resolved into\n `_resolvedInstantExitKey` so its own exit (now filtered out of the new\n scene) is removed instantly instead of animating on top of the\n children that replace it; and, when the clicked node carried them\n (currently only Pie/Donut wedges), `parentStartAngle`/`parentEndAngle`\n — its angular range, read by the next draw's `pieEmit` to build each\n entering child wedge's `flipFromArc` (a real arc confined within that\n range, at full radius) via the actual arc generator.\n */\n _pendingEnterOrigin?: {\n fx: number; fy: number; fw: number; fh: number;\n key?: string | number;\n parentStartAngle?: number;\n parentEndAngle?: number;\n };\n /**\n One-shot: the group id/depth being un-filtered by a Back click, armed by\n the two Back-click sites — plus the OLD (pre-render) `_bodyRect`,\n captured at the same moment, so the exiting siblings' own (frozen)\n geometry can be read as proportions of the frame they were actually\n laid out in. Resolved into `_resolvedExitTo`/`_resolvedExitToBody` (by\n finding the matching node in the *new* `_chartScene`) and cleared by\n `resolveDrillMorph`.\n */\n _pendingExitReunion?: {\n groupId: unknown;\n groupDepth: number;\n body?: {x: number; y: number; width: number; height: number};\n };\n /**\n The drill-down morph's resolved enter/exit boxes for the upcoming\n `drawScene` call, plus each one's \"body\" reference box (the full\n layout entering/exiting nodes' own geometry is proportional within —\n see `DrawOptions.enterFromBody`/`exitToBody`). Set by\n `resolveDrillMorph`, read and one-shot cleared by `_drawSceneToTarget`.\n */\n _resolvedEnterFrom?: TransitionRect;\n _resolvedEnterFromBody?: TransitionRect;\n _resolvedExitTo?: TransitionRect;\n _resolvedExitToBody?: TransitionRect;\n /** See `DrawOptions.instantExitKey` — the clicked node's own key, resolved from `_pendingEnterOrigin.key`. */\n _resolvedInstantExitKey?: string | number;\n /** See `DrawOptions.reunionEnterKey` — the Back click's reunion node's own key, resolved when `resolveDrillMorph` finds a match. */\n _resolvedReunionEnterKey?: string | number;\n /** See `DrawOptions.reunionEnterFrom` — the OLD (pre-Back) body rect, the full size the reunion node's former children occupied. */\n _resolvedReunionEnterFrom?: TransitionRect;\n /** See `DrawOptions.instantExitAll` — set alongside `_resolvedReunionEnterKey`, when a reunion match was found. */\n _resolvedInstantExitAll?: boolean;\n /** Cached measured size of the shared top-left controls panel (back/table-view/search). `measurement` is `topLeftControlsMarkup.ts`-internal (per-item positions); `signature` is the cache key (each contribution's html + resolved style). */\n _topLeftControlsBox?: {width: number; height: number; signature: string; measurement: unknown};\n\n /* 8. Plot-specific (only present on Plot subclasses) */\n _xAxis?: Axis;\n _yAxis?: Axis;\n _x2Axis?: Axis;\n _y2Axis?: Axis;\n /** The x/y data keys, when set by string (Plot's default axis titles). */\n _xKey?: string;\n _yKey?: string;\n _xFunc?: (d: DataPoint, axis?: string) => number;\n _yFunc?: (d: DataPoint, axis?: string) => number;\n /** The plot area (inside the axes) in chart content space, set by the paint phase. */\n _plotArea?: {x: number; y: number; width: number; height: number};\n /** Crosshair guide-line paint for the shared tooltip. */\n _crosshairConfig?: Record<string, unknown>;\n /**\n The active shared-tooltip hover, if any: the snapped discrete position\n (pixel + data value), the hovered Line points to mark, and which side of\n the marks the crosshair draws on.\n */\n _sharedHoverState?: {\n mode: \"shared\" | \"single\";\n axis: \"x\" | \"y\";\n px: number;\n value: unknown;\n markers: {datum: DataPoint; x: number; y: number}[];\n layer: \"back\" | \"front\";\n } | null;\n /** True while the shared multi-series tooltip owns the tooltip. */\n _sharedHoverActive?: boolean;\n /** The tooltip's own `arrow`/`thead`/`tbody`, held while the shared tooltip replaces them. */\n _sharedTooltipSaved?: {arrow: unknown; thead: unknown; tbody: unknown};\n /** Internal size scale built in Plot's pipeline; maps `_size` → pixel radius. */\n _sizeScaleD3?: D3Scale;\n /** The radius scale the chart's layout actually drew with; the size legend paints from it. Null when nothing is sized. */\n _sizeLegendFinal?: SizeLegendScale | null;\n /** Size-legend component, rendered in the bottom-right corner panel. */\n _sizeLegendClass?: SizeLegend;\n /** The bottom-right corner panel reserved in `vizDrawPure` for this draw (see `bottomRightControlsMarkup.ts`). */\n _bottomRightBox?: BottomRightBox | null;\n /** Per-axis \"is this axis time-valued\" flags, set by `formatPlotData`. */\n _xTime?: boolean;\n _x2Time?: boolean;\n _yTime?: boolean;\n _y2Time?: boolean;\n _baseline?: number;\n _stacked?: boolean;\n _stackOffset?: (series: number[][][], order: number[]) => void;\n /** d3-stack order: an accessor, or an explicit array of series keys. */\n _stackOrder?: ((series: number[][][]) => number[]) | unknown[];\n _confidence?: [number, number] | false;\n _lineLabels?: ((d: DataPoint, i: number) => boolean) | boolean;\n _lineMarkers?: boolean;\n _barPadding?: number;\n _groupPadding?: number;\n _annotations?: Record<string, unknown>[];\n _axisPersist?: boolean;\n _labelPosition?: (d: DataPoint, i: number) => \"auto\" | \"inside\" | \"outside\";\n _labelConnectorConfig?: Record<string, unknown>;\n _lineMarkerConfig?: Record<string, unknown>;\n _confidenceConfig?: Record<string, unknown>;\n /** The `trendLine` setting: a regression type, `true` (linear), or `false`. */\n _trendLine?: TrendLineType;\n _trendLineConfig?: Record<string, unknown>;\n /** The trend lines fit by `computePlotTrendFits` for the current draw. */\n _trendFits?: TrendFit[];\n _xCutoff?: number;\n _yCutoff?: number;\n _discreteCutoff?: number;\n /** Per-datum `[start, end]` along the discrete axis; makes that axis continuous (see Plot/discreteSpan.ts). */\n _discreteExtent?: (d: DataPoint) => [number, number];\n _buffer?: Record<string, unknown>;\n\n /* 9. Feature/component class references */\n _legendClass?: Legend;\n _colorScaleClass?: ColorScale;\n _timelineClass?: Timeline;\n _titleClass?: TextBox;\n _subtitleClass?: TextBox;\n _messageClass?: Message;\n _tooltipClass?: Tooltip;\n _legendSort?: (a: DataPoint, b: DataPoint) => number;\n _legendPosition?: (config: VizInstance) => string | false;\n _legend?: ((config: VizInstance, data: DataPoint[]) => boolean) | boolean;\n _legendDepth?: number;\n _colorScalePosition?: (config: VizInstance) => string | false;\n _colorScale?: false | string | ((d: DataPoint, i: number) => string);\n _title?: ((data: DataPoint[]) => string | false) | string | false;\n _subtitle?: ((data: DataPoint[]) => string | false) | string | false;\n _attribution?: string | false;\n _attributionStyle?: Record<string, unknown>;\n _timeline?: boolean;\n _total?: boolean | ((d: DataPoint[], i: number) => number);\n\n /* 10. DOM + interaction */\n _container?: D3Selection;\n /**\n Element d3-zoom binds to. Defaults to `_container` (the compute svg); the\n Canvas backend points it at the <canvas> so pan/zoom and pointer picking\n share one interaction surface.\n */\n _zoomEventTarget?: D3Selection;\n _zoomGroup?: D3Selection;\n _tileGroup?: D3Selection;\n // Opaque d3 instances (d3-tile generator, d3-zoom behavior + brush); their\n // generic types add no value at this contract boundary.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _tileGen?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _zoomBehavior?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _zoomBrush?: any;\n _zoomSet?: boolean;\n /** Whether a Geomap's themed basemap resolved dark on the latest draw. */\n _basemapDark?: boolean;\n /** Whether a Geomap is watching its backdrop for theme changes. */\n _themeWatch?: boolean;\n /** The attribution d3plus last set from the tile URL (vs. a user-set one). */\n _tileAttribution?: string | false;\n /** Whether a compact (ⓘ) attribution was clicked open. */\n _attributionPinned?: boolean;\n _zoomToBounds?: (bounds: number[][] | null, duration?: number) => void;\n _renderTiles?: (transform?: ZoomTransform, duration?: number) => void;\n /**\n Geomap only: the static (identity-transform) basemap tile list — URLs and\n projection-pixel positions — used by @d3plus/ssr to fetch + inline tiles.\n */\n _computeTileList?: () => Array<{\n key: string;\n url: string;\n x: number;\n y: number;\n size: number;\n }>;\n /** Set by @d3plus/ssr: emit ocean/tiles into the scene for a complete server render. */\n _ssr?: boolean;\n /** Set by @d3plus/ssr: pre-fetched basemap tiles keyed by `${x}-${y}-${z}` → data URI. */\n _ssrTiles?: Map<string, string>;\n _wirePlotShapeEvents?: (shape: Shape, shapeKey: string, events: string[]) => void;\n\n /* 11. Identity */\n _uuid: string;\n\n /* Pipeline shims (these are class methods on chart instances) */\n _preDraw(): void;\n _draw(callback?: () => void): void;\n /** Plot's paint phase: builds `_chartScene` from the measured context. */\n _paint?(pCtx: PlotPaintContext): VizInstance;\n _drawSceneToTarget(durationOverride?: number): void;\n _scheduleSceneRepaint(): void;\n _sceneRepaintRAF?: number;\n _thresholdFunction?(data: DataPoint[], tree?: unknown): DataPoint[];\n /** The chart's size-legend radius scale, estimated before layout for the given chart area (see `ChartDefinition.sizeLegendScale`). */\n _sizeLegendScale?(available: {width: number; height: number}): SizeLegendScale | null;\n toScene?(): SceneNode;\n config?(_?: D3plusConfig): D3plusConfig | this;\n active?(_?: unknown): unknown;\n hover?(_?: unknown): unknown;\n /* Fluent accessors invoked imperatively by features/pipeline (installFluent). */\n timeFilter?(_?: ((d: DataPoint, i: number) => boolean) | false): VizInstance;\n render?(callback?: () => void): VizInstance;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,GAqFA,oDAAoD,GAEpD;;;;AAIA,GACA,WA0WC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/charts/viz/vizTypes.ts"],"sourcesContent":["/**\n `Viz` — the typed contract for the runtime Viz surface that v4's free\n functions (plotPaint, vizPreDrawPure, vizDrawPure, runVizPipeline,\n apply*Layout stages, FeatureModules) read and write.\n\n This replaces `viz: any` across the free-function surface. The\n interface enumerates ~140 fields the audit found across the runtime\n code paths, grouped by category. Each entry is the BEST-EFFORT type\n inferred from usage; fields that are deeply chart-specific or\n loosely-shaped use `any` rather than half-accurate narrowing.\n\n Compatibility:\n - The class hierarchy (Viz/Plot/BarChart/.../Pie/Tree) already has\n `[key: string]: any` index signatures. Casting `this as Viz` from\n inside a class method is a widening, not a narrowing — TypeScript\n accepts it.\n - Chart-specific extensions (TreeViz/PieViz/etc.) can extend this\n interface to add stash slots (`_treeCtx`, `_pieData`, …). Today\n the index signature on the chart classes covers those.\n\n @module\n*/\n\nimport type {PlotZoomBase, ZoomState} from \"../Plot/plotZoom.js\";\nimport type {TrendFit, TrendLineType} from \"../Plot/trendLines.js\";\nimport type {ZoomControlIconKey} from \"../drawSteps/zoomControlsMarkup.js\";\nimport type {BottomRightBox} from \"../drawSteps/bottomRightControlsMarkup.js\";\nimport type {ZoomTransform} from \"d3-zoom\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {ClipShape, SceneNode, Transform, TransitionRect} from \"@d3plus/render\";\n\nimport type {\n Axis,\n ColorScale,\n Legend,\n Message,\n SizeLegend,\n TextBox,\n Timeline,\n Tooltip,\n} from \"../../components/index.js\";\nimport type {SizeLegendScale} from \"../../components/SizeLegend/sizeLegendLayout.js\";\nimport type {InsetKey, InsetPlacement, InsetRegion} from \"../features/insetState.js\";\nimport type Shape from \"../../shapes/Shape.js\";\nimport type {D3plusConfig, D3Scale} from \"../../utils/index.js\";\nimport type {PlotPaintContext} from \"../features/plotPaint.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type {ResolvedSpec} from \"../pipeline/resolveSpec.js\";\n\n/** Margin object with all four sides. */\nexport interface Margin {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\n/** Padding object with all four sides. */\nexport interface Padding {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\n/** One entry on the drill-down history stack (`Viz._history`), pushed by a click.shape drill-down and popped by Back. */\nexport interface DrillDownHistoryEntry {\n depth: number;\n filter?: (d: DataPoint, i: number) => boolean;\n /** `groupBy[groupDepth]`'s value for the clicked node — identifies the reunion node the Back morph grows back into. */\n groupId?: unknown;\n /** The groupBy index `groupId` was read at (== `_drawDepth` when the node was clicked). */\n groupDepth?: number;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n D3-style selection — deliberately loose. d3-selection's element/datum\n generics are invariant, so a single typed alias can't accept every\n `select(...)` result the chart code assigns to `_select`/`_container`/etc.;\n the `any` methods + index signature are the escape hatch (same rationale as\n the per-class fluent-accessor index signatures).\n*/\nexport type D3Selection = {\n node(): any;\n attr(name: string, ...args: any[]): any;\n style(name: string, ...args: any[]): any;\n selectAll(selector: string): any;\n select(selector: string | any): any;\n on(event: string, handler: any): any;\n call(...args: any[]): any;\n transition(...args: any[]): any;\n [key: string]: any;\n};\n\n/** A Renderer instance — loose to accept any backend (svg/canvas). */\nexport interface VizRenderer {\n kind: \"svg\" | \"canvas\";\n target(): {container: Element; width: number; height: number} | undefined;\n destroy(): void;\n drawScene(scene: any, opts?: any): any;\n toSVGString?(): string;\n toCanvas?(): HTMLCanvasElement;\n whenSettled?(): Promise<void>;\n [key: string]: any;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n The structural contract free functions read/write on a chart instance.\n Class instances satisfy it via their `[key: string]: any` signature;\n chart-specific extensions (TreeViz, PieViz, etc.) add stash slots.\n*/\nexport interface VizInstance {\n /**\n Post-coercion fluent storage. `any` is deliberate (see BaseClass.schema):\n accessor/const fields are stored as functions and called as such.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: Record<string, any>;\n /** Chart-internal scratch (d3 layout instances, computed derived state). */\n ctx: Record<string, unknown>;\n\n /* 1. Dimensions & layout */\n _width: number;\n _height: number;\n _margin: Margin;\n _padding: Padding;\n\n /* 2. Data & filtering */\n _data: DataPoint[];\n _filteredData: DataPoint[];\n _formattedData?: DataPoint[];\n _legendData: DataPoint[];\n _hidden: (string | number)[];\n _solo: (string | number)[];\n _filter?: (d: DataPoint, i: number) => boolean;\n _timeFilter?: (d: DataPoint, i: number) => boolean;\n _noDataMessage?: false | string | ((config: VizInstance) => string);\n\n /* 3. Grouping & aggregation */\n _groupBy: ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[];\n _depth?: number;\n _drawDepth: number;\n _discrete?: \"x\" | \"y\";\n _aggs: Record<string, (leaves: DataPoint[]) => unknown>;\n\n /* 4. Accessors */\n _id: (d: DataPoint, i: number) => string | number;\n _ids: (d: DataPoint, i: number) => string[];\n _drawLabel: (d: DataPoint, i: number, depth?: number) => string;\n _x?: (d: DataPoint, i: number) => number | Date | string;\n _y?: (d: DataPoint, i: number) => number | Date | string;\n _x2?: (d: DataPoint, i: number) => number | Date | string;\n _y2?: (d: DataPoint, i: number) => number | Date | string;\n _shape: (d: DataPoint, i: number) => string;\n _size?: (d: DataPoint, i?: number) => number;\n /** The data key `size` was set to, when it was set with a string; the size legend's default title. */\n _sizeKey?: string;\n _value?: (d: DataPoint, i: number) => number;\n _time?: (d: DataPoint, i: number) => string | number | Date;\n _sort?: ((a: DataPoint, b: DataPoint) => number) | null;\n _label?: (d: DataPoint, i: number) => string;\n _thresholdName?: (d: DataPoint, i: number) => string;\n _sum?: (d: DataPoint, i: number) => number;\n\n /* 5. Config slots */\n _xConfig?: Record<string, unknown>;\n _yConfig?: Record<string, unknown>;\n _x2Config?: Record<string, unknown>;\n _y2Config?: Record<string, unknown>;\n _backgroundConfig?: Record<string, unknown>;\n _legendConfig?: Record<string, unknown>;\n _colorScaleConfig?: Record<string, unknown>;\n _timelineConfig?: Record<string, unknown>;\n _backConfig?: Record<string, unknown>;\n _titleConfig?: Record<string, unknown>;\n _subtitleConfig?: Record<string, unknown>;\n _axisConfig?: Record<string, unknown>;\n\n /* 6. Scene & output */\n _chartScene?: SceneNode[];\n _chartTransform?: Transform;\n _chartClip?: ClipShape;\n _featurePanels?: SceneNode[];\n _shapes?: Shape[];\n _previousShapes?: string[];\n _previousAnnotations?: Record<string, string[]>;\n _zoomTransform?: Transform;\n /** Data-shape nodes the automatic `zoomMax` measures when they aren't `_chartScene`'s top level (Plot). */\n _zoomShapes?: SceneNode[];\n /** The unzoomed Plot draw an axis-rescaling zoom rescales from. */\n _plotZoomBase?: PlotZoomBase;\n /** Pending repaint that drops a Plot's zoom clip once an animated reset settles. */\n _plotUnclipTimer?: ReturnType<typeof setTimeout>;\n /**\n Chart-specific zoom: repaints for a transform and returns true, or\n returns false to fall back to picture zoom (Plot rescales its axes).\n */\n _zoomRescale?: (t: ZoomState, duration?: number) => boolean;\n /** Cleanup functions returned by `zoomControlIcons`' mount functions, keyed by button. */\n _zoomIconCleanup?: Partial<Record<ZoomControlIconKey, () => void>>;\n /** Cleanup function returned by an `attributionIcon` mount function. */\n _attributionIconCleanup?: () => void;\n\n /* 7. Lifecycle & rendering */\n _select?: D3Selection;\n _sceneTarget?: Element;\n _sceneRenderer?: VizRenderer;\n _duration: number;\n _renderer?: \"svg\" | \"canvas\";\n _renderMode?: \"full\" | \"compute\";\n _focus?: string | number | undefined;\n _active?: ((d: DataPoint, i?: number) => boolean) | false;\n _hover?: ((d: DataPoint, i?: number) => boolean) | false;\n /** True while the current hover came from a colorScale bucket swatch. */\n _hoverBucket?: boolean;\n _highlight?: ((d: DataPoint, i?: number) => boolean) | false;\n /** The `link` group this chart is registered under (see `linkGroup.ts`). */\n _linkGroup?: string;\n /** The categorical scale `initColorDefaults` created; linked charts still using it share their group's instead. */\n _autoColorScale?: unknown;\n /** Whether the search control's input is currently open. */\n _searchOpen?: boolean;\n /** The search control's current (lowercased) search term. */\n _searchTerm?: string;\n /** The `_highlight` predicate saved when the search box opened, restored when it closes. */\n _searchPrevHighlight?: ((d: DataPoint, i?: number) => boolean) | false;\n /** 0-based index of the current match within `searchMatches(...)`, once Enter/Shift+Enter has stepped to one. */\n _searchMatchIndex?: number;\n _ordinalColorScale?: ((value: string) => string) | undefined;\n _hoverDatum?: DataPoint | null;\n /** Epoch ms until which an animated transition is in flight (pointer routing pauses). */\n _transitionEndsAt?: number;\n _userHover?: number;\n _userDuration?: number;\n _dataCutoff: number;\n _brushing?: boolean;\n /** Whether the table-view toggle is currently showing the data table instead of the chart. */\n _tableView?: boolean;\n /** The data table's current page (0-indexed), when `tableViewPageSize` paginates it. */\n _tableViewPage?: number;\n /** The data table's current sort column + direction, when the user has clicked a header. */\n _tableViewSort?: {column: string; direction: \"asc\" | \"desc\"};\n /** Which dataset the data table currently shows — `viz._data` (raw) once toggled, `viz._filteredData` (aggregate) by default. */\n _tableViewDataSource?: \"raw\" | \"aggregate\";\n /** Cached first-occurrence-index lookups (exact JSON match, and groupBy-key fallback) for restoring `.data()` insertion order to the aggregate view; invalidated by comparing against the raw array reference they were built from. */\n _tableViewGroupOrder?: {data: DataPoint[]; exact: Map<string, number>; group: Map<string, number>};\n /** Timeline brush selection (timeline feature). */\n _timelineSelection?: (Date | number)[] | false;\n /** The last drawn timeline value (ms), to detect multi-period trail jumps. */\n _trailSeq?: number;\n /** The user-set data, retained to detect changes across `.data()` calls. */\n _userData?: DataPoint[] | string;\n /** Drill-down history stack (back button). */\n _history?: DrillDownHistoryEntry[];\n /**\n The local, chart-family-defined \"body rect\" flip-morph fractions are\n measured against — e.g. Treemap/Pack's margin-adjusted chart area at\n local origin, or Plot's measured axis plot rect. Set by `runChartDraw`\n (via `ChartDefinition.chartBodyRect`) or by Plot's own paint pipeline.\n */\n _bodyRect?: {x: number; y: number; width: number; height: number};\n /**\n One-shot: the clicked node's rect, captured at click time and\n normalized as fractions of the *pre-click* `_bodyRect`, armed by\n `clickShape`. Resolved into `_resolvedEnterFrom` (against the *new*\n draw's `_bodyRect`) and cleared by `resolveDrillMorph`. Also carries:\n `key`, the clicked node's own scene key, resolved into\n `_resolvedInstantExitKey` so its own exit (now filtered out of the new\n scene) is removed instantly instead of animating on top of the\n children that replace it; and, when the clicked node carried them\n (currently only Pie/Donut wedges), `parentStartAngle`/`parentEndAngle`\n — its angular range, read by the next draw's `pieEmit` to build each\n entering child wedge's `flipFromArc` (a real arc confined within that\n range, at full radius) via the actual arc generator.\n */\n _pendingEnterOrigin?: {\n fx: number; fy: number; fw: number; fh: number;\n key?: string | number;\n parentStartAngle?: number;\n parentEndAngle?: number;\n };\n /**\n One-shot: the group id/depth being un-filtered by a Back click, armed by\n the two Back-click sites — plus the OLD (pre-render) `_bodyRect`,\n captured at the same moment, so the exiting siblings' own (frozen)\n geometry can be read as proportions of the frame they were actually\n laid out in. Resolved into `_resolvedExitTo`/`_resolvedExitToBody` (by\n finding the matching node in the *new* `_chartScene`) and cleared by\n `resolveDrillMorph`.\n */\n _pendingExitReunion?: {\n groupId: unknown;\n groupDepth: number;\n body?: {x: number; y: number; width: number; height: number};\n };\n /**\n The drill-down morph's resolved enter/exit boxes for the upcoming\n `drawScene` call, plus each one's \"body\" reference box (the full\n layout entering/exiting nodes' own geometry is proportional within —\n see `DrawOptions.enterFromBody`/`exitToBody`). Set by\n `resolveDrillMorph`, read and one-shot cleared by `_drawSceneToTarget`.\n */\n _resolvedEnterFrom?: TransitionRect;\n _resolvedEnterFromBody?: TransitionRect;\n _resolvedExitTo?: TransitionRect;\n _resolvedExitToBody?: TransitionRect;\n /** See `DrawOptions.instantExitKey` — the clicked node's own key, resolved from `_pendingEnterOrigin.key`. */\n _resolvedInstantExitKey?: string | number;\n /** See `DrawOptions.reunionEnterKey` — the Back click's reunion node's own key, resolved when `resolveDrillMorph` finds a match. */\n _resolvedReunionEnterKey?: string | number;\n /** See `DrawOptions.reunionEnterFrom` — the OLD (pre-Back) body rect, the full size the reunion node's former children occupied. */\n _resolvedReunionEnterFrom?: TransitionRect;\n /** See `DrawOptions.instantExitAll` — set alongside `_resolvedReunionEnterKey`, when a reunion match was found. */\n _resolvedInstantExitAll?: boolean;\n /** Cached measured size of the shared top-left controls panel (back/table-view/search). `measurement` is `topLeftControlsMarkup.ts`-internal (per-item positions); `signature` is the cache key (each contribution's html + resolved style). */\n _topLeftControlsBox?: {width: number; height: number; signature: string; measurement: unknown};\n\n /* 8. Plot-specific (only present on Plot subclasses) */\n _xAxis?: Axis;\n _yAxis?: Axis;\n _x2Axis?: Axis;\n _y2Axis?: Axis;\n /** The x/y data keys, when set by string (Plot's default axis titles). */\n _xKey?: string;\n _yKey?: string;\n _xFunc?: (d: DataPoint, axis?: string) => number;\n _yFunc?: (d: DataPoint, axis?: string) => number;\n /** The plot area (inside the axes) in chart content space, set by the paint phase. */\n _plotArea?: {x: number; y: number; width: number; height: number};\n /** Crosshair guide-line paint for the shared tooltip. */\n _crosshairConfig?: Record<string, unknown>;\n /**\n The active shared-tooltip hover, if any: the snapped discrete position\n (pixel + data value), the hovered Line points to mark, and which side of\n the marks the crosshair draws on.\n */\n _sharedHoverState?: {\n mode: \"shared\" | \"single\";\n axis: \"x\" | \"y\";\n px: number;\n value: unknown;\n markers: {datum: DataPoint; x: number; y: number}[];\n layer: \"back\" | \"front\";\n } | null;\n /** True while the shared multi-series tooltip owns the tooltip. */\n _sharedHoverActive?: boolean;\n /** The tooltip's own `arrow`/`thead`/`tbody`, held while the shared tooltip replaces them. */\n _sharedTooltipSaved?: {arrow: unknown; thead: unknown; tbody: unknown};\n /** Internal size scale built in Plot's pipeline; maps `_size` → pixel radius. */\n _sizeScaleD3?: D3Scale;\n /** The radius scale the chart's layout actually drew with; the size legend paints from it. Null when nothing is sized. */\n _sizeLegendFinal?: SizeLegendScale | null;\n /** Size-legend component, rendered in the bottom-right corner panel. */\n _sizeLegendClass?: SizeLegend;\n /** The bottom-right corner panel reserved in `vizDrawPure` for this draw (see `bottomRightControlsMarkup.ts`). */\n _bottomRightBox?: BottomRightBox | null;\n /** Chrome being laid out for the chart's interior this pass, which claims no margin (see `pipeline/insetPlacement.ts`). */\n _insetPending?: Set<InsetKey> | null;\n /** The chrome drawn inside the chart's negative space this draw, and where. */\n _insetPlacement?: InsetPlacement | null;\n /** The default `legendPosition`/`colorScalePosition` accessors; a different one means the user picked a side. */\n _insetAutoPositions?: {legend: unknown; colorScale: unknown};\n /** Per-axis \"is this axis time-valued\" flags, set by `formatPlotData`. */\n _xTime?: boolean;\n _x2Time?: boolean;\n _yTime?: boolean;\n _y2Time?: boolean;\n _baseline?: number;\n _stacked?: boolean;\n _stackOffset?: (series: number[][][], order: number[]) => void;\n /** d3-stack order: an accessor, or an explicit array of series keys. */\n _stackOrder?: ((series: number[][][]) => number[]) | unknown[];\n _confidence?: [number, number] | false;\n _lineLabels?: ((d: DataPoint, i: number) => boolean) | boolean;\n _lineMarkers?: boolean;\n _barPadding?: number;\n _groupPadding?: number;\n _annotations?: Record<string, unknown>[];\n _axisPersist?: boolean;\n _labelPosition?: (d: DataPoint, i: number) => \"auto\" | \"inside\" | \"outside\";\n _labelConnectorConfig?: Record<string, unknown>;\n _lineMarkerConfig?: Record<string, unknown>;\n _confidenceConfig?: Record<string, unknown>;\n /** The `trendLine` setting: a regression type, `true` (linear), or `false`. */\n _trendLine?: TrendLineType;\n _trendLineConfig?: Record<string, unknown>;\n /** The trend lines fit by `computePlotTrendFits` for the current draw. */\n _trendFits?: TrendFit[];\n _xCutoff?: number;\n _yCutoff?: number;\n _discreteCutoff?: number;\n /** Per-datum `[start, end]` along the discrete axis; makes that axis continuous (see Plot/discreteSpan.ts). */\n _discreteExtent?: (d: DataPoint) => [number, number];\n _buffer?: Record<string, unknown>;\n\n /* 9. Feature/component class references */\n _legendClass?: Legend;\n _colorScaleClass?: ColorScale;\n _timelineClass?: Timeline;\n _titleClass?: TextBox;\n _subtitleClass?: TextBox;\n _messageClass?: Message;\n _tooltipClass?: Tooltip;\n _legendSort?: (a: DataPoint, b: DataPoint) => number;\n _legendPosition?: (config: VizInstance) => string | false;\n _legend?: ((config: VizInstance, data: DataPoint[]) => boolean) | boolean;\n _legendDepth?: number;\n _colorScalePosition?: (config: VizInstance) => string | false;\n _colorScale?: false | string | ((d: DataPoint, i: number) => string);\n _title?: ((data: DataPoint[]) => string | false) | string | false;\n _subtitle?: ((data: DataPoint[]) => string | false) | string | false;\n _attribution?: string | false;\n _attributionStyle?: Record<string, unknown>;\n _timeline?: boolean;\n _total?: boolean | ((d: DataPoint[], i: number) => number);\n\n /* 10. DOM + interaction */\n _container?: D3Selection;\n /**\n Element d3-zoom binds to. Defaults to `_container` (the compute svg); the\n Canvas backend points it at the <canvas> so pan/zoom and pointer picking\n share one interaction surface.\n */\n _zoomEventTarget?: D3Selection;\n _zoomGroup?: D3Selection;\n _tileGroup?: D3Selection;\n // Opaque d3 instances (d3-tile generator, d3-zoom behavior + brush); their\n // generic types add no value at this contract boundary.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _tileGen?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _zoomBehavior?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _zoomBrush?: any;\n _zoomSet?: boolean;\n /** Whether a Geomap's themed basemap resolved dark on the latest draw. */\n _basemapDark?: boolean;\n /** Whether a Geomap is watching its backdrop for theme changes. */\n _themeWatch?: boolean;\n /** The attribution d3plus last set from the tile URL (vs. a user-set one). */\n _tileAttribution?: string | false;\n /** Whether a compact (ⓘ) attribution was clicked open. */\n _attributionPinned?: boolean;\n _zoomToBounds?: (bounds: number[][] | null, duration?: number) => void;\n _renderTiles?: (transform?: ZoomTransform, duration?: number) => void;\n /**\n Geomap only: the static (identity-transform) basemap tile list — URLs and\n projection-pixel positions — used by @d3plus/ssr to fetch + inline tiles.\n */\n _computeTileList?: () => Array<{\n key: string;\n url: string;\n x: number;\n y: number;\n size: number;\n }>;\n /** Set by @d3plus/ssr: emit ocean/tiles into the scene for a complete server render. */\n _ssr?: boolean;\n /** Set by @d3plus/ssr: pre-fetched basemap tiles keyed by `${x}-${y}-${z}` → data URI. */\n _ssrTiles?: Map<string, string>;\n _wirePlotShapeEvents?: (shape: Shape, shapeKey: string, events: string[]) => void;\n\n /* 11. Identity */\n _uuid: string;\n\n /* Pipeline shims (these are class methods on chart instances) */\n _preDraw(): void;\n _draw(callback?: () => void): void;\n /** Plot's paint phase: builds `_chartScene` from the measured context. */\n _paint?(pCtx: PlotPaintContext): VizInstance;\n _drawSceneToTarget(durationOverride?: number): void;\n _scheduleSceneRepaint(): void;\n _sceneRepaintRAF?: number;\n _thresholdFunction?(data: DataPoint[], tree?: unknown): DataPoint[];\n /** The chart's size-legend radius scale, estimated before layout for the given chart area (see `ChartDefinition.sizeLegendScale`). */\n _sizeLegendScale?(available: {width: number; height: number}): SizeLegendScale | null;\n /** The region chart chrome may be drawn inside, with the chart's marks as obstacles (see `ChartDefinition.insetRegion`). */\n _insetRegion?(): InsetRegion | null;\n toScene?(): SceneNode;\n config?(_?: D3plusConfig): D3plusConfig | this;\n active?(_?: unknown): unknown;\n hover?(_?: unknown): unknown;\n highlight?(_?: unknown): unknown;\n /* Fluent accessors invoked imperatively by features/pipeline (installFluent). */\n timeFilter?(_?: ((d: DataPoint, i: number) => boolean) | false): VizInstance;\n render?(callback?: () => void): VizInstance;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,GAsFA,oDAAoD,GAEpD;;;;AAIA,GACA,WAuXC"}
|
|
@@ -71,7 +71,7 @@ var AxisBottom = /*#__PURE__*/ function(Axis) {
|
|
|
71
71
|
return AxisBottom;
|
|
72
72
|
}(Axis);
|
|
73
73
|
/**
|
|
74
|
-
|
|
74
|
+
Axis preset whose ticks are drawn below the horizontal domain path. Accepts everything the base Axis class does.
|
|
75
75
|
*/ export { AxisBottom as default };
|
|
76
76
|
|
|
77
77
|
//# sourceMappingURL=AxisBottom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Axis/AxisBottom.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Axis/AxisBottom.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n Axis preset whose ticks are drawn below the horizontal domain path. Accepts everything the base Axis class does.\n*/\nexport default class AxisBottom extends Axis {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.\n @private\n */\n constructor() {\n super();\n this.orient(\"bottom\");\n }\n}\n"],"names":["default","Axis","AxisBottom","orient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,WAAWC,IAAI,QAAO,YAAY;AAK3B,IAAA,AAAMC,2BAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,MAAM,CAAC;;;WAPKD;EAAmBD;AAHxC;;AAEA,GACA,SAAqBC,wBASpB"}
|
|
@@ -71,7 +71,7 @@ var AxisLeft = /*#__PURE__*/ function(Axis) {
|
|
|
71
71
|
return AxisLeft;
|
|
72
72
|
}(Axis);
|
|
73
73
|
/**
|
|
74
|
-
|
|
74
|
+
Axis preset whose ticks are drawn to the left of the vertical domain path. Accepts everything the base Axis class does.
|
|
75
75
|
*/ export { AxisLeft as default };
|
|
76
76
|
|
|
77
77
|
//# sourceMappingURL=AxisLeft.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Axis/AxisLeft.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Axis/AxisLeft.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n Axis preset whose ticks are drawn to the left of the vertical domain path. Accepts everything the base Axis class does.\n*/\nexport default class AxisLeft extends Axis {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.\n @private\n */\n constructor() {\n super();\n this.orient(\"left\");\n }\n}\n"],"names":["default","Axis","AxisLeft","orient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,WAAWC,IAAI,QAAO,YAAY;AAK3B,IAAA,AAAMC,yBAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,MAAM,CAAC;;;WAPKD;EAAiBD;AAHtC;;AAEA,GACA,SAAqBC,sBASpB"}
|
|
@@ -71,7 +71,7 @@ var AxisRight = /*#__PURE__*/ function(Axis) {
|
|
|
71
71
|
return AxisRight;
|
|
72
72
|
}(Axis);
|
|
73
73
|
/**
|
|
74
|
-
|
|
74
|
+
Axis preset whose ticks are drawn to the right of the vertical domain path. Accepts everything the base Axis class does.
|
|
75
75
|
*/ export { AxisRight as default };
|
|
76
76
|
|
|
77
77
|
//# sourceMappingURL=AxisRight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Axis/AxisRight.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Axis/AxisRight.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n Axis preset whose ticks are drawn to the right of the vertical domain path. Accepts everything the base Axis class does.\n*/\nexport default class AxisRight extends Axis {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.\n @private\n */\n constructor() {\n super();\n this.orient(\"right\");\n }\n}\n"],"names":["default","Axis","AxisRight","orient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,WAAWC,IAAI,QAAO,YAAY;AAK3B,IAAA,AAAMC,0BAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,MAAM,CAAC;;;WAPKD;EAAkBD;AAHvC;;AAEA,GACA,SAAqBC,uBASpB"}
|
|
@@ -71,7 +71,7 @@ var AxisTop = /*#__PURE__*/ function(Axis) {
|
|
|
71
71
|
return AxisTop;
|
|
72
72
|
}(Axis);
|
|
73
73
|
/**
|
|
74
|
-
|
|
74
|
+
Axis preset whose ticks are drawn above the horizontal domain path. Accepts everything the base Axis class does.
|
|
75
75
|
*/ export { AxisTop as default };
|
|
76
76
|
|
|
77
77
|
//# sourceMappingURL=AxisTop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Axis/AxisTop.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Axis/AxisTop.ts"],"sourcesContent":["import {default as Axis} from \"./Axis.js\";\n\n/**\n Axis preset whose ticks are drawn above the horizontal domain path. Accepts everything the base Axis class does.\n*/\nexport default class AxisTop extends Axis {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.\n @private\n */\n constructor() {\n super();\n this.orient(\"top\");\n }\n}\n"],"names":["default","Axis","AxisTop","orient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,WAAWC,IAAI,QAAO,YAAY;AAK3B,IAAA,AAAMC,wBAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,MAAM,CAAC;;;WAPKD;EAAgBD;AAHrC;;AAEA,GACA,SAAqBC,qBASpB"}
|
|
@@ -59,7 +59,16 @@ import { fontFamily as d3plusFontFamily, textWrap } from "@d3plus/text";
|
|
|
59
59
|
var wrap = textWrap().fontFamily(fF).fontSize(fS).lineHeight(axis.schema.shapeConfig.lineHeight ? axis.schema.shapeConfig.lineHeight(d, i) : undefined);
|
|
60
60
|
wrap[w](horizontal ? space : wSize - hBuff - p - axis._margin.left - axis._margin.right);
|
|
61
61
|
wrap[h](horizontal ? hSize - hBuff - p - axis._margin.top - axis._margin.bottom : space);
|
|
62
|
-
var
|
|
62
|
+
var text = tickFormat(d);
|
|
63
|
+
var res = wrap(text);
|
|
64
|
+
// A label wider than its share of the axis wraps to nothing; measure it
|
|
65
|
+
// across the whole axis instead, so the overlap pass thins the labels out.
|
|
66
|
+
if (horizontal && !rotate && "".concat(text).trim() && !res.lines.some(function(l) {
|
|
67
|
+
return l !== "";
|
|
68
|
+
})) {
|
|
69
|
+
wrap.width(wSize - p * 2);
|
|
70
|
+
res = wrap(text);
|
|
71
|
+
}
|
|
63
72
|
res.lines = res.lines.filter(function(d) {
|
|
64
73
|
return d !== "";
|
|
65
74
|
});
|
|
@@ -130,6 +139,9 @@ import { fontFamily as d3plusFontFamily, textWrap } from "@d3plus/text";
|
|
|
130
139
|
textData = textData.map(function(datum) {
|
|
131
140
|
datum.space = maxSpace - datum.fP * 2;
|
|
132
141
|
var res = calculateLabelSize(axis, datum, labelCtx);
|
|
142
|
+
// A label measured wider than its share (see `calculateLabelSize`) is
|
|
143
|
+
// painted at that width; the overlap pass below thins its neighbors.
|
|
144
|
+
if (horizontal && !datum.rotate) datum.space = Math.max(datum.space, Math.ceil(res.width));
|
|
133
145
|
return Object.assign(res, datum);
|
|
134
146
|
});
|
|
135
147
|
var reverseTextData = textData.slice().reverse();
|