@bicharts/chart-host 0.6.113 → 0.6.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +94 -5
  2. package/dist/adapters.mjs +3 -3
  3. package/dist/card.mjs +2 -2
  4. package/dist/category-colours.mjs +275 -0
  5. package/dist/{chunk-7XT5OJ6M.mjs → chunk-63IUMWY2.mjs} +40 -3
  6. package/dist/{chunk-AEO5SFEQ.mjs → chunk-EFKGSDFF.mjs} +1 -1
  7. package/dist/{chunk-TE54AFRN.mjs → chunk-GZSYTDFN.mjs} +531 -393
  8. package/dist/{chunk-PELRAFYZ.mjs → chunk-IW6BKFF5.mjs} +1 -1
  9. package/dist/{chunk-OLCUKXKL.mjs → chunk-JMLSNV5Q.mjs} +1 -1
  10. package/dist/chunk-JTZTTJJK.mjs +244 -0
  11. package/dist/{chunk-FIG5DIW7.mjs → chunk-K2TH7D5V.mjs} +335 -335
  12. package/dist/{chunk-KY4FI2HA.mjs → chunk-QG5TENI3.mjs} +5 -1
  13. package/dist/{chunk-KGVNZR23.mjs → chunk-RLOIA7QK.mjs} +1 -1
  14. package/dist/{chunk-IL5M7K6Z.mjs → chunk-TUZCM7SX.mjs} +2 -2
  15. package/dist/{chunk-GTJG3SMD.mjs → chunk-VGJH63LZ.mjs} +1 -1
  16. package/dist/{chunk-2KLFIGTQ.mjs → chunk-ZZBX5ZJ6.mjs} +145 -18
  17. package/dist/dax.mjs +23 -1
  18. package/dist/index.mjs +97 -16
  19. package/dist/legend-fit.mjs +3 -3
  20. package/dist/page.mjs +7 -5
  21. package/dist/provinces.mjs +4 -4
  22. package/dist/react.mjs +18 -14
  23. package/dist/testing.mjs +1 -1
  24. package/dist/types/categoryColours.d.ts +71 -0
  25. package/dist/types/contract.d.ts +16 -3
  26. package/dist/types/dax.d.ts +26 -0
  27. package/dist/types/filterScope.d.ts +52 -4
  28. package/dist/types/fit.d.ts +6 -1
  29. package/dist/types/fitDom.d.ts +13 -0
  30. package/dist/types/host.d.ts +19 -5
  31. package/dist/types/index.d.ts +7 -4
  32. package/dist/types/keyboardMarks.d.ts +1 -1
  33. package/dist/types/markFollower.d.ts +21 -0
  34. package/dist/types/page.d.ts +1 -1
  35. package/dist/types/qualifyTable.d.ts +52 -0
  36. package/dist/types/react.d.ts +11 -3
  37. package/dist/types/selectionMarker.d.ts +92 -0
  38. package/dist/zoom-memory.mjs +1 -1
  39. package/package.json +6 -1
  40. /package/dist/{chunk-5YSZABCS.mjs → chunk-LXTW6YII.mjs} +0 -0
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatSourceDateFor,
6
6
  isExcelDateFormat,
7
7
  normaliseAggregation
8
- } from "./chunk-OLCUKXKL.mjs";
8
+ } from "./chunk-JMLSNV5Q.mjs";
9
9
  import {
10
10
  captureSvgSnapshot,
11
11
  chartSvgOf,
@@ -15,7 +15,7 @@ import {
15
15
  svgNaturalSize,
16
16
  svgToDataUrl,
17
17
  tableHostOf
18
- } from "./chunk-PELRAFYZ.mjs";
18
+ } from "./chunk-IW6BKFF5.mjs";
19
19
  import {
20
20
  ANNOTATION_CLASS,
21
21
  ANNOTATION_LAYER_CLASS,
@@ -35,15 +35,19 @@ import {
35
35
  LABEL_CONTRAST_DONE_ATTR,
36
36
  LABEL_PILL_CLASS,
37
37
  LIGHT_TEXT,
38
+ MAP_SELECTION_MARKER_DEFAULT,
39
+ MARK_MOVE_ATTRIBUTES,
38
40
  MIN_CONTRAST,
39
- MIN_RAMP_FILLS,
41
+ NEUTRAL_CENTRE_RAMP_SELECTOR,
40
42
  PAGE_MATCH_TOLERANCE,
41
43
  PILL_MIN_ALPHA,
42
44
  PILL_MIN_COVERAGE,
43
45
  PILL_OPAQUE_ALPHA,
46
+ REGION_JOIN_COLUMN,
44
47
  ROW_GROWTH_MIN_EXTRA,
45
48
  ROW_GROWTH_MIN_RATIO,
46
- SAME_SHADE_DELTA_E,
49
+ SELECTION_MARKER_DEFAULT,
50
+ SELECTION_OUTLINE_CLASS,
47
51
  STRADDLE_COLS,
48
52
  STRADDLE_MIN_SHARE,
49
53
  STRADDLE_PILL_ALPHA,
@@ -65,38 +69,45 @@ import {
65
69
  bytesToBase64,
66
70
  cellSuppressesNormalize,
67
71
  censusClippedText,
68
- censusColourSpread,
69
72
  censusMarks,
70
73
  censusValuePlacement,
71
74
  cleanFilterScope,
72
75
  cleanHostSelection,
73
76
  clippedTextFlag,
74
77
  codeHasKeyboardStamp,
75
- colourSpreadFlag,
78
+ collectOutlineMarks,
76
79
  compileRenderFn,
77
80
  compositeOver,
78
81
  contrastRatio,
82
+ controlBoxesIn,
79
83
  createChartGroup,
80
84
  createChartHost,
81
85
  decideLabelColor,
82
- deltaEHex,
83
86
  excelNumberFormat,
84
87
  excelSerial,
85
88
  explainRenderFailure,
86
89
  exportFileName,
87
90
  exportFormatsFor,
88
91
  exportTableService,
92
+ followMarks,
89
93
  glyphSampleGrid,
94
+ hasNeutralCentreRamp,
90
95
  installKeyboard,
91
96
  invalidSentinelReason,
97
+ isAreaMark,
92
98
  isBlankRender,
93
99
  isInvalidSentinelError,
94
100
  isPillBackdropAlpha,
101
+ isRegionMapData,
95
102
  minContrastOver,
96
103
  newIdScope,
97
104
  noopViewStateProvider,
105
+ outlineWindowOf,
106
+ paintSelectionOutlines,
98
107
  pickColorOver,
99
108
  pillBacksGlyph,
109
+ readMapSelectionMarker,
110
+ readSelectionMarker,
100
111
  relativeLuminance,
101
112
  rememberFocus,
102
113
  requiredD3Plugins,
@@ -106,6 +117,7 @@ import {
106
117
  rowGrowthNotice,
107
118
  rowNameOf,
108
119
  scopeChartIds,
120
+ selectionMarkerFor,
109
121
  sessionViewStateProvider,
110
122
  sheetName,
111
123
  straddleSampleGrid,
@@ -119,7 +131,7 @@ import {
119
131
  toSourceRows,
120
132
  trackFocus,
121
133
  valuePlacementFlag
122
- } from "./chunk-TE54AFRN.mjs";
134
+ } from "./chunk-GZSYTDFN.mjs";
123
135
  import {
124
136
  LASSO_AXES_SLOT,
125
137
  LASSO_COUNT_CLASS,
@@ -146,13 +158,13 @@ import {
146
158
  lassoVerdict,
147
159
  pointInShape,
148
160
  registerLassoAction
149
- } from "./chunk-IL5M7K6Z.mjs";
161
+ } from "./chunk-TUZCM7SX.mjs";
150
162
  import {
151
163
  MIN_HIT_BAND_PX,
152
164
  censusHitBands,
153
165
  ensureCrossfilterHitTargets,
154
166
  hitBandFlag
155
- } from "./chunk-AEO5SFEQ.mjs";
167
+ } from "./chunk-EFKGSDFF.mjs";
156
168
  import {
157
169
  CONTAINER_SLOT_PRESS_AT,
158
170
  DRAG_NOT_CLICK_PX,
@@ -177,7 +189,7 @@ import {
177
189
  selectionRuleOf,
178
190
  trackPress,
179
191
  validRowSet
180
- } from "./chunk-KGVNZR23.mjs";
192
+ } from "./chunk-RLOIA7QK.mjs";
181
193
  import {
182
194
  AXIS_PIN_BAND_PAD_PX,
183
195
  AXIS_PIN_MAX_BAND_FRACTION,
@@ -202,11 +214,12 @@ import {
202
214
  planFrameGrow,
203
215
  planScrollRestore,
204
216
  rememberScroll,
217
+ restoreInnerScroll,
205
218
  scrollFitFor,
206
219
  svgInkReach,
207
220
  takeScroll,
208
221
  unpinScrolledAxis
209
- } from "./chunk-7XT5OJ6M.mjs";
222
+ } from "./chunk-63IUMWY2.mjs";
210
223
  import {
211
224
  clearGeoCache,
212
225
  geoAssetFor,
@@ -214,12 +227,19 @@ import {
214
227
  loadGeo,
215
228
  registerGeo,
216
229
  registerGeoAsset
217
- } from "./chunk-5YSZABCS.mjs";
230
+ } from "./chunk-LXTW6YII.mjs";
218
231
  import {
219
232
  Ot,
220
233
  l,
221
234
  o
222
- } from "./chunk-FIG5DIW7.mjs";
235
+ } from "./chunk-K2TH7D5V.mjs";
236
+ import {
237
+ MIN_RAMP_FILLS,
238
+ SAME_SHADE_DELTA_E,
239
+ censusColourSpread,
240
+ colourSpreadFlag,
241
+ deltaEHex
242
+ } from "./chunk-JTZTTJJK.mjs";
223
243
  import "./chunk-A2GMXZP7.mjs";
224
244
  import {
225
245
  ACTIVE_TICK_CLASS,
@@ -234,6 +254,7 @@ import {
234
254
  ANIM_PLAY_SPEED_MIN,
235
255
  APPROXIMATE_POSITIONS_DEFAULT,
236
256
  AXIS_FILTER_CLASS,
257
+ CATEGORY_DELTA_E_FLOOR,
237
258
  COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT,
238
259
  COLOR_SCALE_SELF_CLAMP_PCT_MAX,
239
260
  COLOR_SCALE_SELF_CLAMP_PCT_MIN,
@@ -270,13 +291,14 @@ import {
270
291
  SELECTION_RULE_ATTR,
271
292
  SELECTION_RULE_CLICKED_MARKS,
272
293
  SNAPSHOT_SVG_ATTR,
294
+ TABLE_SCROLLER_CLASS,
273
295
  VALUE_AXIS_BASELINE_DEFAULT,
274
296
  VIEW_ONLY_UI_STATE_KEYS,
275
297
  XFILTER_REFRESH_EVENT,
276
298
  chartOwnsTimeline,
277
299
  periodTickSuppressesFeedback,
278
300
  withoutViewOnlyKeys
279
- } from "./chunk-KY4FI2HA.mjs";
301
+ } from "./chunk-QG5TENI3.mjs";
280
302
  import "./chunk-GHODWOAL.mjs";
281
303
 
282
304
  // src/hostLinks.ts
@@ -1372,6 +1394,42 @@ function inlineFilterGate(rowCount) {
1372
1394
  var INLINE_FILTER_MIN_ROWS = 8;
1373
1395
 
1374
1396
  // src/qualifyTable.ts
1397
+ var QUALIFY_KIND_BADGES = Object.freeze({
1398
+ app: Object.freeze({
1399
+ label: "App",
1400
+ light: Object.freeze({ background: "#FCE7E3", text: "#923121" }),
1401
+ dark: Object.freeze({ background: "#612116", text: "#FCE7E3" })
1402
+ }),
1403
+ table: Object.freeze({
1404
+ label: "Table",
1405
+ light: Object.freeze({ background: "#E6EBF2", text: "#35445A" }),
1406
+ dark: Object.freeze({ background: "#232D3C", text: "#E6EBF2" })
1407
+ }),
1408
+ map: Object.freeze({
1409
+ label: "Map",
1410
+ light: Object.freeze({ background: "#E1F3EF", text: "#175C52" }),
1411
+ dark: Object.freeze({ background: "#103D37", text: "#E1F3EF" })
1412
+ }),
1413
+ kpi: Object.freeze({
1414
+ label: "KPI",
1415
+ light: Object.freeze({ background: "#FBF0D6", text: "#7E560C" }),
1416
+ dark: Object.freeze({ background: "#543A08", text: "#FBF0D6" })
1417
+ })
1418
+ });
1419
+ function qualifyKindBadgeStyle(kind, pane) {
1420
+ const k2 = knownKind(kind);
1421
+ if (!k2) return null;
1422
+ const badge = QUALIFY_KIND_BADGES[k2];
1423
+ if (typeof pane === "object") {
1424
+ const fg = pane.highContrastForeground;
1425
+ return { label: badge.label, background: "transparent", color: fg, border: `1px solid ${fg}` };
1426
+ }
1427
+ const c2 = pane === "dark" ? badge.dark : badge.light;
1428
+ return { label: badge.label, background: c2.background, color: c2.text, border: "none" };
1429
+ }
1430
+ function knownKind(v2) {
1431
+ return typeof v2 === "string" && Object.prototype.hasOwnProperty.call(QUALIFY_KIND_BADGES, v2) ? v2 : null;
1432
+ }
1375
1433
  function qualifyTableRows(rows) {
1376
1434
  return rows.map((r2) => ({
1377
1435
  rank: typeof r2.rank === "number" && Number.isFinite(r2.rank) ? r2.rank : null,
@@ -1381,7 +1439,8 @@ function qualifyTableRows(rows) {
1381
1439
  description: r2.description ?? "",
1382
1440
  language: r2.language ? r2.language : null,
1383
1441
  renderer: r2.renderer ? r2.renderer : null,
1384
- alsoWorthALook: r2.alsoWorthALook === true
1442
+ alsoWorthALook: r2.alsoWorthALook === true,
1443
+ kind: knownKind(r2.kind)
1385
1444
  }));
1386
1445
  }
1387
1446
 
@@ -2338,6 +2397,7 @@ export {
2338
2397
  AXIS_PIN_MIN_LABELS,
2339
2398
  AXIS_PIN_TRACK_REACH_PX,
2340
2399
  BACKING_MAJORITY,
2400
+ CATEGORY_DELTA_E_FLOOR,
2341
2401
  CHOOSER_MIN_HEIGHT_PX,
2342
2402
  CHOOSER_MIN_WIDTH_PX,
2343
2403
  CLIP_TOLERANCE_PX,
@@ -2411,9 +2471,11 @@ export {
2411
2471
  LIGHT_TEXT,
2412
2472
  LIMIT_COUNT_MAX,
2413
2473
  LIVE_OPTION_KEYS,
2474
+ MAP_SELECTION_MARKER_DEFAULT,
2414
2475
  MARKS_INERT_CLASS,
2415
2476
  MARK_CLASS,
2416
2477
  MARK_KEY_ATTR,
2478
+ MARK_MOVE_ATTRIBUTES,
2417
2479
  MARK_SELECTED_CLASS,
2418
2480
  MAX_FRAME_GROW_FACTOR,
2419
2481
  MAX_MAP_POINTS_DEFAULT,
@@ -2423,6 +2485,7 @@ export {
2423
2485
  MIN_DELTA_E,
2424
2486
  MIN_HIT_BAND_PX,
2425
2487
  MIN_RAMP_FILLS,
2488
+ NEUTRAL_CENTRE_RAMP_SELECTOR,
2426
2489
  NOTE_STYLE_ATTR,
2427
2490
  NO_ROW_MARKS_ATTR,
2428
2491
  OPTIONS_VOCABULARY,
@@ -2441,10 +2504,12 @@ export {
2441
2504
  PILL_OPAQUE_ALPHA,
2442
2505
  PRODUCT_FEEDBACK_MAX_CHARS,
2443
2506
  PRODUCT_FEEDBACK_MIN_CHARS,
2507
+ QUALIFY_KIND_BADGES,
2444
2508
  QUALIFY_REFUSAL_UNSPECIFIED,
2445
2509
  QUALIFY_TILE_REFUSAL_CODES,
2446
2510
  QUALIFY_TOO_SMALL_HEADING,
2447
2511
  RECOVERY_UNREACHABLE_MESSAGE,
2512
+ REGION_JOIN_COLUMN,
2448
2513
  ROW_GROWTH_MIN_EXTRA,
2449
2514
  ROW_GROWTH_MIN_RATIO,
2450
2515
  ROW_IDX_ATTR,
@@ -2454,6 +2519,8 @@ export {
2454
2519
  SEASONAL_MARKERS_DEFAULT,
2455
2520
  SELECTION_ACTIVE_CLASS,
2456
2521
  SELECTION_GLYPH_CLASS,
2522
+ SELECTION_MARKER_DEFAULT,
2523
+ SELECTION_OUTLINE_CLASS,
2457
2524
  SELECTION_RULE_ATTR,
2458
2525
  SELECTION_RULE_CLICKED_MARKS,
2459
2526
  SNAPSHOT_SVG_ATTR,
@@ -2462,6 +2529,7 @@ export {
2462
2529
  STRADDLE_PILL_ALPHA,
2463
2530
  STRADDLE_ROWS,
2464
2531
  STRADDLE_TARGET_CONTRAST,
2532
+ TABLE_SCROLLER_CLASS,
2465
2533
  TRANSPORT_LOST_CHECKING_MESSAGE,
2466
2534
  VALUE_AXIS_BASELINE_DEFAULT,
2467
2535
  VALUE_AXIS_MIN_FIT,
@@ -2512,6 +2580,7 @@ export {
2512
2580
  codeReadsDatesInLocalTime,
2513
2581
  codeReadsOption,
2514
2582
  collectD3GlyphCenters,
2583
+ collectOutlineMarks,
2515
2584
  colourSpreadFlag,
2516
2585
  compileRenderFn,
2517
2586
  compileTrivialSource,
@@ -2522,6 +2591,7 @@ export {
2522
2591
  confirmLaunch,
2523
2592
  contentExtentOf,
2524
2593
  contrastRatio,
2594
+ controlBoxesIn,
2525
2595
  createChartGroup,
2526
2596
  createChartHost,
2527
2597
  createMarkResolver,
@@ -2546,6 +2616,7 @@ export {
2546
2616
  fingerprintComponentDigest,
2547
2617
  fitReadingFor,
2548
2618
  fitRenderedChart,
2619
+ followMarks,
2549
2620
  formatSourceDate,
2550
2621
  formatSourceDateFor,
2551
2622
  generationCancelledMessage,
@@ -2553,6 +2624,7 @@ export {
2553
2624
  geoFromCache,
2554
2625
  gestureWasDrag,
2555
2626
  glyphSampleGrid,
2627
+ hasNeutralCentreRamp,
2556
2628
  hasRefusalsToShow,
2557
2629
  hitBandFlag,
2558
2630
  hostLinkServices,
@@ -2562,6 +2634,7 @@ export {
2562
2634
  installKeyboard,
2563
2635
  installLasso,
2564
2636
  invalidSentinelReason,
2637
+ isAreaMark,
2565
2638
  isBlankRender,
2566
2639
  isBlindMarker,
2567
2640
  isDuplicateGenerate,
@@ -2574,6 +2647,7 @@ export {
2574
2647
  isPhantomBox,
2575
2648
  isPickableModelCode,
2576
2649
  isPillBackdropAlpha,
2650
+ isRegionMapData,
2577
2651
  labelBand,
2578
2652
  lassoActions,
2579
2653
  lassoEffect,
@@ -2605,7 +2679,9 @@ export {
2605
2679
  normalizeFilterTerm,
2606
2680
  orderMostDistinct,
2607
2681
  orderRefusalsForDisplay,
2682
+ outlineWindowOf,
2608
2683
  paintSelectionGlyphs,
2684
+ paintSelectionOutlines,
2609
2685
  parsePendingGenerate,
2610
2686
  pendingRecoveryNextDelayMs,
2611
2687
  pendingRecoveryRemainingMs,
@@ -2629,13 +2705,16 @@ export {
2629
2705
  qualifyFilterCountText,
2630
2706
  qualifyFilterGate,
2631
2707
  qualifyGroupHeadingFor,
2708
+ qualifyKindBadgeStyle,
2632
2709
  qualifyPick,
2633
2710
  qualifyRefusalHeadingFor,
2634
2711
  qualifyRefusalReason,
2635
2712
  qualifyTableRows,
2636
2713
  rasterizeSvgToPngDataUrl,
2714
+ readMapSelectionMarker,
2637
2715
  readQualifyChartRow,
2638
2716
  readQualifyRefusalRow,
2717
+ readSelectionMarker,
2639
2718
  reconcileChartPick,
2640
2719
  reconcileModelPick,
2641
2720
  recoveryAnswerIsCancelled,
@@ -2659,6 +2738,7 @@ export {
2659
2738
  resolveAutoColorScale,
2660
2739
  resolveOptions,
2661
2740
  restoreFocus,
2741
+ restoreInnerScroll,
2662
2742
  rowGrowthNotice,
2663
2743
  rowIdxsFromMark,
2664
2744
  rowNameOf,
@@ -2666,6 +2746,7 @@ export {
2666
2746
  sameRowSet,
2667
2747
  scopeChartIds,
2668
2748
  scrollFitFor,
2749
+ selectionMarkerFor,
2669
2750
  selectionRuleOf,
2670
2751
  servedCorrelationProves,
2671
2752
  sessionViewStateProvider,
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  chartSvgOf,
4
4
  tableHostOf
5
- } from "./chunk-PELRAFYZ.mjs";
5
+ } from "./chunk-IW6BKFF5.mjs";
6
6
  import {
7
7
  FIT_CONTENT_SELECTOR,
8
8
  ctmScaleOf,
9
9
  isPhantomBox
10
- } from "./chunk-7XT5OJ6M.mjs";
11
- import "./chunk-KY4FI2HA.mjs";
10
+ } from "./chunk-63IUMWY2.mjs";
11
+ import "./chunk-QG5TENI3.mjs";
12
12
  import "./chunk-GHODWOAL.mjs";
13
13
 
14
14
  // src/legendFit/legendReconcile.ts
package/dist/page.mjs CHANGED
@@ -6,10 +6,10 @@ import {
6
6
  noteBadges,
7
7
  notesFor,
8
8
  readControls
9
- } from "./chunk-GTJG3SMD.mjs";
10
- import "./chunk-IL5M7K6Z.mjs";
11
- import "./chunk-KGVNZR23.mjs";
12
- import "./chunk-KY4FI2HA.mjs";
9
+ } from "./chunk-VGJH63LZ.mjs";
10
+ import "./chunk-TUZCM7SX.mjs";
11
+ import "./chunk-RLOIA7QK.mjs";
12
+ import "./chunk-QG5TENI3.mjs";
13
13
  import {
14
14
  ANY_VALUE,
15
15
  LINKED_HOVER_CLASS,
@@ -20,9 +20,10 @@ import {
20
20
  fromVegaInteraction,
21
21
  isAnyValue,
22
22
  payloadRowReader,
23
+ scopeFilterOf,
23
24
  viewFromToken,
24
25
  viewToken
25
- } from "./chunk-2KLFIGTQ.mjs";
26
+ } from "./chunk-ZZBX5ZJ6.mjs";
26
27
  import "./chunk-GHODWOAL.mjs";
27
28
  export {
28
29
  ANY_VALUE,
@@ -40,6 +41,7 @@ export {
40
41
  notesFor,
41
42
  payloadRowReader,
42
43
  readControls,
44
+ scopeFilterOf,
43
45
  viewFromToken,
44
46
  viewToken
45
47
  };
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  geoFromCache,
4
4
  registerGeo
5
- } from "./chunk-5YSZABCS.mjs";
5
+ } from "./chunk-LXTW6YII.mjs";
6
6
  import {
7
7
  Mi,
8
- Rt,
8
+ Nt,
9
9
  W,
10
10
  bt
11
- } from "./chunk-FIG5DIW7.mjs";
11
+ } from "./chunk-K2TH7D5V.mjs";
12
12
  import "./chunk-A2GMXZP7.mjs";
13
13
  import "./chunk-GHODWOAL.mjs";
14
14
 
@@ -199,7 +199,7 @@ function provinceBinding(res, cols, opts) {
199
199
  const words = (n) => n.replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z]+/);
200
200
  const named = (re) => cols.find((c) => words(c.name).some((w) => re.test(w)))?.name ?? null;
201
201
  const accentWords = (n) => n.replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-zÀ-ɏ]+/);
202
- const localized = (axis) => cols.find((c) => Rt(accentWords(c.name)) === axis)?.name ?? null;
202
+ const localized = (axis) => cols.find((c) => Nt(accentWords(c.name)) === axis)?.name ?? null;
203
203
  const lat = named(/^(lat|latitude)$/), lon = named(/^(lon|lng|long|longitude)$/);
204
204
  const localLat = localized("lat"), localLon = localized("lon");
205
205
  const usePair = localLat !== null && localLon !== null;
package/dist/react.mjs CHANGED
@@ -5,25 +5,26 @@ import {
5
5
  createControls,
6
6
  noteBadges,
7
7
  notesFor
8
- } from "./chunk-GTJG3SMD.mjs";
8
+ } from "./chunk-VGJH63LZ.mjs";
9
9
  import {
10
10
  assembleD3,
11
11
  createChartGroup,
12
12
  createChartHost,
13
13
  syncMemberSelection,
14
14
  toSourceRows
15
- } from "./chunk-TE54AFRN.mjs";
16
- import "./chunk-IL5M7K6Z.mjs";
17
- import "./chunk-AEO5SFEQ.mjs";
18
- import "./chunk-KGVNZR23.mjs";
19
- import "./chunk-7XT5OJ6M.mjs";
15
+ } from "./chunk-GZSYTDFN.mjs";
16
+ import "./chunk-TUZCM7SX.mjs";
17
+ import "./chunk-EFKGSDFF.mjs";
18
+ import "./chunk-RLOIA7QK.mjs";
19
+ import "./chunk-63IUMWY2.mjs";
20
20
  import {
21
21
  geoFromCache,
22
22
  loadGeo
23
- } from "./chunk-5YSZABCS.mjs";
24
- import "./chunk-FIG5DIW7.mjs";
23
+ } from "./chunk-LXTW6YII.mjs";
24
+ import "./chunk-K2TH7D5V.mjs";
25
+ import "./chunk-JTZTTJJK.mjs";
25
26
  import "./chunk-A2GMXZP7.mjs";
26
- import "./chunk-KY4FI2HA.mjs";
27
+ import "./chunk-QG5TENI3.mjs";
27
28
  import {
28
29
  ANY_VALUE,
29
30
  LINKED_HOVER_CLASS,
@@ -34,9 +35,10 @@ import {
34
35
  fromVegaInteraction,
35
36
  isAnyValue,
36
37
  payloadRowReader,
38
+ scopeFilterOf,
37
39
  viewFromToken,
38
40
  viewToken
39
- } from "./chunk-2KLFIGTQ.mjs";
41
+ } from "./chunk-ZZBX5ZJ6.mjs";
40
42
  import "./chunk-GHODWOAL.mjs";
41
43
 
42
44
  // src/react.tsx
@@ -96,7 +98,8 @@ function BicChart(props) {
96
98
  controls,
97
99
  ariaLabel
98
100
  } = props;
99
- const scopeList = scopedBy == null ? [] : Array.isArray(scopedBy) ? scopedBy : [scopedBy];
101
+ const scopeSources = scopedBy == null ? [] : Array.isArray(scopedBy) ? scopedBy : [scopedBy];
102
+ const scopeList = scopeSources.map(scopeFilterOf).filter((f) => !!f);
100
103
  const scopeIds = scopeList.map((f) => f?.id).join("");
101
104
  const subscribeScope = useCallback((cb) => {
102
105
  const offs = scopeList.map((f) => f?.onChange?.(() => cb()));
@@ -108,7 +111,7 @@ function BicChart(props) {
108
111
  useSyncExternalStore(subscribeScope, scopeSnapshot, scopeSnapshot);
109
112
  const [scopeEver, setScopeEver] = useState(scopedBy !== void 0);
110
113
  if (scopedBy !== void 0 && !scopeEver) setScopeEver(true);
111
- const scopeFact = scopedBy === void 0 ? void 0 : filterScopeOf(scopeList);
114
+ const scopeFact = scopedBy === void 0 ? void 0 : filterScopeOf(scopeSources);
112
115
  const scopeKey = scopeFact ? JSON.stringify(scopeFact) : "";
113
116
  const options = useMemo(
114
117
  () => scopeEver ? { ...pageOptions ?? {}, filterScope: scopeFact ?? pageOptions?.filterScope } : pageOptions,
@@ -338,7 +341,8 @@ function useBicFilter(columns, opts) {
338
341
  if (!ref.current) ref.current = createFilter(columns, opts);
339
342
  const f = ref.current;
340
343
  useEffect(() => scope.add(f), [scope, f]);
341
- useSyncExternalStore((cb) => f.onChange(() => cb()), () => f.version, () => f.version);
344
+ const snapshot = () => `${f.version}:${f.pick?.id ?? ""}:${f.pick?.version ?? ""}`;
345
+ useSyncExternalStore((cb) => f.onPick ? f.onPick(() => cb()) : f.onChange(() => cb()), snapshot, snapshot);
342
346
  return f;
343
347
  }
344
348
  function useBicControls(initial, opts) {
@@ -410,7 +414,7 @@ function BicDevtools({ max = 20 }) {
410
414
  scope.filters.map((f) => /* @__PURE__ */ jsxs("div", { children: [
411
415
  /* @__PURE__ */ jsx("b", { children: f.label }),
412
416
  " [",
413
- f.key,
417
+ scope.keyOf?.(f) ?? f.key,
414
418
  "] ",
415
419
  f.active ? JSON.stringify(f.keys) : "(none)",
416
420
  " ",
package/dist/testing.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  MARK_CLASS,
5
5
  MARK_SELECTED_CLASS,
6
6
  ROW_IDX_ATTR
7
- } from "./chunk-KY4FI2HA.mjs";
7
+ } from "./chunk-QG5TENI3.mjs";
8
8
  import "./chunk-GHODWOAL.mjs";
9
9
 
10
10
  // src/testing/interact.ts
@@ -0,0 +1,71 @@
1
+ /** More distinct colours than this is a continuous colour channel, not categories: the census declines. */
2
+ export declare const MAX_CATEGORY_SLOTS = 24;
3
+ /**
4
+ * From this many colours a set lying on one path, its lightness rising or falling along it (turning at most once, as
5
+ * a diverging ramp's does at its centre), is declined as a ramp. Below it the shape is reported
6
+ * (`rampLike`) but not declined: four or five categorical colours can sit on one path by chance, and a set of
7
+ * categories that does is exactly the too-close case this census exists to see (two greens and two blue-greys read
8
+ * as a ramp, yet were drawn as four categories).
9
+ */
10
+ export declare const RAMP_DECLINE_MIN_SLOTS = 6;
11
+ /** At most this many pairs under the floor are listed (the closest first); `pairsBelowFloorCount` counts them all. */
12
+ export declare const MAX_LISTED_PAIRS = 10;
13
+ export interface CategoryColourCensusOptions {
14
+ /** The page background the chart is painted on; white when absent or unreadable. */
15
+ pageBg?: string;
16
+ /** The opacity a selection leaves on the other categories (0..1); chart-host's default when absent. */
17
+ dimOpacity?: number;
18
+ }
19
+ export interface CategoryColourCensus {
20
+ /** Where the colours came from: "legend" (one per swatch), "marks" (the distinct mark colours), or "" for none. */
21
+ source: string;
22
+ /** Why nothing is reported: "" when reported, else "none" (fewer than two colours), "ramp" or "too-many". */
23
+ declined: string;
24
+ /** Distinct category colours found (0 when declined for having none). */
25
+ slots: number;
26
+ /** The closest two colours, as painted hex at full strength; empty when not reported. */
27
+ closestPair: string[];
28
+ /** CIEDE2000 of the closest pair at full strength (one decimal); null when not reported. */
29
+ closestDeltaE: number | null;
30
+ /** The same, after each colour is blended at its element's own opacity over the page; null when not reported. */
31
+ closestDeltaEPainted: number | null;
32
+ /** The same at the dim level (own opacity times the dim level, over the page); null when not reported. */
33
+ closestDeltaEDimmed: number | null;
34
+ /** The dim level used. */
35
+ dimOpacity: number;
36
+ /** True when the colours lie on one path, as a sequential ramp's do (reported below RAMP_DECLINE_MIN_SLOTS). */
37
+ rampLike: boolean;
38
+ /** With a legend: true when every legend colour is painted on some mark; null without a legend or marks. */
39
+ legendMatchesMarks: boolean | null;
40
+ /** The floor the painted colours are held to (CATEGORY_DELTA_E_FLOOR). */
41
+ floor: number;
42
+ /** True when the closest pair AS PAINTED is under the floor; false when it clears it; null when not reported. */
43
+ belowFloor: boolean | null;
44
+ /** How many pairs, as painted, are under the floor (0 when not reported). */
45
+ pairsBelowFloorCount: number;
46
+ /** Those pairs, closest first (at most MAX_LISTED_PAIRS): each colour at full strength and the painted distance. */
47
+ pairsBelowFloor: CategoryColourPair[];
48
+ /** The closest pair as painted (the colours at full strength); empty when not reported. */
49
+ closestPairPainted: string[];
50
+ /** The closest painted distance under simulated deuteranopia (Machado 2009, severity 1); null when not reported. */
51
+ closestDeltaEDeutan: number | null;
52
+ /** The same under simulated protanopia; null when not reported. */
53
+ closestDeltaEProtan: number | null;
54
+ }
55
+ /** Two category colours (at full strength) and their CIEDE2000 distance as painted. */
56
+ export interface CategoryColourPair {
57
+ colours: [string, string];
58
+ deltaE: number;
59
+ }
60
+ /**
61
+ * How close are the two closest category colours, as painted? Prefers the legend (one colour per swatch) and falls
62
+ * back to the distinct colours of the marks. Never throws and never changes the chart: an environment that cannot
63
+ * report a colour reports nothing.
64
+ *
65
+ * KNOWN LIMITS, stated rather than hidden: a selection's dimming is applied by a stylesheet rule, so "painted" is the
66
+ * resting chart and the dimmed figure is computed from the dim level; colours set only by a stylesheet class are
67
+ * read through computed style, which a headless DOM without layout may not resolve; six or more categorical colours
68
+ * on one path (shades of one hue) are declined as a ramp; a binned diverging ramp, whose two arms do not lie on one
69
+ * path, is measured as categories, so its neighbouring bins are reported under the floor.
70
+ */
71
+ export declare function censusCategoryColours(container: any, doc?: any, options?: CategoryColourCensusOptions): CategoryColourCensus;
@@ -1,5 +1,5 @@
1
1
  import type { ExportFormat, ExportTableService, SaveFileService } from "./exportTable";
2
- export declare const HOST_CONTRACT_VERSION = "1.23.0";
2
+ export declare const HOST_CONTRACT_VERSION = "1.24.0";
3
3
  export type GeoPointPrecision = "latlon" | "city" | "zip3" | "state" | "country";
4
4
  /** Every valid tier, ordered most precise → coarsest. Runtime form of GeoPointPrecision. */
5
5
  export declare const GEO_POINT_PRECISIONS: readonly GeoPointPrecision[];
@@ -68,6 +68,7 @@ export declare const CONTAINER_SLOT_XF_CLEAR = "__llmXfClear";
68
68
  export declare const CONTAINER_SLOT_INITIAL_XF_MARK = "__llmInitialXfMark";
69
69
  export declare const CONTAINER_SLOT_UI_STATE = "__lchUiState";
70
70
  export declare const CONTAINER_SLOT_SCROLL = "__lchScroll";
71
+ export declare const TABLE_SCROLLER_CLASS = "lch-table-body";
71
72
  export declare const CONTAINER_SLOT_CLICKED_MARKS = "__lchClickedMarks";
72
73
  export declare const VIEW_ONLY_UI_STATE_KEYS: readonly string[];
73
74
  /** The bag with every view-only key removed: what a host persists when the reader has not asked
@@ -107,6 +108,7 @@ export declare const ACTIVE_TICK_CLASS = "lch-tick-active";
107
108
  export declare const DIM_OPACITY_VAR = "--lch-dim-opacity";
108
109
  export declare const DIM_OPACITY_DEFAULT = 0.25;
109
110
  export declare const DIM_OPACITY_MIN = 0.01;
111
+ export declare const CATEGORY_DELTA_E_FLOOR = 25;
110
112
  export declare function chartOwnsTimeline(container: any): boolean;
111
113
  export declare function periodTickSuppressesFeedback(isAxisTick: boolean, ownsTimeline: boolean): boolean;
112
114
  export declare const ANIM_PLAY_SPEED_DEFAULT = 1000;
@@ -206,8 +208,19 @@ export interface RenderOptions {
206
208
  /** How far a selection dims the marks outside it, as a share of full opacity (DIM_OPACITY_MIN-1). Absent: the
207
209
  * stylesheet decides - DIM_OPACITY_DEFAULT, or whatever the page sets on --lch-dim-opacity. */
208
210
  dimOpacity?: number;
209
- /** A small glyph on each selected mark: "dot" or "check". Absent or "none": no glyph (the default). */
210
- selectionGlyph?: "none" | "dot" | "check";
211
+ /** The SELECTION MARKER on every chart that is not a region map (the key keeps its first name, from when the only
212
+ * markers were glyphs): "auto" (the default; an outline on a chart whose colour ramp has a neutral centre, nothing
213
+ * elsewhere), "none", "dot" or "check" (a small glyph on each selected mark), or "outline" (a stroke in the text
214
+ * colour around each selected area mark). Resolved, it reads "dot", "check" or "outline" when one of those was
215
+ * chosen and undefined otherwise; `selectionMarker` holds the whole choice. */
216
+ selectionGlyph?: "auto" | "none" | "dot" | "check" | "outline";
217
+ /** The selection marker on a REGION MAP (a chart whose rows carry the host's region join column): "outline" (the
218
+ * default), "none", "dot" or "check". */
219
+ mapSelectionGlyph?: "none" | "dot" | "check" | "outline";
220
+ /** Resolved only: the whole choice `selectionGlyph` made, "auto" when it made none. */
221
+ selectionMarker?: "auto" | "none" | "dot" | "check" | "outline";
222
+ /** Resolved only: the whole choice `mapSelectionGlyph` made, "outline" when it made none. */
223
+ mapSelectionMarker?: "none" | "dot" | "check" | "outline";
211
224
  /** A host FACT from the generate answer: this chart's family never takes a selection glyph. */
212
225
  suppressSelectionGlyph?: boolean;
213
226
  /** A host FACT: this chart works from the keyboard (its code carries the keyboard stamp), so the host has made its