@d3plus/core 4.3.0 → 4.5.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 +1820 -714
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/internal.js +7 -1
- package/es/internal.js.map +1 -1
- package/es/src/charts/AreaPlot/index.js +1 -2
- package/es/src/charts/AreaPlot/index.js.map +1 -1
- package/es/src/charts/BarChart/index.js +1 -2
- package/es/src/charts/BarChart/index.js.map +1 -1
- package/es/src/charts/BoxWhisker/index.js +1 -2
- package/es/src/charts/BoxWhisker/index.js.map +1 -1
- package/es/src/charts/BumpChart/index.js +1 -2
- package/es/src/charts/BumpChart/index.js.map +1 -1
- package/es/src/charts/Chord/applyLayout.js +205 -0
- package/es/src/charts/Chord/applyLayout.js.map +1 -0
- package/es/src/charts/Chord/emit.js +168 -0
- package/es/src/charts/Chord/emit.js.map +1 -0
- package/es/src/charts/Chord/index.js +234 -0
- package/es/src/charts/Chord/index.js.map +1 -0
- package/es/src/charts/Geomap/basemapTheme.js +78 -0
- package/es/src/charts/Geomap/basemapTheme.js.map +1 -0
- package/es/src/charts/Geomap/emit.js +18 -9
- package/es/src/charts/Geomap/emit.js.map +1 -1
- package/es/src/charts/Geomap/index.js +69 -104
- package/es/src/charts/Geomap/index.js.map +1 -1
- package/es/src/charts/LinePlot/index.js +1 -2
- package/es/src/charts/LinePlot/index.js.map +1 -1
- package/es/src/charts/Matrix/emit.js +6 -0
- package/es/src/charts/Matrix/emit.js.map +1 -1
- package/es/src/charts/Matrix/index.js +1 -2
- package/es/src/charts/Matrix/index.js.map +1 -1
- package/es/src/charts/Network/emit.js +58 -24
- package/es/src/charts/Network/emit.js.map +1 -1
- package/es/src/charts/Network/index.js +34 -54
- package/es/src/charts/Network/index.js.map +1 -1
- package/es/src/charts/Pack/emit.js +3 -0
- package/es/src/charts/Pack/emit.js.map +1 -1
- package/es/src/charts/Pack/index.js +1 -2
- package/es/src/charts/Pack/index.js.map +1 -1
- package/es/src/charts/Pie/emit.js +6 -2
- package/es/src/charts/Pie/emit.js.map +1 -1
- package/es/src/charts/Pie/index.js +1 -2
- package/es/src/charts/Pie/index.js.map +1 -1
- package/es/src/charts/Plot/index.js +26 -6
- package/es/src/charts/Plot/index.js.map +1 -1
- package/es/src/charts/Plot/pipeline.js +1 -2
- package/es/src/charts/Plot/pipeline.js.map +1 -1
- package/es/src/charts/Plot/plotZoom.js +278 -0
- package/es/src/charts/Plot/plotZoom.js.map +1 -0
- package/es/src/charts/Priestley/emit.js +4 -0
- package/es/src/charts/Priestley/emit.js.map +1 -1
- package/es/src/charts/Priestley/index.js +1 -2
- package/es/src/charts/Priestley/index.js.map +1 -1
- package/es/src/charts/Radar/emit.js +4 -1
- package/es/src/charts/Radar/emit.js.map +1 -1
- package/es/src/charts/Radar/index.js +1 -2
- package/es/src/charts/Radar/index.js.map +1 -1
- package/es/src/charts/RadialMatrix/emit.js +6 -0
- package/es/src/charts/RadialMatrix/emit.js.map +1 -1
- package/es/src/charts/RadialMatrix/index.js +1 -2
- package/es/src/charts/RadialMatrix/index.js.map +1 -1
- package/es/src/charts/Rings/emit.js +74 -8
- package/es/src/charts/Rings/emit.js.map +1 -1
- package/es/src/charts/Rings/index.js +11 -3
- package/es/src/charts/Rings/index.js.map +1 -1
- package/es/src/charts/Sankey/emit.js +55 -11
- package/es/src/charts/Sankey/emit.js.map +1 -1
- package/es/src/charts/Sankey/index.js +8 -2
- package/es/src/charts/Sankey/index.js.map +1 -1
- package/es/src/charts/StackedArea/index.js +1 -2
- package/es/src/charts/StackedArea/index.js.map +1 -1
- package/es/src/charts/Tree/emit.js +8 -2
- package/es/src/charts/Tree/emit.js.map +1 -1
- package/es/src/charts/Tree/index.js +1 -2
- package/es/src/charts/Tree/index.js.map +1 -1
- package/es/src/charts/Treemap/index.js +1 -2
- package/es/src/charts/Treemap/index.js.map +1 -1
- package/es/src/charts/definition/ChartDefinition.js.map +1 -1
- package/es/src/charts/drawSteps/backControl.js +70 -0
- package/es/src/charts/drawSteps/backControl.js.map +1 -0
- package/es/src/charts/drawSteps/controlButtonStyle.js +108 -0
- package/es/src/charts/drawSteps/controlButtonStyle.js.map +1 -0
- package/es/src/charts/drawSteps/minimap.js +370 -0
- package/es/src/charts/drawSteps/minimap.js.map +1 -0
- package/es/src/charts/drawSteps/minimapMarkup.js +147 -0
- package/es/src/charts/drawSteps/minimapMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/searchControls.js +358 -0
- package/es/src/charts/drawSteps/searchControls.js.map +1 -0
- package/es/src/charts/drawSteps/searchControlsMarkup.js +430 -0
- package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/tableView.js +173 -0
- package/es/src/charts/drawSteps/tableView.js.map +1 -0
- package/es/src/charts/drawSteps/tableViewControl.js +39 -0
- package/es/src/charts/drawSteps/tableViewControl.js.map +1 -0
- package/es/src/charts/drawSteps/tableViewMarkup.js +647 -0
- package/es/src/charts/drawSteps/tableViewMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/topLeftControls.js +73 -0
- package/es/src/charts/drawSteps/topLeftControls.js.map +1 -0
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js +227 -0
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/zoomControls.js +314 -175
- package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +280 -0
- package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +1 -0
- package/es/src/charts/features/attributionFeature.js +137 -0
- package/es/src/charts/features/attributionFeature.js.map +1 -0
- package/es/src/charts/features/axes.js +20 -8
- package/es/src/charts/features/axes.js.map +1 -1
- package/es/src/charts/features/chartGeometry.js +16 -2
- package/es/src/charts/features/chartGeometry.js.map +1 -1
- package/es/src/charts/features/edgeArrows.js +155 -0
- package/es/src/charts/features/edgeArrows.js.map +1 -0
- package/es/src/charts/features/emitHelpers.js +8 -0
- package/es/src/charts/features/emitHelpers.js.map +1 -1
- package/es/src/charts/features/ensureZoomDom.js +63 -12
- package/es/src/charts/features/ensureZoomDom.js.map +1 -1
- package/es/src/charts/features/features.js +83 -110
- package/es/src/charts/features/features.js.map +1 -1
- package/es/src/charts/features/featuresLegend.js +45 -17
- package/es/src/charts/features/featuresLegend.js.map +1 -1
- package/es/src/charts/features/plotPaint.js +32 -7
- package/es/src/charts/features/plotPaint.js.map +1 -1
- package/es/src/charts/features/zoomExtent.js +185 -0
- package/es/src/charts/features/zoomExtent.js.map +1 -0
- package/es/src/charts/helpers/tileAttributions.js +26 -0
- package/es/src/charts/helpers/tileAttributions.js.map +1 -1
- package/es/src/charts/index.js +1 -0
- package/es/src/charts/index.js.map +1 -1
- package/es/src/charts/pipeline/runVizPipeline.js +33 -14
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
- package/es/src/charts/pipeline/vizDrawPure.js +32 -6
- package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
- package/es/src/charts/viz/Viz.js +39 -51
- package/es/src/charts/viz/Viz.js.map +1 -1
- package/es/src/charts/viz/VizBase.js +157 -4
- package/es/src/charts/viz/VizBase.js.map +1 -1
- package/es/src/charts/viz/VizBaseConfig.js +32 -2
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
- package/es/src/charts/viz/vizDefaults.js +243 -50
- 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/Axis.js +10 -1
- package/es/src/components/Axis/Axis.js.map +1 -1
- package/es/src/components/Axis/axisLayoutLabels.js +2 -1
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
- package/es/src/components/Axis/axisRender.js +5 -1
- package/es/src/components/Axis/axisRender.js.map +1 -1
- package/es/src/components/Legend/legendConfig.js +86 -20
- package/es/src/components/Legend/legendConfig.js.map +1 -1
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/package.json +11 -10
- package/types/index.d.ts +1 -1
- package/types/internal.d.ts +8 -1
- package/types/src/charts/Chord/applyLayout.d.ts +43 -0
- package/types/src/charts/Chord/emit.d.ts +10 -0
- package/types/src/charts/Chord/index.d.ts +19 -0
- package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
- package/types/src/charts/Plot/index.d.ts +12 -3
- package/types/src/charts/Plot/plotZoom.d.ts +65 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +3 -1
- package/types/src/charts/drawSteps/backControl.d.ts +29 -0
- package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
- package/types/src/charts/drawSteps/minimap.d.ts +19 -0
- package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
- package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
- package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
- package/types/src/charts/drawSteps/tableView.d.ts +23 -0
- package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
- package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
- package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
- package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
- package/types/src/charts/features/attributionFeature.d.ts +21 -0
- package/types/src/charts/features/axes.d.ts +1 -1
- package/types/src/charts/features/chartGeometry.d.ts +9 -3
- package/types/src/charts/features/edgeArrows.d.ts +92 -0
- package/types/src/charts/features/emitHelpers.d.ts +11 -0
- package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
- package/types/src/charts/features/features.d.ts +32 -17
- package/types/src/charts/features/featuresLegend.d.ts +15 -0
- package/types/src/charts/features/plotPaint.d.ts +15 -2
- package/types/src/charts/features/zoomExtent.d.ts +25 -0
- package/types/src/charts/index.d.ts +1 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +6 -3
- package/types/src/charts/viz/VizBase.d.ts +86 -4
- package/types/src/charts/viz/VizBaseConfig.d.ts +20 -2
- package/types/src/charts/viz/vizDefaults.d.ts +155 -0
- package/types/src/charts/viz/vizTypes.d.ts +57 -1
- package/types/src/components/Axis/Axis.d.ts +2 -0
- package/types/src/utils/D3plusConfig.d.ts +102 -8
- package/umd/d3plus-core.full.js +39613 -35374
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5747 -4361
- package/umd/d3plus-core.js +13132 -9289
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3658 -2302
|
@@ -196,6 +196,14 @@ var vizSchema = [
|
|
|
196
196
|
key: "legendSort",
|
|
197
197
|
coerce: "identity"
|
|
198
198
|
},
|
|
199
|
+
{
|
|
200
|
+
key: "minimap",
|
|
201
|
+
coerce: "identity"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
key: "search",
|
|
205
|
+
coerce: "identity"
|
|
206
|
+
},
|
|
199
207
|
{
|
|
200
208
|
key: "svgDesc",
|
|
201
209
|
coerce: "identity"
|
|
@@ -204,6 +212,18 @@ var vizSchema = [
|
|
|
204
212
|
key: "svgTitle",
|
|
205
213
|
coerce: "identity"
|
|
206
214
|
},
|
|
215
|
+
{
|
|
216
|
+
key: "tableView",
|
|
217
|
+
coerce: "identity"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
key: "tableViewDownload",
|
|
221
|
+
coerce: "identity"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
key: "tableViewSort",
|
|
225
|
+
coerce: "identity"
|
|
226
|
+
},
|
|
207
227
|
{
|
|
208
228
|
key: "timeFilter",
|
|
209
229
|
coerce: "identity"
|
|
@@ -247,31 +267,46 @@ var vizSchema = [
|
|
|
247
267
|
viz._renderMode = "full";
|
|
248
268
|
viz.schema.ariaHidden = true;
|
|
249
269
|
viz.schema.attribution = false;
|
|
250
|
-
|
|
251
|
-
viz.schema.attributionStyle =
|
|
252
|
-
background: attributionBg,
|
|
253
|
-
border: "1px solid rgba(0, 0, 0, 0.25)",
|
|
254
|
-
color: colorContrast(attributionBg),
|
|
255
|
-
display: "block",
|
|
256
|
-
font: "400 11px/11px ".concat(fontFamilyStringify(fontFamily)),
|
|
257
|
-
margin: "5px",
|
|
258
|
-
opacity: 0.75,
|
|
259
|
-
padding: "4px 6px 3px"
|
|
260
|
-
};
|
|
261
|
-
viz._backClass = new TextBox().on("click", function() {
|
|
262
|
-
if (viz._history.length) viz.config(viz._history.pop()).render();
|
|
263
|
-
else viz.depth(viz._drawDepth - 1).filter(false);
|
|
264
|
-
viz.render();
|
|
265
|
-
}).on("mousemove", function() {
|
|
266
|
-
return viz._backClass.select().style("cursor", "pointer");
|
|
267
|
-
});
|
|
268
|
-
viz.schema.backConfig = {
|
|
269
|
-
fontSize: 10,
|
|
270
|
-
padding: 5,
|
|
271
|
-
resize: false
|
|
272
|
-
};
|
|
270
|
+
viz.schema.attributionIcon = undefined;
|
|
271
|
+
viz.schema.attributionStyle = attributionStyleDefault;
|
|
273
272
|
viz.schema.cache = true;
|
|
274
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
Default inline style for the "← Back" button — structural-only, the
|
|
276
|
+
same properties `zoomControlStyleDefault`/`searchControlStyleDefault`
|
|
277
|
+
use, except `width: "auto"` (it shows an icon + the word "Back", not a
|
|
278
|
+
single centered glyph) with a small `gap` between them and horizontal
|
|
279
|
+
padding for breathing room. Also lighter/smaller than the other two's
|
|
280
|
+
`font` (900 15px): that value is a holdover from when their icons were
|
|
281
|
+
bold Unicode glyphs sized to read clearly (the icons are SVG now, so it
|
|
282
|
+
no longer affects THEM at all) — but back is the one place that font
|
|
283
|
+
actually renders visible text, where 900 15px reads oversized/heavy.
|
|
284
|
+
No background/border/color, same as the other two: a plain
|
|
285
|
+
browser-appearance button, letting native/host-page button chrome show
|
|
286
|
+
through by default.
|
|
287
|
+
@private
|
|
288
|
+
*/ export var backControlStyleDefault = {
|
|
289
|
+
"align-items": "center",
|
|
290
|
+
display: "inline-flex",
|
|
291
|
+
font: "400 12px/1 ".concat(fontFamilyStringify(fontFamily)),
|
|
292
|
+
gap: "4px",
|
|
293
|
+
height: "20px",
|
|
294
|
+
"justify-content": "center",
|
|
295
|
+
padding: "0 6px",
|
|
296
|
+
width: "auto"
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
Back-button control styling defaults.
|
|
300
|
+
@private
|
|
301
|
+
*/ function initBackDefaults(viz) {
|
|
302
|
+
// No longer drives the button's appearance (see `.backConfig()`'s own
|
|
303
|
+
// doc comment), but `.backConfig({...})` merges into this via
|
|
304
|
+
// `assign(this.schema.backConfig, _)` — leaving it undefined makes that
|
|
305
|
+
// throw on the very first call, on every chart.
|
|
306
|
+
viz.schema.backConfig = {};
|
|
307
|
+
viz.schema.backControlClassName = undefined;
|
|
308
|
+
viz.schema.backControlStyle = backControlStyleDefault;
|
|
309
|
+
}
|
|
275
310
|
/**
|
|
276
311
|
Color accessor and color-scale defaults.
|
|
277
312
|
@private
|
|
@@ -534,11 +569,92 @@ var vizSchema = [
|
|
|
534
569
|
};
|
|
535
570
|
viz.schema.totalPadding = defaultPadding;
|
|
536
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
Default attribution styles: flush to the chart area's bottom-right corner
|
|
574
|
+
like the credit on a slippy map, in small type on a translucent backing
|
|
575
|
+
that keeps it legible over busy tiles without boxing it in. The dark
|
|
576
|
+
variant applies over a dark basemap while the style is still this
|
|
577
|
+
untouched default (compared by reference, like the zoom-control styles).
|
|
578
|
+
@private
|
|
579
|
+
*/ var attributionLightBg = "rgba(255, 255, 255, 0.7)";
|
|
580
|
+
var attributionDarkBg = "rgba(24, 25, 28, 0.7)";
|
|
581
|
+
var attributionBase = {
|
|
582
|
+
"border-radius": "3px 0 0 0",
|
|
583
|
+
display: "flex",
|
|
584
|
+
"align-items": "center",
|
|
585
|
+
gap: "4px",
|
|
586
|
+
font: "400 10px/1.4 ".concat(fontFamilyStringify(fontFamily))
|
|
587
|
+
};
|
|
588
|
+
export var attributionStyleDefault = _object_spread_props(_object_spread({}, attributionBase), {
|
|
589
|
+
background: attributionLightBg,
|
|
590
|
+
color: colorContrast(attributionLightBg)
|
|
591
|
+
});
|
|
592
|
+
export var attributionStyleDarkDefault = _object_spread_props(_object_spread({}, attributionBase), {
|
|
593
|
+
background: attributionDarkBg,
|
|
594
|
+
color: colorContrast(attributionDarkBg)
|
|
595
|
+
});
|
|
596
|
+
/**
|
|
597
|
+
Default inline styles for the zoom-control buttons — structural only
|
|
598
|
+
(sizing/spacing/typography); no color, background, border, or opacity.
|
|
599
|
+
Letting native/host-page button chrome show through by default means a
|
|
600
|
+
page styling its own buttons (Tailwind, Bootstrap, a design system) via
|
|
601
|
+
`zoomControlClassName` composes cleanly instead of fighting inline color
|
|
602
|
+
overrides. The active state (brush mode on) paints the OS accent color
|
|
603
|
+
through CSS system colors (`AccentColor`/`AccentColorText`, falling back
|
|
604
|
+
to the selection `Highlight` where unsupported), so it reads as pressed
|
|
605
|
+
in the browser's own idiom; hover gets no default styling (`false`). The
|
|
606
|
+
`.active` class, `aria-pressed`, and `:hover`/`:active` pseudo-classes
|
|
607
|
+
stay available for a host page's own CSS to hook into. Consumers who want d3plus's old
|
|
608
|
+
opinionated look can restore it via `.zoomControlStyle({...})`.
|
|
609
|
+
|
|
610
|
+
Exported as stable object references (not inlined per-instance) so
|
|
611
|
+
`zoomControls.ts` can tell, via `===`, whether a given viz's
|
|
612
|
+
`zoomControlStyle*` is still the untouched default — that's what lets
|
|
613
|
+
setting `zoomControlClassName` auto-disable the defaults without also
|
|
614
|
+
clobbering a style the caller explicitly customized themselves.
|
|
615
|
+
@private
|
|
616
|
+
*/ export var zoomControlStyleDefault = {
|
|
617
|
+
"align-items": "center",
|
|
618
|
+
display: "inline-flex",
|
|
619
|
+
font: "900 15px/1 ".concat(fontFamilyStringify(fontFamily)),
|
|
620
|
+
height: "20px",
|
|
621
|
+
"justify-content": "center",
|
|
622
|
+
padding: 0,
|
|
623
|
+
width: "20px"
|
|
624
|
+
};
|
|
625
|
+
export var zoomControlStyleActiveDefault = {
|
|
626
|
+
"background-color": "AccentColor",
|
|
627
|
+
"border-color": "AccentColor",
|
|
628
|
+
color: "AccentColorText"
|
|
629
|
+
};
|
|
630
|
+
export var zoomControlStyleHoverDefault = false;
|
|
631
|
+
/**
|
|
632
|
+
Default inline styles for the table-view toggle button — structural only,
|
|
633
|
+
mirroring `zoomControlStyleDefault` et al. so the two chrome features look
|
|
634
|
+
and behave consistently. Kept as separate object references (not shared
|
|
635
|
+
with zoom's) so `tableViewControl.ts` can independently detect, via `===`,
|
|
636
|
+
whether `tableViewControlStyle*` is still untouched — the same
|
|
637
|
+
auto-disable-on-className trick `zoomControlClassName` uses.
|
|
638
|
+
*/ export var tableViewControlStyleDefault = {
|
|
639
|
+
"align-items": "center",
|
|
640
|
+
display: "inline-flex",
|
|
641
|
+
font: "900 15px/1 ".concat(fontFamilyStringify(fontFamily)),
|
|
642
|
+
height: "20px",
|
|
643
|
+
"justify-content": "center",
|
|
644
|
+
padding: 0,
|
|
645
|
+
width: "20px"
|
|
646
|
+
};
|
|
647
|
+
export var tableViewControlStyleActiveDefault = {
|
|
648
|
+
"background-color": "AccentColor",
|
|
649
|
+
"border-color": "AccentColor",
|
|
650
|
+
color: "AccentColorText"
|
|
651
|
+
};
|
|
652
|
+
export var tableViewControlStyleHoverDefault = false;
|
|
537
653
|
/**
|
|
538
654
|
Zoom behavior, brush, control button styling, and zoom limit defaults.
|
|
539
655
|
@private
|
|
540
656
|
*/ function initZoomDefaults(viz) {
|
|
541
|
-
viz.schema.zoom =
|
|
657
|
+
viz.schema.zoom = true;
|
|
542
658
|
viz._zoomBehavior = zoom();
|
|
543
659
|
viz._zoomBrush = brush();
|
|
544
660
|
viz.schema.zoomBrushHandleSize = 1;
|
|
@@ -549,35 +665,108 @@ var vizSchema = [
|
|
|
549
665
|
fill: "#777",
|
|
550
666
|
"stroke-width": 0
|
|
551
667
|
};
|
|
552
|
-
|
|
553
|
-
viz.schema.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
display: "block",
|
|
558
|
-
font: "900 15px/21px ".concat(fontFamilyStringify(fontFamily)),
|
|
559
|
-
height: "20px",
|
|
560
|
-
margin: "5px",
|
|
561
|
-
opacity: 0.75,
|
|
562
|
-
padding: 0,
|
|
563
|
-
"text-align": "center",
|
|
564
|
-
width: "20px"
|
|
565
|
-
};
|
|
566
|
-
var zoomActiveBg = "rgba(0, 0, 0, 0.75)";
|
|
567
|
-
viz.schema.zoomControlStyleActive = {
|
|
568
|
-
background: zoomActiveBg,
|
|
569
|
-
color: colorContrast(zoomActiveBg),
|
|
570
|
-
opacity: 1
|
|
571
|
-
};
|
|
572
|
-
viz.schema.zoomControlStyleHover = {
|
|
573
|
-
cursor: "pointer",
|
|
574
|
-
opacity: 1
|
|
575
|
-
};
|
|
668
|
+
viz.schema.zoomControlClassName = undefined;
|
|
669
|
+
viz.schema.zoomControlIcons = undefined;
|
|
670
|
+
viz.schema.zoomControlStyle = zoomControlStyleDefault;
|
|
671
|
+
viz.schema.zoomControlStyleActive = zoomControlStyleActiveDefault;
|
|
672
|
+
viz.schema.zoomControlStyleHover = zoomControlStyleHoverDefault;
|
|
576
673
|
viz.schema.zoomFactor = 2;
|
|
577
|
-
viz.schema.zoomMax =
|
|
674
|
+
viz.schema.zoomMax = undefined;
|
|
578
675
|
viz.schema.zoomPadding = 20;
|
|
579
676
|
viz.schema.zoomPan = true;
|
|
580
|
-
viz.schema.zoomScroll =
|
|
677
|
+
viz.schema.zoomScroll = "modifier";
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
Table-view button + data-table defaults. Mirrors `initZoomDefaults`:
|
|
681
|
+
a chrome toggle shown by default, styled structurally (no color/
|
|
682
|
+
background) so a host page's own button styling applies through the
|
|
683
|
+
cascade once `tableViewControlClassName` is set.
|
|
684
|
+
@private
|
|
685
|
+
*/ function initTableViewDefaults(viz) {
|
|
686
|
+
viz.schema.tableView = true;
|
|
687
|
+
viz.schema.tableViewClassName = undefined;
|
|
688
|
+
viz.schema.tableViewControlClassName = undefined;
|
|
689
|
+
viz.schema.tableViewControlStyle = tableViewControlStyleDefault;
|
|
690
|
+
viz.schema.tableViewControlStyleActive = tableViewControlStyleActiveDefault;
|
|
691
|
+
viz.schema.tableViewControlStyleHover = tableViewControlStyleHoverDefault;
|
|
692
|
+
viz.schema.tableViewDownload = true;
|
|
693
|
+
viz.schema.tableViewPageSize = 50;
|
|
694
|
+
viz.schema.tableViewSort = true;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
Default inline styles for the minimap — mirrors the zoom-control defaults'
|
|
698
|
+
own reasoning (structural/neutral, easy to override or auto-disable via
|
|
699
|
+
`minimapClassName`) and the same by-reference `===` trick that lets
|
|
700
|
+
setting `minimapClassName` auto-disable an untouched default without
|
|
701
|
+
clobbering a caller's own customization.
|
|
702
|
+
@private
|
|
703
|
+
*/ export var minimapStyleDefault = {
|
|
704
|
+
background: "rgba(255, 255, 255, 0.75)",
|
|
705
|
+
border: "1px solid rgba(0, 0, 0, 0.25)",
|
|
706
|
+
"border-radius": "2px",
|
|
707
|
+
"box-sizing": "border-box"
|
|
708
|
+
};
|
|
709
|
+
export var minimapViewportStyleDefault = {
|
|
710
|
+
background: "rgba(0, 0, 0, 0.15)",
|
|
711
|
+
border: "1px solid rgba(0, 0, 0, 0.5)",
|
|
712
|
+
"border-radius": "2px",
|
|
713
|
+
cursor: "grab"
|
|
714
|
+
};
|
|
715
|
+
export var minimapViewportStyleActiveDefault = {
|
|
716
|
+
background: "rgba(0, 0, 0, 0.25)",
|
|
717
|
+
cursor: "grabbing"
|
|
718
|
+
};
|
|
719
|
+
export var minimapLabelStyleDefault = {
|
|
720
|
+
bottom: "2px",
|
|
721
|
+
right: "3px",
|
|
722
|
+
color: "rgba(0, 0, 0, 0.75)",
|
|
723
|
+
font: "400 9px/1 ".concat(fontFamilyStringify(fontFamily)),
|
|
724
|
+
"pointer-events": "none"
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
Minimap visibility and styling defaults.
|
|
728
|
+
@private
|
|
729
|
+
*/ function initMinimapDefaults(viz) {
|
|
730
|
+
viz.schema.minimap = true;
|
|
731
|
+
viz.schema.minimapClassName = undefined;
|
|
732
|
+
viz.schema.minimapStyle = minimapStyleDefault;
|
|
733
|
+
viz.schema.minimapViewportStyle = minimapViewportStyleDefault;
|
|
734
|
+
viz.schema.minimapViewportStyleActive = minimapViewportStyleActiveDefault;
|
|
735
|
+
viz.schema.minimapLabelStyle = minimapLabelStyleDefault;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
Default inline styles for the search control's toggle button — the same
|
|
739
|
+
structural-only values as `zoomControlStyleDefault` et al. (visual
|
|
740
|
+
parity by default), kept as independent objects/consumers rather than
|
|
741
|
+
shared references so restyling one doesn't affect the other.
|
|
742
|
+
@private
|
|
743
|
+
*/ export var searchControlStyleDefault = {
|
|
744
|
+
"align-items": "center",
|
|
745
|
+
display: "inline-flex",
|
|
746
|
+
font: "900 15px/1 ".concat(fontFamilyStringify(fontFamily)),
|
|
747
|
+
height: "20px",
|
|
748
|
+
"justify-content": "center",
|
|
749
|
+
padding: 0,
|
|
750
|
+
width: "20px"
|
|
751
|
+
};
|
|
752
|
+
export var searchControlStyleActiveDefault = {
|
|
753
|
+
"background-color": "AccentColor",
|
|
754
|
+
"border-color": "AccentColor",
|
|
755
|
+
color: "AccentColorText"
|
|
756
|
+
};
|
|
757
|
+
export var searchControlStyleHoverDefault = false;
|
|
758
|
+
/**
|
|
759
|
+
Search-control (toggle button + input) styling defaults.
|
|
760
|
+
@private
|
|
761
|
+
*/ function initSearchDefaults(viz) {
|
|
762
|
+
viz.schema.search = true;
|
|
763
|
+
viz.schema.searchAccessor = function(d, i) {
|
|
764
|
+
return viz._drawLabel(d, i);
|
|
765
|
+
};
|
|
766
|
+
viz.schema.searchControlClassName = undefined;
|
|
767
|
+
viz.schema.searchControlStyle = searchControlStyleDefault;
|
|
768
|
+
viz.schema.searchControlStyleActive = searchControlStyleActiveDefault;
|
|
769
|
+
viz.schema.searchControlStyleHover = searchControlStyleHoverDefault;
|
|
581
770
|
}
|
|
582
771
|
/**
|
|
583
772
|
Seeds a fresh Viz instance's schema defaults and installs the identity-coerce
|
|
@@ -600,6 +789,10 @@ var vizSchema = [
|
|
|
600
789
|
initShapeDefaults(viz);
|
|
601
790
|
initLabelDefaults(viz);
|
|
602
791
|
initZoomDefaults(viz);
|
|
792
|
+
initTableViewDefaults(viz);
|
|
793
|
+
initMinimapDefaults(viz);
|
|
794
|
+
initBackDefaults(viz);
|
|
795
|
+
initSearchDefaults(viz);
|
|
603
796
|
}
|
|
604
797
|
|
|
605
798
|
//# sourceMappingURL=vizDefaults.js.map
|
|
@@ -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 {formatAbbreviate} from \"@d3plus/format\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {fontFamily, fontFamilyStringify} from \"@d3plus/text\";\n\nimport {ColorScale, Legend, TextBox, Timeline, Tooltip} from \"../../components/index.js\";\nimport Message from \"../../components/Message.js\";\nimport {accessor, constant} from \"../../utils/index.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: \"svgDesc\", coerce: \"identity\" as const},\n {key: \"svgTitle\", 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 const attributionBg = \"rgba(255, 255, 255, 0.75)\";\n viz.schema.attributionStyle = {\n background: attributionBg,\n border: \"1px solid rgba(0, 0, 0, 0.25)\",\n color: colorContrast(attributionBg),\n display: \"block\",\n font: `400 11px/11px ${fontFamilyStringify(fontFamily)}`,\n margin: \"5px\",\n opacity: 0.75,\n padding: \"4px 6px 3px\",\n };\n viz._backClass = new TextBox()\n .on(\"click\", () => {\n if (viz._history.length) viz.config(viz._history.pop()).render();\n else (viz.depth(viz._drawDepth - 1) as Viz).filter(false);\n viz.render();\n })\n .on(\"mousemove\", () =>\n viz._backClass.select().style(\"cursor\", \"pointer\"),\n );\n viz.schema.backConfig = {\n fontSize: 10,\n padding: 5,\n resize: false,\n };\n viz.schema.cache = true;\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 viz._colorDefaults = {\n ...colorDefaults,\n scale: scaleOrdinal().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.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 visibility, class instance, 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 fontColor: undefined,\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}\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._colorDefaults);\n },\n labelConfig: {\n fontColor: (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);\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 Zoom behavior, brush, control button styling, and zoom limit defaults.\n @private\n*/\nfunction initZoomDefaults(viz: Viz): void {\n viz.schema.zoom = false;\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 const zoomBg = \"rgba(255, 255, 255, 0.75)\";\n viz.schema.zoomControlStyle = {\n background: zoomBg,\n border: \"1px solid rgba(0, 0, 0, 0.75)\",\n color: colorContrast(zoomBg),\n display: \"block\",\n font: `900 15px/21px ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n margin: \"5px\",\n opacity: 0.75,\n padding: 0,\n \"text-align\": \"center\",\n width: \"20px\",\n };\n const zoomActiveBg = \"rgba(0, 0, 0, 0.75)\";\n viz.schema.zoomControlStyleActive = {\n background: zoomActiveBg,\n color: colorContrast(zoomActiveBg),\n opacity: 1,\n };\n viz.schema.zoomControlStyleHover = {\n cursor: \"pointer\",\n opacity: 1,\n };\n viz.schema.zoomFactor = 2;\n viz.schema.zoomMax = 16;\n viz.schema.zoomPadding = 20;\n viz.schema.zoomPan = true;\n viz.schema.zoomScroll = true;\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}\n"],"names":["max","brush","color","scaleOrdinal","zoom","colorAssign","colorContrast","colorDefaults","formatAbbreviate","fontFamily","fontFamilyStringify","ColorScale","Legend","TextBox","Timeline","Tooltip","Message","accessor","constant","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","attributionBg","attributionStyle","background","border","display","font","margin","opacity","padding","_backClass","on","_history","length","config","pop","render","depth","_drawDepth","filter","select","style","backConfig","fontSize","resize","cache","initColorDefaults","d","i","groupBy","_colorDefaults","scale","range","_colorScaleClass","colorScaleConfig","axisConfig","rounding","colorScalePadding","colorScalePosition","width","height","colorScaleMaxSize","initDataDefaults","_data","dataCutoff","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","downloadButton","downloadConfig","type","downloadPosition","duration","_hidden","hiddenColor","hiddenOpacity","initLegendDefaults","legend","arr","maxGrouped","id","_legendDepth","bind","Array","_legendClass","legendConfig","label","shapeConfig","ariaLabel","labelConfig","fontColor","fontResize","legendFilterInvert","legendPadding","legendPosition","legendSort","a","b","_drawLabel","localeCompare","legendTooltip","initMessageDefaults","loadingHTML","translate","loadingMessage","_lrucache","_messageClass","messageMask","messageStyle","bottom","left","position","right","top","noDataHTML","noDataMessage","initEventDefaults","_queue","applyResize","entries","contentRect","_autoWidth","_autoHeight","_setSVGSize","_callback","debouncedResize","_resizeObserver","ResizeObserver","_resizeSettled","scrollContainer","initShapeDefaults","shape","_shapes","fill","__d3plus__","data","colorScale","c","_colorScale","colors","domain","JSON","stringify","colorOrdinal","_ordinalColorScale","stroke","col","darker","role","strokeWidth","_solo","initLabelDefaults","_subtitleClass","subtitleConfig","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","initZoomDefaults","_zoomBehavior","_zoomBrush","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomBg","zoomControlStyle","zoomActiveBg","zoomControlStyleActive","zoomControlStyleHover","cursor","zoomFactor","zoomMax","zoomPadding","zoomPan","zoomScroll","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,gBAAgB,QAAO,iBAAiB;AAEhD,SAAQC,UAAU,EAAEC,mBAAmB,QAAO,eAAe;AAE7D,SAAQC,UAAU,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,QAAO,4BAA4B;AACzF,OAAOC,aAAa,8BAA8B;AAClD,SAAQC,QAAQ,EAAEC,QAAQ,QAAO,uBAAuB;AACxD,SAAQC,aAAa,QAAO,kBAAkB;AAE9C,SAAQC,WAAW,QAAO,6BAA6B;AACvD,OAAOC,gBAAgB,2BAA2B;AAClD,OAAOC,iBAAiB,4BAA4B;AACpD,OAAOC,gBAAgB,0BAA0B;AACjD,OAAOC,g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IACzE,sEAAsE;IACtE,mEAAmE;IACnE,mDAAmD;IACnD/N,cAAcwC,KAAKJ;IACnBG,iBAAiBC;IACjB+B,kBAAkB/B;IAClB+C,iBAAiB/C;IACjB8D,mBAAmB9D;IACnBuF,oBAAoBvF;IACpBsG,kBAAkBtG;IAClBoH,kBAAkBpH;IAClByI,kBAAkBzI;IAClBqK,iBAAiBrK;AACnB"}
|
|
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 {formatAbbreviate} from \"@d3plus/format\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {fontFamily, fontFamilyStringify} from \"@d3plus/text\";\n\nimport {ColorScale, Legend, TextBox, Timeline, Tooltip} from \"../../components/index.js\";\nimport Message from \"../../components/Message.js\";\nimport {accessor, constant} from \"../../utils/index.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 viz._colorDefaults = {\n ...colorDefaults,\n scale: scaleOrdinal().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.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 visibility, class instance, 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 fontColor: undefined,\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}\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._colorDefaults);\n },\n labelConfig: {\n fontColor: (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);\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","formatAbbreviate","fontFamily","fontFamilyStringify","ColorScale","Legend","TextBox","Timeline","Tooltip","Message","accessor","constant","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","_colorDefaults","scale","range","_colorScaleClass","colorScaleConfig","axisConfig","rounding","colorScalePadding","colorScalePosition","colorScaleMaxSize","initDataDefaults","_data","dataCutoff","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","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","fontResize","legendFilterInvert","legendPadding","legendPosition","legendSort","a","b","_drawLabel","localeCompare","legendTooltip","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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 {ZoomTransform} from \"d3-zoom\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {ClipShape, SceneNode, Transform} from \"@d3plus/render\";\n\nimport type {\n Axis,\n ColorScale,\n Legend,\n Message,\n TextBox,\n Timeline,\n Tooltip,\n} from \"../../components/index.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/* 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 _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\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 _ordinalColorScale?: ((value: string) => string) | undefined;\n _hoverDatum?: DataPoint | null;\n _userHover?: number;\n _userDuration?: number;\n _dataCutoff: number;\n _brushing?: boolean;\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?: DataPoint[];\n\n /* 8. Plot-specific (only present on Plot subclasses) */\n _xAxis?: Axis;\n _yAxis?: Axis;\n _x2Axis?: Axis;\n _y2Axis?: Axis;\n _xFunc?: (d: DataPoint, axis?: string) => number;\n _yFunc?: (d: DataPoint, axis?: string) => number;\n /** Internal size scale built in Plot's pipeline; maps `_size` → pixel radius. */\n _sizeScaleD3?: D3Scale;\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 _xCutoff?: number;\n _yCutoff?: number;\n _discreteCutoff?: 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 _backClass?: 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 _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 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,GAqEA,oDAAoD,GAEpD;;;;AAIA,GACA,WAyNC"}
|
|
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 {ZoomControlIconKey} from \"../drawSteps/zoomControlsMarkup.js\";\nimport type {ZoomTransform} from \"d3-zoom\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {ClipShape, SceneNode, Transform} from \"@d3plus/render\";\n\nimport type {\n Axis,\n ColorScale,\n Legend,\n Message,\n TextBox,\n Timeline,\n Tooltip,\n} from \"../../components/index.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/* 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 _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 _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?: DataPoint[];\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 _xFunc?: (d: DataPoint, axis?: string) => number;\n _yFunc?: (d: DataPoint, axis?: string) => number;\n /** Internal size scale built in Plot's pipeline; maps `_size` → pixel radius. */\n _sizeScaleD3?: D3Scale;\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 _xCutoff?: number;\n _yCutoff?: number;\n _discreteCutoff?: 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 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,GAuEA,oDAAoD,GAEpD;;;;AAIA,GACA,WAmQC"}
|