@ixfx/components 0.7.5 → 0.8.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.
Files changed (72) hide show
  1. package/bundle/index.d.ts +256 -17
  2. package/bundle/index.d.ts.map +1 -1
  3. package/bundle/index.js +1461 -165
  4. package/bundle/index.js.map +1 -1
  5. package/dist/ac-token.js +1 -1
  6. package/dist/{data-grid-CtJ35v8L.d.ts → data-grid-D-z7bx5-.d.ts} +2 -2
  7. package/dist/{data-grid-CtJ35v8L.d.ts.map → data-grid-D-z7bx5-.d.ts.map} +1 -1
  8. package/dist/data-grid.d.ts +1 -1
  9. package/dist/data-grid.js +1 -1
  10. package/dist/{detail-list-BS5dRDda.d.ts → detail-list-_ZJHYEBr.d.ts} +3 -3
  11. package/dist/{detail-list-BS5dRDda.d.ts.map → detail-list-_ZJHYEBr.d.ts.map} +1 -1
  12. package/dist/detail-list.d.ts +2 -2
  13. package/dist/detail-list.js +1 -1
  14. package/dist/grid-list-nRUQOcEL.js +1537 -0
  15. package/dist/grid-list-nRUQOcEL.js.map +1 -0
  16. package/dist/{grid-list-D-GbghSH.d.ts → grid-list-u33vmKzb.d.ts} +116 -15
  17. package/dist/grid-list-u33vmKzb.d.ts.map +1 -0
  18. package/dist/grid-list.d.ts +1 -1
  19. package/dist/grid-list.js +1 -993
  20. package/dist/{incr-search-DpbSJtgj.js → incr-search-C05WjbZh.js} +40 -3
  21. package/dist/incr-search-C05WjbZh.js.map +1 -0
  22. package/dist/incr-search.d.ts +2 -2
  23. package/dist/incr-search.js +2 -2
  24. package/dist/{index-CBS4z1v-.d.ts → index-h6gxtfHH.d.ts} +34 -2
  25. package/dist/index-h6gxtfHH.d.ts.map +1 -0
  26. package/dist/index.d.ts +60 -11
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +342 -15
  29. package/dist/index.js.map +1 -1
  30. package/dist/led.d.ts +33 -1
  31. package/dist/led.d.ts.map +1 -1
  32. package/dist/led.js +157 -13
  33. package/dist/led.js.map +1 -1
  34. package/dist/miller.d.ts +1 -1
  35. package/dist/miller.js +1 -1
  36. package/dist/narrowed-text.js +1 -1
  37. package/dist/panel.d.ts +3 -1
  38. package/dist/panel.d.ts.map +1 -1
  39. package/dist/panel.js +31 -1
  40. package/dist/panel.js.map +1 -1
  41. package/dist/plots.d.ts +2 -2
  42. package/dist/plots.js +1 -1
  43. package/dist/{titlebar-Bj5pfdw_.d.ts → titlebar-YQ-jVQoS.d.ts} +2 -2
  44. package/dist/{titlebar-Bj5pfdw_.d.ts.map → titlebar-YQ-jVQoS.d.ts.map} +1 -1
  45. package/dist/titlebar.d.ts +1 -1
  46. package/dist/titlebar.js +83 -1
  47. package/dist/titlebar.js.map +1 -1
  48. package/dist/{tree-DAii2A1g.js → tree-Chptss7I.js} +2 -2
  49. package/dist/{tree-DAii2A1g.js.map → tree-Chptss7I.js.map} +1 -1
  50. package/dist/tree.d.ts +1 -1
  51. package/dist/tree.js +1 -1
  52. package/dist/{vertical-list-DwtCPy1b.d.ts → vertical-list-CFuFDygi.d.ts} +2 -2
  53. package/dist/{vertical-list-DwtCPy1b.d.ts.map → vertical-list-CFuFDygi.d.ts.map} +1 -1
  54. package/dist/vertical-list.d.ts +1 -1
  55. package/dist/vertical-list.js +1 -1
  56. package/dist/{xy-axis-5KhVTNoX.d.ts → xy-axis-BfP9hKLj.d.ts} +25 -2
  57. package/dist/{xy-axis-5KhVTNoX.d.ts.map → xy-axis-BfP9hKLj.d.ts.map} +1 -1
  58. package/dist/{xy-axis-VrX8dmvS.js → xy-axis-DzM1brBZ.js} +141 -8
  59. package/dist/xy-axis-DzM1brBZ.js.map +1 -0
  60. package/docs-user/grid-list.md +99 -14
  61. package/docs-user/index.json +3 -3
  62. package/docs-user/led.md +37 -7
  63. package/docs-user/llms.txt +1 -1
  64. package/docs-user/panel.md +68 -13
  65. package/docs-user/titlebar.md +3 -4
  66. package/llms.txt +1 -1
  67. package/package.json +1 -1
  68. package/dist/grid-list-D-GbghSH.d.ts.map +0 -1
  69. package/dist/grid-list.js.map +0 -1
  70. package/dist/incr-search-DpbSJtgj.js.map +0 -1
  71. package/dist/index-CBS4z1v-.d.ts.map +0 -1
  72. package/dist/xy-axis-VrX8dmvS.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { y as ListSearchController } from "./index-CBS4z1v-.js";
1
+ import { S as ListSearchController } from "./index-h6gxtfHH.js";
2
2
  import { i as ListInteractionMode, l as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-B5ioL-dG.js";
3
3
  import { LitElement, PropertyValues } from "lit";
4
4
  import { CommandId, CommandRegistry } from "@clinth/ui-commands";
@@ -140,4 +140,4 @@ declare global {
140
140
  }
141
141
  //#endregion
142
142
  export { CustomCheckboxOptions as n, VerticalListElement as r, AddItemOptions as t };
143
- //# sourceMappingURL=vertical-list-DwtCPy1b.d.ts.map
143
+ //# sourceMappingURL=vertical-list-CFuFDygi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertical-list-DwtCPy1b.d.ts","names":[],"sources":["../src/vertical-list/vertical-list.ts"],"mappings":";;;;;UA2CiB;EACf,WAAW;EACX;EACA;;UAGe;;;;;;EAMf;;cAMW,4BAA4B;;EAEvC,eAAe;EAGf,iBAAiB;EAGjB,mBAAmB,IAAI;;;;;;EAQvB;;;;;;;;;;;;;;;;;;;EAqBA,oBAAoB,gCAAgC;;;;;;EAQpD;mBAUiB;UAeT;;WAeC,QAAM,qBAAA;;MAYX,YAAY;EAoBP;EAmBA;EA4CA,QAAQ,SAAS;;MAmCtB,gBAAgB;;MAKhB,iBAAiB,YAAY;EAIjC,QAAQ,MAAM,kBAAkB,UAAU;;;;;;EAqB1C,WAAW,MAAM,UAAU;;EAW3B,YAAY,OAAO,SAAS,WAAW;EAIvC;;;;;;EAYA,SAAS,gBAAgB;;;;;;EAczB,SAAS,WAAW,WAAW,OAAO;EAItC,OAAO,MAAM;EAIb,WAAW,OAAO,SAAS;EAI3B,SAAS,M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;;QAYT;YACI;IACR,sBAAsB;;YAGd,4BAA4B"}
@@ -1,3 +1,3 @@
1
1
  import { a as ListItemClickDetail, c as ListSelectEvent, d as ListTickleEvent, i as ListInteractionMode, l as ListSelectionMode, n as ListActivateEvent, o as ListItemClickEvent, r as ListElementEventMap, s as ListSelectDetail, t as ListActivateDetail, u as ListTickleDetail } from "./list-selection-types-B5ioL-dG.js";
2
- import { n as CustomCheckboxOptions, r as VerticalListElement, t as AddItemOptions } from "./vertical-list-DwtCPy1b.js";
2
+ import { n as CustomCheckboxOptions, r as VerticalListElement, t as AddItemOptions } from "./vertical-list-CFuFDygi.js";
3
3
  export { AddItemOptions, CustomCheckboxOptions, type ListActivateDetail, type ListActivateEvent, type ListElementEventMap, type ListInteractionMode, type ListItemClickDetail, type ListItemClickEvent, type ListSelectDetail, type ListSelectEvent, type ListSelectionMode, type ListTickleDetail, type ListTickleEvent, VerticalListElement };
@@ -1,7 +1,7 @@
1
1
  import { t as TickledController } from "./tickled-controller-C66DgJHl.js";
2
2
  import { t as themeFallbacks } from "./fallbacks-DNI9xt0F.js";
3
3
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
4
- import { c as createElementListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-DpbSJtgj.js";
4
+ import { c as createElementListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-C05WjbZh.js";
5
5
  import { n as animateListItemIn, r as animateListItemOut } from "./list-item-animation-DuiwgN3l.js";
6
6
  import { t as ListSelectionController } from "./list-selection-controller-DTFI40li.js";
7
7
  import { LitElement, css, html, render } from "lit";
@@ -291,6 +291,7 @@ type PlotHistogramOrientation = `horizontal` | `vertical`;
291
291
  * - `none`: no hover feedback.
292
292
  */
293
293
  type PlotHistogramValueTooltips = `hover` | `inline` | `none`;
294
+ type PlotHistogramInteractionMode = `inspect` | `select`;
294
295
  type PlotHistogramBucketClickDetail = {
295
296
  readonly bucketIndex: number;
296
297
  readonly valueMin: number;
@@ -320,15 +321,37 @@ declare class PlotHistogram extends LitElement {
320
321
  tooltipDelay: number;
321
322
  /** Max rate (ms) at which an already-shown value display refreshes to match live-changing bucket data. */
322
323
  valueUpdateInterval: number;
324
+ /** Interaction mode: 'inspect' for hover tooltips, 'select' for click-drag selection. */
325
+ interactionMode: PlotHistogramInteractionMode;
323
326
  /** Override to customize the value/frequency label used by the tooltip and overlay text. */
324
327
  valueFormat: (valueMin: number, valueMax: number, frequency: number) => string;
325
328
  private _width;
326
329
  private _height;
327
330
  private _hoveredIndex;
328
331
  private _inlineOverlayText;
332
+ private _coloredRangeMin;
333
+ private _coloredRangeMax;
334
+ private _selectionStart;
335
+ private _selectionEnd;
336
+ private _isDragging;
337
+ private _selectionOverlayText;
329
338
  add(v: number): void;
330
339
  set(values: number[]): void;
331
340
  clear(): void;
341
+ setColoredRange(min: number, max: number): void;
342
+ clearColoredRange(): void;
343
+ setSelection(startBarIndex: number, endBarIndex: number): void;
344
+ clearSelection(): void;
345
+ getSelectedRange(): {
346
+ barIndices: {
347
+ start: number;
348
+ end: number;
349
+ } | null;
350
+ dataValues: {
351
+ min: number;
352
+ max: number;
353
+ } | null;
354
+ };
332
355
  protected firstUpdated(_changed: PropertyValues): void;
333
356
  protected updated(changed: PropertyValues): void;
334
357
  disconnectedCallback(): void;
@@ -384,5 +407,5 @@ declare global {
384
407
  }
385
408
  }
386
409
  //#endregion
387
- export { ColourMapConfig as C, computeColour as D, applyAgeModification as E, parseColourScaleAttr as O, PlotDataSeriesOptions as S, ColourResult as T, PlotSingleAxisPointerMoveDetail as _, PlotHistogramBucketClickDetail as a, SingleAxisDrawStyle as b, PlotHistogramOrientation as c, PlotMultiAxisDataPointClickDetail as d, PlotMultiAxisDataPointClickEvent as f, PlotSingleAxisElementEventMap as g, PlotSingleAxis as h, PlotHistogram as i, readBaseColour as k, PlotHistogramValueTooltips as l, PlotMultiAxisLayout as m, XyAgeStyle as n, PlotHistogramBucketClickEvent as o, PlotMultiAxisElementEventMap as p, XyDrawStyle as r, PlotHistogramElementEventMap as s, PlotXyAxis as t, PlotMultiAxis as u, PlotSingleAxisPointerMoveEvent as v, ColourMode as w, PlotDataSeries as x, SingleAxisAgeStyle as y };
388
- //# sourceMappingURL=xy-axis-5KhVTNoX.d.ts.map
410
+ export { readBaseColour as A, PlotDataSeriesOptions as C, applyAgeModification as D, ColourResult as E, computeColour as O, PlotDataSeries as S, ColourMode as T, PlotSingleAxisElementEventMap as _, PlotHistogramBucketClickDetail as a, SingleAxisAgeStyle as b, PlotHistogramInteractionMode as c, PlotMultiAxis as d, PlotMultiAxisDataPointClickDetail as f, PlotSingleAxis as g, PlotMultiAxisLayout as h, PlotHistogram as i, parseColourScaleAttr as k, PlotHistogramOrientation as l, PlotMultiAxisElementEventMap as m, XyAgeStyle as n, PlotHistogramBucketClickEvent as o, PlotMultiAxisDataPointClickEvent as p, XyDrawStyle as r, PlotHistogramElementEventMap as s, PlotXyAxis as t, PlotHistogramValueTooltips as u, PlotSingleAxisPointerMoveDetail as v, ColourMapConfig as w, SingleAxisDrawStyle as x, PlotSingleAxisPointerMoveEvent as y };
411
+ //# sourceMappingURL=xy-axis-BfP9hKLj.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xy-axis-5KhVTNoX.d.ts","names":[],"sources":["../src/plots/colour-map.ts","../src/plots/data.ts","../src/plots/single-axis.ts","../src/plots/multi-axis.ts","../src/plots/plot-histogram.ts","../src/plots/xy-axis.ts"],"mappings":";;KAeY;KAEA;EACV,MAAM;;EAEN;;EAEA;;EAEA,YAAY;;KAGF;EAAiB;EAAc;;;iBA2C3B,eAAe,IAAI;;iBAMnB,qBAAqB;;;;;;;iBAuCrB,cAAc,qBAAqB,oBAAoB,QAAQ,kBAAkB;;;;;iBAkDjF,qBAAqB,MAAM,cAAc,qBAAqB,mBAAmB;;;KCnKrF;;;;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mBT,sBAAM;;QAkDhB;YACI;IACR,wBAAwB;;;UAKX;EACf;KACG,gBAAgB,8BACf,MAAM,GACN,WAAW,MAAM,eAAe,OAAO,6BAA6B,aACpE,oBAAoB;KAGpB,cACA,UAAU,oCACV,oBAAoB;;;;;KC7Ud;;;;;;KAOA;KAEA;WACD;WACA;WACA;WACA;;KAGC,gCAAgC,YAAY;UAEvC;EACf,qBAAqB;;cAeV,sBAAsB;;EAEjC,aAAa;EAGb;EAGA;EAGA;EAGA;;;;;EAOA;EAGA;;EAIA,eAAe;;EAIf;;EAIA;;EAGA,cAAc,kBAAkB,kBAAkB;UAGjC;UACA;UACA;UACA;EAYjB,IAAI;EAQJ,IAAI;EAQJ;YAKmB,aAAa,UAAU;YA2BvB,QAAQ,SAAS;EAc3B;EAuRA,wBAAM;SA8BC,sBAAM;;QAmChB;YACI;IACR,uBAAuB;;;UAIV;EACf,oBAAoB,gBAAgB,8BAClC,MAAM,GACN,WAAW,MAAM,eAAe,OAAO,6BAA6B,aACpE,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB;;;;KC9fZ;KACA;cAOC,mBAAmB;;EAE9B,WAAW;EAGX,UAAU;EAEE;EACiB;EACA;EACD;EAG5B;EAE4C;EACY;EAGjB,WAAW;EACT;EACD;;;;;EAKxC,iBAAiB;UAEA;UACA;;EAMjB,cAAc,WAAW;EAEzB,IAAI,WAAW;EASf,MAAM,cAAc;EASpB;YAMmB,aAAa,UAAU;YAWvB,QAAQ,SAAS;EA8G3B,wBAAM;SAkEC,sBAAM;;QAuBhB;YACI;IACR,qBAAqB"}
1
+ {"version":3,"file":"xy-axis-BfP9hKLj.d.ts","names":[],"sources":["../src/plots/colour-map.ts","../src/plots/data.ts","../src/plots/single-axis.ts","../src/plots/multi-axis.ts","../src/plots/plot-histogram.ts","../src/plots/xy-axis.ts"],"mappings":";;KAeY;KAEA;EACV,MAAM;;EAEN;;EAEA;;EAEA,YAAY;;KAGF;EAAiB;EAAc;;;iBA2C3B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AAS;EA8G3B,wBAAM;SAkEC,sBAAM;;QAuBhB;YACI;IACR,qBAAqB"}
@@ -717,11 +717,18 @@ let PlotHistogram = class PlotHistogram extends LitElement {
717
717
  this.valueTooltips = `hover`;
718
718
  this.tooltipDelay = 400;
719
719
  this.valueUpdateInterval = 500;
720
+ this.interactionMode = `inspect`;
720
721
  this.valueFormat = (valueMin, valueMax, frequency) => `${valueMin.toFixed(2)} - ${valueMax.toFixed(2)}: ${frequency}`;
721
722
  this._width = 100;
722
723
  this._height = 40;
723
724
  this._hoveredIndex = null;
724
725
  this._inlineOverlayText = null;
726
+ this._coloredRangeMin = null;
727
+ this._coloredRangeMax = null;
728
+ this._selectionStart = null;
729
+ this._selectionEnd = null;
730
+ this._isDragging = false;
731
+ this._selectionOverlayText = null;
725
732
  this.#series = new PlotDataSeries({
726
733
  capacityLimit: 100,
727
734
  persistentScaling: true
@@ -734,6 +741,22 @@ let PlotHistogram = class PlotHistogram extends LitElement {
734
741
  this.#tooltipPosition = null;
735
742
  this.#valueRefreshTimer = null;
736
743
  this.#onPointerMove = (e) => {
744
+ if (this.interactionMode === `select` && this._isDragging) {
745
+ const index = this.#bucketIndexFromPosition(e.clientX, e.clientY);
746
+ this._selectionEnd = index;
747
+ const start = Math.min(this._selectionStart, this._selectionEnd);
748
+ const end = Math.max(this._selectionStart, this._selectionEnd);
749
+ const bars = this.#computeBars();
750
+ if (start <= end) {
751
+ const startBar = bars[start];
752
+ const endBar = bars[end];
753
+ this.setColoredRange(startBar.valueMin, endBar.valueMax);
754
+ this._selectionOverlayText = `Select: ${startBar.valueMin.toFixed(2)} – ${endBar.valueMax.toFixed(2)}`;
755
+ }
756
+ this.requestUpdate();
757
+ return;
758
+ }
759
+ if (this.interactionMode === `select`) return;
737
760
  if (this.valueTooltips === `none`) return;
738
761
  const index = this.#bucketIndexFromPointer(e.clientX, e.clientY);
739
762
  const bucketIndex = index >= 0 ? index : null;
@@ -741,10 +764,34 @@ let PlotHistogram = class PlotHistogram extends LitElement {
741
764
  else this.#updateBubbleTooltip(bucketIndex, e.clientX, e.clientY);
742
765
  };
743
766
  this.#onPointerLeave = () => {
767
+ if (this.interactionMode === `select`) {
768
+ if (this._isDragging) {
769
+ this._isDragging = false;
770
+ this._selectionOverlayText = null;
771
+ this.requestUpdate();
772
+ }
773
+ return;
774
+ }
744
775
  if (this.valueTooltips === `none`) return;
745
776
  if (this.valueTooltips === `inline`) this.#setInlineIndex(null);
746
777
  else this.#updateBubbleTooltip(null, 0, 0);
747
778
  };
779
+ this.#onPointerDown = (e) => {
780
+ if (this.interactionMode !== `select`) return;
781
+ const index = this.#bucketIndexFromPosition(e.clientX, e.clientY);
782
+ this._isDragging = true;
783
+ this._selectionStart = index;
784
+ this._selectionEnd = index;
785
+ const bars = this.#computeBars();
786
+ const startBar = bars[index];
787
+ const endBar = bars[index];
788
+ this.setColoredRange(startBar.valueMin, endBar.valueMax);
789
+ this._selectionOverlayText = `Select: ${startBar.valueMin.toFixed(2)} – ${endBar.valueMax.toFixed(2)}`;
790
+ this.requestUpdate();
791
+ };
792
+ this.#onPointerUp = () => {
793
+ if (this.interactionMode === `select`) this._isDragging = false;
794
+ };
748
795
  }
749
796
  #series;
750
797
  #hasProgrammaticData;
@@ -768,6 +815,59 @@ let PlotHistogram = class PlotHistogram extends LitElement {
768
815
  this.#series.clear();
769
816
  this.requestUpdate();
770
817
  }
818
+ setColoredRange(min, max) {
819
+ this._coloredRangeMin = min;
820
+ this._coloredRangeMax = max;
821
+ this.requestUpdate();
822
+ }
823
+ clearColoredRange() {
824
+ this._coloredRangeMin = null;
825
+ this._coloredRangeMax = null;
826
+ this.requestUpdate();
827
+ }
828
+ setSelection(startBarIndex, endBarIndex) {
829
+ const bars = this.#computeBars();
830
+ const start = Math.min(startBarIndex, endBarIndex);
831
+ const end = Math.max(startBarIndex, endBarIndex);
832
+ const clampedStart = Math.max(0, Math.min(start, bars.length - 1));
833
+ const clampedEnd = Math.max(0, Math.min(end, bars.length - 1));
834
+ this._selectionStart = clampedStart;
835
+ this._selectionEnd = clampedEnd;
836
+ if (clampedStart <= clampedEnd) {
837
+ const startBar = bars[clampedStart];
838
+ const endBar = bars[clampedEnd];
839
+ this.setColoredRange(startBar.valueMin, endBar.valueMax);
840
+ }
841
+ this.requestUpdate();
842
+ }
843
+ clearSelection() {
844
+ this._selectionStart = null;
845
+ this._selectionEnd = null;
846
+ this.requestUpdate();
847
+ }
848
+ getSelectedRange() {
849
+ if (this._selectionStart === null || this._selectionEnd === null) return {
850
+ barIndices: null,
851
+ dataValues: null
852
+ };
853
+ const bars = this.#computeBars();
854
+ const start = Math.min(this._selectionStart, this._selectionEnd);
855
+ const end = Math.max(this._selectionStart, this._selectionEnd);
856
+ const clampedStart = Math.max(0, Math.min(start, bars.length - 1));
857
+ const clampedEnd = Math.max(0, Math.min(end, bars.length - 1));
858
+ const startBar = bars[clampedStart];
859
+ const endBar = bars[clampedEnd];
860
+ return {
861
+ barIndices: {
862
+ start: clampedStart,
863
+ end: clampedEnd
864
+ },
865
+ dataValues: {
866
+ min: startBar.valueMin,
867
+ max: endBar.valueMax
868
+ }
869
+ };
870
+ }
771
871
  firstUpdated(_changed) {
772
872
  this._width = this.clientWidth || 100;
773
873
  this._height = this.clientHeight || 40;
@@ -902,6 +1002,10 @@ let PlotHistogram = class PlotHistogram extends LitElement {
902
1002
  }
903
1003
  });
904
1004
  }
1005
+ #isBarInColoredRange(bar) {
1006
+ if (this._coloredRangeMin === null || this._coloredRangeMax === null) return true;
1007
+ return bar.valueMin < this._coloredRangeMax && bar.valueMax > this._coloredRangeMin;
1008
+ }
905
1009
  /** Index of the bar rect under the pointer, or -1 if none (matches click hit-testing). */
906
1010
  #bucketIndexFromPointer(clientX, clientY) {
907
1011
  const rect = this.getBoundingClientRect();
@@ -909,6 +1013,18 @@ let PlotHistogram = class PlotHistogram extends LitElement {
909
1013
  const y = clientY - rect.top;
910
1014
  return this.#computeBars().findIndex((b) => x >= b.x && x <= b.x + b.width && y >= b.y && y <= b.y + b.height);
911
1015
  }
1016
+ /** Gets bucket index from position, clamping to valid range (0 to bucketCount-1). */
1017
+ #bucketIndexFromPosition(clientX, clientY) {
1018
+ const { w, h, isHorizontal, padding, dataMin, dataSpan, bucketCount, availableMain } = this.#computeGeometry();
1019
+ const rect = this.getBoundingClientRect();
1020
+ const x = clientX - rect.left;
1021
+ const y = clientY - rect.top;
1022
+ let relativePos;
1023
+ if (isHorizontal) relativePos = (x - padding) / availableMain;
1024
+ else relativePos = (y - padding) / availableMain;
1025
+ relativePos = Math.max(0, Math.min(1, relativePos));
1026
+ return Math.floor(relativePos * bucketCount);
1027
+ }
912
1028
  #tooltipIndex;
913
1029
  #tooltipVisible;
914
1030
  #tooltipShowTimer;
@@ -1043,15 +1159,23 @@ let PlotHistogram = class PlotHistogram extends LitElement {
1043
1159
  }
1044
1160
  #onPointerMove;
1045
1161
  #onPointerLeave;
1162
+ #onPointerDown;
1163
+ #onPointerUp;
1046
1164
  render() {
1047
1165
  const { w, h, padding } = this.#computeGeometry();
1048
- const barsContent = this.#computeBars().map((b, i) => svg`
1049
- <rect class="bar" x=${b.x} y=${b.y} width=${b.width} height=${b.height}
1050
- style="--value: ${b.relativeValue}"
1051
- @click=${() => this.#emitClick(i, b.valueMin, b.valueMax, b.relativeValue)} />
1052
- `);
1166
+ const barsContent = this.#computeBars().map((b, i) => {
1167
+ const greyStyle = this.#isBarInColoredRange(b) ? `` : `filter: grayscale(1)`;
1168
+ return svg`
1169
+ <rect class="bar" x=${b.x} y=${b.y} width=${b.width} height=${b.height}
1170
+ style="--value: ${b.relativeValue}; ${greyStyle}"
1171
+ @click=${() => this.#emitClick(i, b.valueMin, b.valueMax, b.relativeValue)} />
1172
+ `;
1173
+ });
1053
1174
  const textColor = `var(--plot-text, var(--surface-2-text, #fff))`;
1054
- const overlayText = this.valueTooltips === `inline` && this._inlineOverlayText !== null ? this._inlineOverlayText : this.title;
1175
+ let overlayText;
1176
+ if (this.interactionMode === `select` && this._selectionOverlayText !== null) overlayText = this._selectionOverlayText;
1177
+ else if (this.valueTooltips === `inline` && this._inlineOverlayText !== null) overlayText = this._inlineOverlayText;
1178
+ else overlayText = this.title;
1055
1179
  const titleContent = overlayText ? svg`<text x=${padding + 2} y=${padding + Math.min(10, h * .6)}
1056
1180
  class="overlay-text" fill=${textColor}
1057
1181
  style="opacity: 0.6">${overlayText}</text>` : svg``;
@@ -1059,7 +1183,9 @@ let PlotHistogram = class PlotHistogram extends LitElement {
1059
1183
  <svg width=${w} height=${h} viewBox="0 0 ${w} ${h}"
1060
1184
  xmlns="http://www.w3.org/2000/svg"
1061
1185
  @pointermove=${this.#onPointerMove}
1062
- @pointerleave=${this.#onPointerLeave}>
1186
+ @pointerleave=${this.#onPointerLeave}
1187
+ @pointerdown=${this.#onPointerDown}
1188
+ @pointerup=${this.#onPointerUp}>
1063
1189
  <rect width=${w} height=${h} fill="transparent" />
1064
1190
  ${barsContent}
1065
1191
  ${titleContent}
@@ -1121,10 +1247,17 @@ __decorate([property({
1121
1247
  type: Number,
1122
1248
  attribute: `value-update-interval`
1123
1249
  })], PlotHistogram.prototype, "valueUpdateInterval", void 0);
1250
+ __decorate([property({ attribute: `interaction-mode` })], PlotHistogram.prototype, "interactionMode", void 0);
1124
1251
  __decorate([state()], PlotHistogram.prototype, "_width", void 0);
1125
1252
  __decorate([state()], PlotHistogram.prototype, "_height", void 0);
1126
1253
  __decorate([state()], PlotHistogram.prototype, "_hoveredIndex", void 0);
1127
1254
  __decorate([state()], PlotHistogram.prototype, "_inlineOverlayText", void 0);
1255
+ __decorate([state()], PlotHistogram.prototype, "_coloredRangeMin", void 0);
1256
+ __decorate([state()], PlotHistogram.prototype, "_coloredRangeMax", void 0);
1257
+ __decorate([state()], PlotHistogram.prototype, "_selectionStart", void 0);
1258
+ __decorate([state()], PlotHistogram.prototype, "_selectionEnd", void 0);
1259
+ __decorate([state()], PlotHistogram.prototype, "_isDragging", void 0);
1260
+ __decorate([state()], PlotHistogram.prototype, "_selectionOverlayText", void 0);
1128
1261
  PlotHistogram = __decorate([safeCustomElement(`ixfx-plot-histogram`)], PlotHistogram);
1129
1262
  //#endregion
1130
1263
  //#region src/plots/single-axis.ts
@@ -1846,4 +1979,4 @@ PlotXyAxis = __decorate([safeCustomElement(`ixfx-plot-xy-axis`)], PlotXyAxis);
1846
1979
  //#endregion
1847
1980
  export { TooltipElement as a, computeColour as c, PlotMultiAxis as i, parseColourScaleAttr as l, PlotSingleAxis as n, PlotDataSeries as o, PlotHistogram as r, applyAgeModification as s, PlotXyAxis as t, readBaseColour as u };
1848
1981
 
1849
- //# sourceMappingURL=xy-axis-VrX8dmvS.js.map
1982
+ //# sourceMappingURL=xy-axis-DzM1brBZ.js.map