@aquera/nile-visualization 2.9.24 → 2.9.25

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 (61) hide show
  1. package/README.md +4 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/internal/types/aq-config.type.d.ts +6 -0
  4. package/dist/src/internal/types/index.d.ts +1 -0
  5. package/dist/src/internal/types/legend-config.type.d.ts +145 -0
  6. package/dist/src/internal/types/legend-config.type.js +9 -0
  7. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +1 -1
  8. package/dist/src/nile-area-chart/nile-area-chart.d.ts +1 -1
  9. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -1
  10. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -1
  11. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +1 -1
  12. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +1 -1
  13. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +1 -1
  14. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +1 -1
  15. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +1 -1
  16. package/dist/src/nile-chart/index.d.ts +1 -1
  17. package/dist/src/nile-chart/nile-chart-config.d.ts +12 -1
  18. package/dist/src/nile-chart/nile-chart.d.ts +7 -2
  19. package/dist/src/nile-chart/nile-chart.js +69 -24
  20. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +1 -1
  21. package/dist/src/nile-column-chart/nile-column-chart.d.ts +1 -1
  22. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -1
  23. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -1
  24. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -1
  25. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +1 -1
  26. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -1
  27. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -1
  28. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -1
  29. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -1
  30. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -1
  31. package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +1 -0
  32. package/dist/src/nile-filter-chart/nile-filter-chart.js +7 -2
  33. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -1
  34. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -1
  35. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +1 -1
  36. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +1 -1
  37. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +1 -1
  38. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -1
  39. package/dist/src/nile-line-chart/nile-line-chart.d.ts +1 -1
  40. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -1
  41. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -1
  42. package/dist/src/nile-map-chart/nile-map-chart.d.ts +1 -1
  43. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
  44. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -1
  45. package/dist/src/nile-pie-chart/index.d.ts +1 -1
  46. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +2 -51
  47. package/dist/src/nile-pie-chart/nile-pie-chart.js +3 -0
  48. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -1
  49. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +1 -1
  50. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +1 -1
  51. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +1 -1
  52. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +1 -1
  53. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +1 -1
  54. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +1 -1
  55. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -1
  56. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +1 -1
  57. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +1 -1
  58. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -1
  59. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +1 -1
  60. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +1 -1
  61. package/package.json +1 -1
package/README.md CHANGED
@@ -35,6 +35,10 @@ To run a local development server that serves the basic demo located in `demo/in
35
35
  ## Release Notes
36
36
 
37
37
  In this section, you can find the updates for each release of `nile-visualization`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
38
+ #### Version 2.9.25 (July 10, 2026)
39
+ - Nile Filter Chart: Streamlined the prompt typewriter animation logic — introduced `_shouldAnimateTypewriter` and updated `_syncPromptAnimations` so animations run only for active prompt-like controls that have more than one placeholder phrase (UIF-1301)
40
+ - Nile Chart: Moved the shared legend and chart spacing types (`LegendConfig`, `LegendNavigationConfig`, `LegendTitleConfig`, `LegendAccessibilityConfig`, `CSSObject`) into a shared `internal/types` module and re-pointed all chart components' `legend` property to import from there (UIF-1302)
41
+
38
42
  #### Version 2.9.24 (July 09, 2026)
39
43
  - Nile Chart: Reworked the `columnDrilldown` chart config to match the Highcharts-native shape — the flat `drilldownSeries` array is now nested under a `drilldown` object (`{ series, breadcrumbs? }`), enabling configurable breadcrumb navigation for drilling into columns. Drilldown data points accept either object (`{ name, y }`) or tuple (`[name, y]`) form (UIF-1300)
40
44
 
@@ -2,6 +2,7 @@ export { NileBarChart } from './nile-bar-chart/index.js';
2
2
  export type { BarChartSeriesData } from './nile-bar-chart/index.js';
3
3
  export { NilePieChart } from './nile-pie-chart/index.js';
4
4
  export type { PieChartSeriesData } from './nile-pie-chart/index.js';
5
+ export type { LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, CSSObject, } from './internal/types/index.js';
5
6
  export { NileTrendlineChart } from './nile-trendline-chart/index.js';
6
7
  export type { TrendlineSeriesData, ForecastConfig } from './nile-trendline-chart/index.js';
7
8
  export { NileAnomalyChart } from './nile-anomaly-chart/index.js';
@@ -5,6 +5,12 @@ import type { NileChartMenuConfig, NileChartMenuItem } from '../../nile-chart/ni
5
5
  export interface AqConfigType {
6
6
  chartTitle?: string;
7
7
  chartSubtitle?: string;
8
+ /** Font size for the header title (number → px, or any CSS length string). */
9
+ titleFontSize?: string | number;
10
+ /** Font size for the header subtitle (number → px, or any CSS length string). */
11
+ subtitleFontSize?: string | number;
12
+ /** Hide the chart header (title/subtitle/actions) entirely. */
13
+ noHeader?: boolean;
8
14
  summary?: string;
9
15
  toggleLabel?: string;
10
16
  /** AI chat panel configuration. */
@@ -51,6 +51,7 @@ export type { ChartMapConfigType } from './chart-map-config.type.js';
51
51
  export type { PrimitiveChartConfigType } from './primitive-chart-config.type.js';
52
52
  export type { SeparatedChartConfigInputType } from './separated-chart-config-input.type.js';
53
53
  export type { AllChartConfigType } from './all-chart-config.type.js';
54
+ export type { CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, } from './legend-config.type.js';
54
55
  export type { ChartConfigType } from './chart-config.type.js';
55
56
  export type { NileChartConfigInputType } from './nile-chart-config-input.type.js';
56
57
  export type { ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from './nile-ai-widgets-config-input.type.js';
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Shared legend + chart-spacing configuration types.
3
+ *
4
+ * These are cross-cutting — every `nile-*-chart` component and the universal
5
+ * `nile-chart` wrapper consume them, so they live here in `internal/types`
6
+ * rather than inside any single chart component.
7
+ */
8
+ /** A Highcharts CSS-in-JS style object (camelCased CSS properties). */
9
+ export type CSSObject = Record<string, string | number>;
10
+ /** Highcharts legend paging navigation (the native up/down arrows). */
11
+ export interface LegendNavigationConfig {
12
+ activeColor?: string;
13
+ animation?: boolean | {
14
+ duration?: number;
15
+ };
16
+ arrowSize?: number;
17
+ enabled?: boolean;
18
+ inactiveColor?: string;
19
+ style?: CSSObject;
20
+ }
21
+ /** Legend title (a heading rendered above the legend items). */
22
+ export interface LegendTitleConfig {
23
+ text?: string;
24
+ style?: CSSObject;
25
+ }
26
+ /** Accessibility options for the legend. */
27
+ export interface LegendAccessibilityConfig {
28
+ enabled?: boolean;
29
+ keyboardNavigation?: {
30
+ enabled?: boolean;
31
+ };
32
+ }
33
+ /**
34
+ * Legend configuration — the complete set of Highcharts legend options, plus
35
+ * Nile's `show` (a friendlier alias for `enabled`). Every field maps straight
36
+ * through to the native Highcharts legend, so the legend is fully configurable
37
+ * via Highcharts config — including native height-based paging (`maxHeight` +
38
+ * `navigation`). Applies to every chart type.
39
+ */
40
+ export interface LegendConfig {
41
+ /** Show or hide the legend (alias for Highcharts `enabled`). */
42
+ show?: boolean;
43
+ /** Accessibility options for the legend. */
44
+ accessibility?: LegendAccessibilityConfig;
45
+ /** Horizontal alignment of the legend box. */
46
+ align?: 'left' | 'center' | 'right';
47
+ /** In vertical legends, whether to align the columns. */
48
+ alignColumns?: boolean;
49
+ /** Background color of the legend box. */
50
+ backgroundColor?: string;
51
+ /** Color of the legend border. */
52
+ borderColor?: string;
53
+ /** Corner radius of the legend border. */
54
+ borderRadius?: number;
55
+ /** Width of the legend border. */
56
+ borderWidth?: number;
57
+ /** Bubble legend options (bubble charts only). */
58
+ bubbleLegend?: Record<string, unknown>;
59
+ /** CSS class name applied to the legend group. */
60
+ className?: string;
61
+ /** Enable/disable the legend (Highcharts native flag). Prefer `show`. */
62
+ enabled?: boolean;
63
+ /** Legend item / group event handlers. */
64
+ events?: Record<string, unknown>;
65
+ /** Whether the legend floats over the plot area. */
66
+ floating?: boolean;
67
+ /** Style of the checkbox next to each item (checkbox legends). */
68
+ itemCheckboxStyle?: CSSObject;
69
+ /** Pixel distance between each legend item. */
70
+ itemDistance?: number;
71
+ /** Text/box style applied to hidden (toggled-off) items. */
72
+ itemHiddenStyle?: CSSObject;
73
+ /** Text/box style applied to items on hover. */
74
+ itemHoverStyle?: CSSObject;
75
+ /** Bottom margin of each legend item. */
76
+ itemMarginBottom?: number;
77
+ /** Top margin of each legend item. */
78
+ itemMarginTop?: number;
79
+ /** Base text style for legend items. */
80
+ itemStyle?: CSSObject;
81
+ /** Fixed width of each legend item. */
82
+ itemWidth?: number;
83
+ /** Format string for each label, e.g. `'{name}'`, `'{name}: {y}'`. */
84
+ labelFormat?: string;
85
+ /** Callback returning the label text; called with the point/series as `this`. */
86
+ labelFormatter?: (this: unknown) => string;
87
+ /** Legend item layout. */
88
+ layout?: 'horizontal' | 'vertical' | 'proximate';
89
+ /** Outer margin below the legend. */
90
+ margin?: number;
91
+ /** Maximum pixel height before the legend scrolls/paginates. */
92
+ maxHeight?: number;
93
+ /** Maximum width of the legend (px or `%`). */
94
+ maxWidth?: number | string;
95
+ /** Native Highcharts legend paging navigation (up/down arrows on overflow). */
96
+ navigation?: LegendNavigationConfig;
97
+ /** Inner padding of the legend box. */
98
+ padding?: number;
99
+ /** Reverse the order of legend items. */
100
+ reversed?: boolean;
101
+ /** Right-to-left rendering (symbol after label). */
102
+ rtl?: boolean;
103
+ /** Drop shadow for the legend box. */
104
+ shadow?: boolean | CSSObject;
105
+ /** Force a square (equal-sided) symbol. */
106
+ squareSymbol?: boolean;
107
+ /** Pixel height of the item symbol/swatch. */
108
+ symbolHeight?: number;
109
+ /** Pixel gap between symbol and label. */
110
+ symbolPadding?: number;
111
+ /** Corner radius of the item symbol/swatch. */
112
+ symbolRadius?: number;
113
+ /** Pixel width of the item symbol/swatch. */
114
+ symbolWidth?: number;
115
+ /** Legend title heading. */
116
+ title?: LegendTitleConfig;
117
+ /** Render labels as HTML (allows markup in `labelFormat`/`labelFormatter`). */
118
+ useHTML?: boolean;
119
+ /** Decimals used when a value token is formatted in `labelFormat`. */
120
+ valueDecimals?: number;
121
+ /** Suffix appended after a value token in `labelFormat`. */
122
+ valueSuffix?: string;
123
+ /** Vertical alignment of the legend box. */
124
+ verticalAlign?: 'top' | 'middle' | 'bottom';
125
+ /** Fixed width of the legend (px or `%`). */
126
+ width?: number | string;
127
+ /** Horizontal pixel offset of the legend. */
128
+ x?: number;
129
+ /** Vertical pixel offset of the legend. */
130
+ y?: number;
131
+ /** @deprecated Not a native Highcharts option; retained for back-compat. */
132
+ lineHeight?: number;
133
+ }
134
+ /**
135
+ * Space (in px) between the outer chart edge and the plot area — maps to
136
+ * Highcharts `chart.spacingTop/Right/Bottom/Left`. Use it to give a
137
+ * right-aligned legend room so its labels aren't clipped, etc. Applies to
138
+ * every chart type.
139
+ */
140
+ export interface ChartSpacingConfig {
141
+ top?: number;
142
+ right?: number;
143
+ bottom?: number;
144
+ left?: number;
145
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared legend + chart-spacing configuration types.
3
+ *
4
+ * These are cross-cutting — every `nile-*-chart` component and the universal
5
+ * `nile-chart` wrapper consume them, so they live here in `internal/types`
6
+ * rather than inside any single chart component.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=legend-config.type.js.map
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface AnomalySeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -26,7 +26,7 @@ export declare class NileAreaChart extends NileElement {
26
26
  stacked: boolean;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  chartBg: string;
31
31
  chartBorderRadius: string | number;
32
32
  chartBorder: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface AreaNegativeSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface AreaRangeSeriesData {
7
7
  name: string;
8
8
  data: [number, number][];
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface AreaSplineSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -34,7 +34,7 @@ export declare class NileBarChart extends NileElement {
34
34
  /** Whether to enable the legend. */
35
35
  showLegend: boolean;
36
36
  /** Full legend configuration — all Highcharts legend options in one object. */
37
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
37
+ legend: import('../internal/types/index.js').LegendConfig | null;
38
38
  chartBg: string;
39
39
  chartBorderRadius: string | number;
40
40
  chartBorder: string;
@@ -31,7 +31,7 @@ export declare class NileBellcurveChart extends NileElement {
31
31
  pointsInInterval: number;
32
32
  showLegend: boolean;
33
33
  /** Full legend configuration — all Highcharts legend options in one object. */
34
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
34
+ legend: import('../internal/types/index.js').LegendConfig | null;
35
35
  chartBg: string;
36
36
  chartBorderRadius: string | number;
37
37
  chartBorder: string;
@@ -37,7 +37,7 @@ export declare class NileBoxplotChart extends NileElement {
37
37
  yAxisTitle: string;
38
38
  showLegend: boolean;
39
39
  /** Full legend configuration — all Highcharts legend options in one object. */
40
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
40
+ legend: import('../internal/types/index.js').LegendConfig | null;
41
41
  /** When true, draws horizontal boxes (categories on the y-axis). */
42
42
  horizontal: boolean;
43
43
  chartBg: string;
@@ -25,7 +25,7 @@ export declare class NileBubbleChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -2,4 +2,4 @@ export { NileChart } from './nile-chart.js';
2
2
  export type { NileChartConfig, NileBarChartConfig, NilePieChartConfig, NileTrendlineChartConfig, NileAnomalyChartConfig, NileLineChartConfig, NileAreaChartConfig, NileColumnChartConfig, NileDonutChartConfig, NileScatterChartConfig, NileBubbleChartConfig, NileSplineChartConfig, NileRadarChartConfig, NileGaugeChartConfig, NileWaterfallChartConfig, NileMasterDetailChartConfig, NileKpiChartConfig, NileMapChartConfig, NileListChartConfig, NileMessageChartConfig, ChartType, SwitchAggregation, NileAiConfig, NileChartMenuConfig, NileChartMenuItem, } from './nile-chart-config.js';
3
3
  export { convertConfig, registerAdapter } from '../internal/chart-adapters.js';
4
4
  export { nileChartConfig } from './nile-chart-config-builder.js';
5
- export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
5
+ export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
@@ -2,7 +2,8 @@ import type { ChartConfigType } from '../internal/types/chart-config.type.js';
2
2
  /** Every supported `chart.type` value for `<nile-chart>`. */
3
3
  export type ChartType = ChartConfigType['type'];
4
4
  import type { BarChartSeriesData } from '../nile-bar-chart/nile-bar-chart.js';
5
- import type { PieChartSeriesData, LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { PieChartSeriesData } from '../nile-pie-chart/nile-pie-chart.js';
6
+ import type { LegendConfig, ChartSpacingConfig } from '../internal/types/index.js';
6
7
  import type { TrendlineSeriesData, ForecastConfig } from '../nile-trendline-chart/nile-trendline-chart.js';
7
8
  import type { AnomalySeriesData, AnomalyConfig } from '../nile-anomaly-chart/nile-anomaly-chart.js';
8
9
  import type { LineChartSeriesData } from '../nile-line-chart/nile-line-chart.js';
@@ -149,6 +150,10 @@ export interface NileAiConfig {
149
150
  export interface NileChartConfigBase {
150
151
  chartTitle?: string;
151
152
  chartSubtitle?: string;
153
+ /** Font size for the header title (number → px, or any CSS length string). */
154
+ titleFontSize?: string | number;
155
+ /** Font size for the header subtitle (number → px, or any CSS length string). */
156
+ subtitleFontSize?: string | number;
152
157
  noHeader?: boolean;
153
158
  height?: string;
154
159
  loading?: boolean;
@@ -163,6 +168,12 @@ export interface NileChartConfigBase {
163
168
  legend?: LegendConfig;
164
169
  /** Color palette applied to the chart's series. */
165
170
  colorPalette?: ChartColorPaletteConfig;
171
+ /**
172
+ * Space (px) between the chart's outer edge and its plot area — maps to
173
+ * Highcharts `chart.spacingTop/Right/Bottom/Left`. Applies to every chart
174
+ * type. e.g. `{ right: 40 }` gives a right-aligned legend room to breathe.
175
+ */
176
+ chartSpacing?: ChartSpacingConfig;
166
177
  chartBg?: string;
167
178
  chartBorderRadius?: string | number;
168
179
  chartBorder?: string;
@@ -56,6 +56,7 @@ import '../nile-ai-panel/index.js';
56
56
  export declare class NileChart extends NileElement {
57
57
  static styles: CSSResultGroup;
58
58
  private _headerTipEl;
59
+ private _headerResizeObs;
59
60
  /** Full chart configuration. Accepts flat NileChartConfig or separated { chart, aq } input. */
60
61
  config: NileChartConfig | NileChartConfigInputType | null;
61
62
  /**
@@ -125,6 +126,10 @@ export declare class NileChart extends NileElement {
125
126
  private get isPromotableFilter();
126
127
  private get headerTitle();
127
128
  private get headerSubtitle();
129
+ /** Normalize a numeric (→px) or string dimension to a CSS length. */
130
+ private static toCssSize;
131
+ private get titleFontSize();
132
+ private get subtitleFontSize();
128
133
  private onHeaderSlotChange;
129
134
  private onHeaderActionsSlotChange;
130
135
  private syncHeaderSlots;
@@ -144,8 +149,8 @@ export declare class NileChart extends NileElement {
144
149
  private renderAiTrigger;
145
150
  private _showHeaderTip;
146
151
  private _hideHeaderTip;
147
- private _onTitleEnter;
148
- private _onSubtitleEnter;
152
+ private _onHeaderTextEnter;
153
+ private _syncHeaderTruncationA11y;
149
154
  private renderHeader;
150
155
  private renderAiPanel;
151
156
  private renderChartContent;
@@ -1,3 +1,4 @@
1
+ var NileChart_1;
1
2
  import { __decorate } from "tslib";
2
3
  import { customElement, property, query, state } from 'lit/decorators.js';
3
4
  import { html, nothing } from 'lit';
@@ -9,11 +10,6 @@ import { convertConfig } from '../internal/chart-adapters.js';
9
10
  import { deepMerge } from '../internal/utils.js';
10
11
  import { initNileChartExporting, getHighcharts } from '../internal/highcharts-provider.js';
11
12
  import { resolveColorPaletteColors } from '../internal/color-palettes/index.js';
12
- // Start loading exporting/offline-exporting/export-data at module import time.
13
- // `chart.fullscreen` is attached via a `beforeRender` hook installed by the exporting module's
14
- // compose step, so if a chart is constructed before the module applies, that instance will have
15
- // no `fullscreen`. Kicking the load off here gives it a head start; handlers still await it
16
- // before invoking methods, and viewFullscreen falls back to the DOM Fullscreen API.
17
13
  initNileChartExporting();
18
14
  import '../nile-bar-chart/index.js';
19
15
  import '../nile-pie-chart/index.js';
@@ -133,10 +129,11 @@ function ensureHeaderTooltipStyles() {
133
129
  document.head.appendChild(style);
134
130
  _headerTooltipStylesInjected = true;
135
131
  }
136
- let NileChart = class NileChart extends NileElement {
132
+ let NileChart = NileChart_1 = class NileChart extends NileElement {
137
133
  constructor() {
138
134
  super(...arguments);
139
135
  this._headerTipEl = null;
136
+ this._headerResizeObs = null;
140
137
  /** Full chart configuration. Accepts flat NileChartConfig or separated { chart, aq } input. */
141
138
  this.config = null;
142
139
  /**
@@ -200,14 +197,9 @@ let NileChart = class NileChart extends NileElement {
200
197
  this._hcChart = e.detail?.chart ?? null;
201
198
  };
202
199
  this.resolvedConfig = null;
203
- this._onTitleEnter = (e) => {
204
- const el = e.currentTarget;
205
- if (el.scrollWidth <= el.clientWidth)
206
- return;
207
- const rect = el.getBoundingClientRect();
208
- this._showHeaderTip(el.textContent ?? '', rect.left + rect.width / 2, rect.top);
209
- };
210
- this._onSubtitleEnter = (e) => {
200
+ // Reveal the full text when a title/subtitle is truncated. Accepts any Event
201
+ // so it works for BOTH pointer (mouseenter) and keyboard (focus) users.
202
+ this._onHeaderTextEnter = (e) => {
211
203
  const el = e.currentTarget;
212
204
  if (el.scrollWidth <= el.clientWidth)
213
205
  return;
@@ -231,6 +223,7 @@ let NileChart = class NileChart extends NileElement {
231
223
  injectGlobalChartMenuOverrides();
232
224
  const tip = document.createElement('div');
233
225
  tip.className = 'nile-chart-header-tooltip';
226
+ tip.setAttribute('role', 'tooltip');
234
227
  document.body.appendChild(tip);
235
228
  this._headerTipEl = tip;
236
229
  document.addEventListener('click', this.handleOutsideClick);
@@ -249,6 +242,8 @@ let NileChart = class NileChart extends NileElement {
249
242
  this.removeEventListener('nile-chart-ready', this.handleChartReady);
250
243
  this._headerTipEl?.remove();
251
244
  this._headerTipEl = null;
245
+ this._headerResizeObs?.disconnect();
246
+ this._headerResizeObs = null;
252
247
  }
253
248
  mergeChartTypeFromAttr(chart) {
254
249
  const t = this.chartTypeAttr?.trim();
@@ -280,6 +275,8 @@ let NileChart = class NileChart extends NileElement {
280
275
  if (resolved.appearance && this.appearance !== resolved.appearance)
281
276
  this.appearance = resolved.appearance;
282
277
  }
278
+ // Keep truncated-title focusability in sync after any re-render.
279
+ this._syncHeaderTruncationA11y();
283
280
  }
284
281
  closeMenu() {
285
282
  const dropdown = this.shadowRoot?.querySelector('.nile-chart-menu-anchor');
@@ -346,6 +343,18 @@ let NileChart = class NileChart extends NileElement {
346
343
  }
347
344
  return '';
348
345
  }
346
+ /** Normalize a numeric (→px) or string dimension to a CSS length. */
347
+ static toCssSize(value) {
348
+ if (value == null || value === '')
349
+ return undefined;
350
+ return typeof value === 'number' ? `${value}px` : value;
351
+ }
352
+ get titleFontSize() {
353
+ return NileChart_1.toCssSize(this.activeConfig?.titleFontSize ?? this.resolvedConfig?.titleFontSize);
354
+ }
355
+ get subtitleFontSize() {
356
+ return NileChart_1.toCssSize(this.activeConfig?.subtitleFontSize ?? this.resolvedConfig?.subtitleFontSize);
357
+ }
349
358
  onHeaderSlotChange(e) {
350
359
  const slot = e.target;
351
360
  this.hasHeaderSlotContent = slot.assignedElements({ flatten: true }).length > 0;
@@ -383,6 +392,10 @@ let NileChart = class NileChart extends NileElement {
383
392
  firstUpdated(changedProperties) {
384
393
  super.firstUpdated(changedProperties);
385
394
  this.syncHeaderSlots();
395
+ this._syncHeaderTruncationA11y();
396
+ // Truncation depends on width, so re-check when the host resizes.
397
+ this._headerResizeObs = new ResizeObserver(() => this._syncHeaderTruncationA11y());
398
+ this._headerResizeObs.observe(this);
386
399
  }
387
400
  /** Direct children with `slot=` — header row renders on first paint before slot assignment runs. */
388
401
  lightDomHasSlot(name) {
@@ -560,6 +573,24 @@ let NileChart = class NileChart extends NileElement {
560
573
  if (this._headerTipEl)
561
574
  this._headerTipEl.style.display = 'none';
562
575
  }
576
+ _syncHeaderTruncationA11y() {
577
+ const root = this.shadowRoot;
578
+ if (!root)
579
+ return;
580
+ for (const sel of ['.nile-chart-header-title', '.nile-chart-header-subtitle']) {
581
+ const el = root.querySelector(sel);
582
+ if (!el)
583
+ continue;
584
+ const truncated = el.scrollWidth > el.clientWidth;
585
+ if (truncated) {
586
+ el.setAttribute('tabindex', '0');
587
+ }
588
+ else {
589
+ el.removeAttribute('tabindex');
590
+ this._hideHeaderTip();
591
+ }
592
+ }
593
+ }
563
594
  renderHeader() {
564
595
  if (!this.shouldShowHeader())
565
596
  return nothing;
@@ -567,18 +598,20 @@ let NileChart = class NileChart extends NileElement {
567
598
  const subtitle = this.headerSubtitle;
568
599
  const showDefaultTitles = !this.hasHeaderSlotContent && !!(title || subtitle);
569
600
  const headerCompact = !subtitle?.trim();
601
+ const titleFontSize = this.titleFontSize;
602
+ const subtitleFontSize = this.subtitleFontSize;
570
603
  return html `
571
- <div class="nile-chart-header ${headerCompact ? 'nile-chart-header--compact' : ''}">
572
- <div class="nile-chart-header-titles">
604
+ <div class="nile-chart-header ${headerCompact ? 'nile-chart-header--compact' : ''}" part="header">
605
+ <div class="nile-chart-header-titles" part="header-titles">
573
606
  <slot name="header" @slotchange=${this.onHeaderSlotChange}></slot>
574
607
  ${showDefaultTitles
575
608
  ? html `
576
- ${title ? html `<p class="nile-chart-header-title" @mouseenter=${this._onTitleEnter} @mouseleave=${() => this._hideHeaderTip()}>${title}</p>` : nothing}
577
- ${subtitle ? html `<p class="nile-chart-header-subtitle" @mouseenter=${this._onSubtitleEnter} @mouseleave=${() => this._hideHeaderTip()}>${subtitle}</p>` : nothing}
609
+ ${title ? html `<p class="nile-chart-header-title" part="header-title" style=${titleFontSize ? `font-size:${titleFontSize}` : nothing} @mouseenter=${this._onHeaderTextEnter} @mouseleave=${() => this._hideHeaderTip()} @focus=${this._onHeaderTextEnter} @blur=${() => this._hideHeaderTip()}>${title}</p>` : nothing}
610
+ ${subtitle ? html `<p class="nile-chart-header-subtitle" part="header-subtitle" style=${subtitleFontSize ? `font-size:${subtitleFontSize}` : nothing} @mouseenter=${this._onHeaderTextEnter} @mouseleave=${() => this._hideHeaderTip()} @focus=${this._onHeaderTextEnter} @blur=${() => this._hideHeaderTip()}>${subtitle}</p>` : nothing}
578
611
  `
579
612
  : nothing}
580
613
  </div>
581
- <div class="nile-chart-header-actions">
614
+ <div class="nile-chart-header-actions" part="header-actions">
582
615
  <slot name="header-actions" @slotchange=${this.onHeaderActionsSlotChange}></slot>
583
616
  ${this.masterZoomed && (this.activeType ?? this.resolvedConfig?.type) === 'master-detail'
584
617
  ? html `<nile-tooltip content="Reset zoom" placement="top">
@@ -631,16 +664,28 @@ let NileChart = class NileChart extends NileElement {
631
664
  const { show, ...rest } = config.legend;
632
665
  legendOptions.legend = { enabled: show ?? true, ...rest };
633
666
  }
667
+ const spacingOptions = {};
668
+ if (config.chartSpacing) {
669
+ const { top, right, bottom, left } = config.chartSpacing;
670
+ const chart = {};
671
+ if (top != null)
672
+ chart.spacingTop = top;
673
+ if (right != null)
674
+ chart.spacingRight = right;
675
+ if (bottom != null)
676
+ chart.spacingBottom = bottom;
677
+ if (left != null)
678
+ chart.spacingLeft = left;
679
+ if (Object.keys(chart).length)
680
+ spacingOptions.chart = chart;
681
+ }
634
682
  const cfgData = config.data;
635
683
  const dataCount = Array.isArray(cfgData) ? cfgData.length : undefined;
636
- // Apply the built-in 'default' palette automatically when no colorPalette is
637
- // given — so charts use Nile colors out of the box with no config needed. A
638
- // consumer who supplies their own `options.colors` opts out (not clobbered).
639
684
  const hasExplicitColors = Array.isArray(config.options?.colors);
640
685
  const paletteCfg = config.colorPalette ?? (hasExplicitColors ? undefined : { theme: 'default' });
641
686
  const paletteColors = resolveColorPaletteColors(paletteCfg, dataCount);
642
687
  const paletteOptions = paletteColors ? { colors: paletteColors } : {};
643
- const mergedOptions = deepMerge(deepMerge(deepMerge(deepMerge(config.options ?? {}, legendOptions), paletteOptions), noTitle), this.buildExportingOptions());
688
+ const mergedOptions = deepMerge(deepMerge(deepMerge(deepMerge(deepMerge(config.options ?? {}, legendOptions), spacingOptions), paletteOptions), noTitle), this.buildExportingOptions());
644
689
  switch (config.type) {
645
690
  case 'bar':
646
691
  return html `<nile-bar-chart
@@ -1970,7 +2015,7 @@ __decorate([
1970
2015
  __decorate([
1971
2016
  state()
1972
2017
  ], NileChart.prototype, "masterZoomed", void 0);
1973
- NileChart = __decorate([
2018
+ NileChart = NileChart_1 = __decorate([
1974
2019
  customElement('nile-chart')
1975
2020
  ], NileChart);
1976
2021
  export { NileChart };
@@ -26,7 +26,7 @@ export declare class NileClusterChart extends NileElement {
26
26
  yAxisTitle: string;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  groupPadding: number;
31
31
  pointPadding: number;
32
32
  chartBg: string;
@@ -25,7 +25,7 @@ export declare class NileColumnChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface ColumnDrilldownParentPoint {
7
7
  name: string;
8
8
  y: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface ColumnPyramidSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface ColumnRangeSeriesData {
7
7
  name: string;
8
8
  data: [number, number][];
@@ -30,7 +30,7 @@ export declare class NileDonutChart extends NileElement {
30
30
  showDataLabels: boolean;
31
31
  showLegend: boolean;
32
32
  /** Full legend configuration — all Highcharts legend options in one object. */
33
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
33
+ legend: import('../internal/types/index.js').LegendConfig | null;
34
34
  chartBg: string;
35
35
  chartBorderRadius: string | number;
36
36
  chartBorder: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface DumbbellPoint {
7
7
  name: string;
8
8
  low: number;
@@ -3,7 +3,7 @@ import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
6
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
6
+ import type { LegendConfig } from '../internal/types/index.js';
7
7
  export declare class NileDumbbellLowerChart extends NileElement {
8
8
  static styles: CSSResultGroup;
9
9
  private _hc;
@@ -3,7 +3,7 @@ import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
6
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
6
+ import type { LegendConfig } from '../internal/types/index.js';
7
7
  export declare class NileDumbbellUpperChart extends NileElement {
8
8
  static styles: CSSResultGroup;
9
9
  private _hc;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface EulerVennDataPoint {
7
7
  sets: string[];
8
8
  value: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  /** Central path (history + median / point forecast). */
7
7
  export interface FanLinePoint {
8
8
  category: string;
@@ -79,6 +79,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
79
79
  private _validateOrClear;
80
80
  private _clearPromptValidation;
81
81
  private _syncPromptAnimations;
82
+ private _shouldAnimateTypewriter;
82
83
  private _startPromptAnimation;
83
84
  private _stopPromptAnimation;
84
85
  private _stopAllPromptAnimations;
@@ -241,18 +241,23 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
241
241
  _syncPromptAnimations() {
242
242
  const wanted = new Set();
243
243
  for (const ctrl of this._flatControls()) {
244
- if (ctrl.variant === 'prompt' || ctrl.variant === 'hybrid' || ctrl.variant === 'expression') {
244
+ const isPromptLike = ctrl.variant === 'prompt' || ctrl.variant === 'hybrid' || ctrl.variant === 'expression';
245
+ if (isPromptLike && this._shouldAnimateTypewriter(ctrl)) {
245
246
  wanted.add(ctrl.id);
246
247
  if (!this._promptTimers.has(ctrl.id))
247
248
  this._startPromptAnimation(ctrl);
248
249
  }
249
250
  }
250
- // Stop animations whose controls were removed from the config
251
251
  for (const id of [...this._promptTimers.keys()]) {
252
252
  if (!wanted.has(id))
253
253
  this._stopPromptAnimation(id);
254
254
  }
255
255
  }
256
+ _shouldAnimateTypewriter(ctrl) {
257
+ return ((ctrl.placeholders?.length ?? 0) > 1 ||
258
+ (ctrl.promptPlaceholders?.length ?? 0) > 1 ||
259
+ (ctrl.expressionPlaceholders?.length ?? 0) > 1);
260
+ }
256
261
  _startPromptAnimation(ctrl) {
257
262
  const getPhrases = () => {
258
263
  const mode = this.promptModes.get(ctrl.id);
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  /** Segment row for the flame / icicle layout (`columnrange`-based). */
7
7
  export interface FlameChartPoint {
8
8
  name: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface FunnelDataPoint {
7
7
  name: string;
8
8
  y: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface GaugeBand {
7
7
  from: number;
8
8
  to: number;
@@ -32,7 +32,7 @@ export declare class NileHeatmapChart extends NileElement {
32
32
  showDataLabels: boolean;
33
33
  showLegend: boolean;
34
34
  /** Full legend configuration — all Highcharts legend options in one object. */
35
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
35
+ legend: import('../internal/types/index.js').LegendConfig | null;
36
36
  chartBg: string;
37
37
  chartBorderRadius: string | number;
38
38
  chartBorder: string;
@@ -34,7 +34,7 @@ export declare class NileHistogramChart extends NileElement {
34
34
  binWidth: number;
35
35
  showLegend: boolean;
36
36
  /** Full legend configuration — all Highcharts legend options in one object. */
37
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
37
+ legend: import('../internal/types/index.js').LegendConfig | null;
38
38
  chartBg: string;
39
39
  chartBorderRadius: string | number;
40
40
  chartBorder: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface InvertedAreaChartSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -25,7 +25,7 @@ export declare class NileLineChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface LineColumnSeriesPart {
7
7
  name: string;
8
8
  data: number[];
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface LollipopSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface MapChartDataPoint {
7
7
  /** Highcharts map key matching the map topology (e.g. 'us-ca'). */
8
8
  'hc-key'?: string;
@@ -3,7 +3,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
3
3
  import type Highcharts from 'highcharts';
4
4
  import NileElement from '../internal/nile-element.js';
5
5
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
6
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
6
+ import type { LegendConfig } from '../internal/types/index.js';
7
7
  export interface MasterDetailPoint {
8
8
  x: number;
9
9
  y: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  /** Directed edge: reporting line from `from` to `to` (node ids). */
7
7
  export interface OrgChartLink {
8
8
  from: string;
@@ -1,2 +1,2 @@
1
1
  export { NilePieChart } from './nile-pie-chart.js';
2
- export type { PieChartSeriesData } from './nile-pie-chart.js';
2
+ export type { PieChartSeriesData, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, CSSObject, } from './nile-pie-chart.js';
@@ -2,6 +2,8 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
+ export type { CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, } from '../internal/types/index.js';
6
+ import type { LegendConfig } from '../internal/types/index.js';
5
7
  export interface PieChartSeriesData {
6
8
  name: string;
7
9
  y: number;
@@ -9,57 +11,6 @@ export interface PieChartSeriesData {
9
11
  sliced?: boolean;
10
12
  selected?: boolean;
11
13
  }
12
- export interface LegendNavigationConfig {
13
- activeColor?: string;
14
- animation?: boolean | {
15
- duration?: number;
16
- };
17
- arrowSize?: number;
18
- enabled?: boolean;
19
- inactiveColor?: string;
20
- style?: Record<string, string | number>;
21
- }
22
- export interface LegendConfig {
23
- /** Show or hide the legend (maps to Highcharts `enabled`). */
24
- show?: boolean;
25
- layout?: 'horizontal' | 'vertical';
26
- align?: 'left' | 'center' | 'right';
27
- verticalAlign?: 'top' | 'middle' | 'bottom';
28
- navigation?: LegendNavigationConfig;
29
- backgroundColor?: string;
30
- borderColor?: string;
31
- borderRadius?: number;
32
- borderWidth?: number;
33
- floating?: boolean;
34
- itemDistance?: number;
35
- itemHiddenStyle?: Record<string, string | number>;
36
- itemHoverStyle?: Record<string, string | number>;
37
- itemMarginBottom?: number;
38
- itemMarginTop?: number;
39
- itemStyle?: Record<string, string | number>;
40
- itemWidth?: number;
41
- labelFormat?: string;
42
- lineHeight?: number;
43
- margin?: number;
44
- maxHeight?: number;
45
- maxWidth?: number;
46
- padding?: number;
47
- reversed?: boolean;
48
- rtl?: boolean;
49
- squareSymbol?: boolean;
50
- symbolHeight?: number;
51
- symbolPadding?: number;
52
- symbolRadius?: number;
53
- symbolWidth?: number;
54
- title?: {
55
- text?: string;
56
- style?: Record<string, string | number>;
57
- };
58
- useHTML?: boolean;
59
- width?: number;
60
- x?: number;
61
- y?: number;
62
- }
63
14
  export declare class NilePieChart extends NileElement {
64
15
  static styles: CSSResultGroup;
65
16
  private _hc;
@@ -152,6 +152,7 @@ let NilePieChart = class NilePieChart extends NileElement {
152
152
  'loading',
153
153
  'showDataLabels',
154
154
  'showLegend',
155
+ 'legend',
155
156
  ];
156
157
  const needsUpdate = chartProps.some(p => changedProperties.has(p));
157
158
  if (!needsUpdate)
@@ -234,6 +235,8 @@ let NilePieChart = class NilePieChart extends NileElement {
234
235
  },
235
236
  ],
236
237
  legend: (() => {
238
+ // All legend config maps straight through to the native Highcharts
239
+ // legend. `show` is a friendlier alias for Highcharts `enabled`.
237
240
  const { show, ...rest } = this.legend ?? {};
238
241
  return { enabled: show ?? this.showLegend, ...rest };
239
242
  })(),
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface PolygonSeriesConfig {
7
7
  name: string;
8
8
  data: [number, number][];
@@ -25,7 +25,7 @@ export declare class NileRadarChart extends NileElement {
25
25
  showArea: boolean;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -26,7 +26,7 @@ export declare class NileRadialBarChart extends NileElement {
26
26
  paneSize: string;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  chartBg: string;
31
31
  chartBorderRadius: string | number;
32
32
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileScatterChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -29,7 +29,7 @@ export declare class NileSpiderwebChart extends NileElement {
29
29
  showArea: boolean;
30
30
  showLegend: boolean;
31
31
  /** Full legend configuration — all Highcharts legend options in one object. */
32
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
32
+ legend: import('../internal/types/index.js').LegendConfig | null;
33
33
  chartBg: string;
34
34
  chartBorderRadius: string | number;
35
35
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileSplineChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileStackedChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  /** `normal` = stacked values; `percent` = 100% proportional stacks. */
30
30
  stackMode: 'normal' | 'percent';
31
31
  pointPadding: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface TimelineEvent {
7
7
  /** Shown on axis / tooltip header (e.g. date string). */
8
8
  name: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface TrendlineSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -22,7 +22,7 @@ export declare class NileVariablePieChart extends NileElement {
22
22
  showDataLabels: boolean;
23
23
  showLegend: boolean;
24
24
  /** Full legend configuration — all Highcharts legend options in one object. */
25
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
25
+ legend: import('../internal/types/index.js').LegendConfig | null;
26
26
  options: Highcharts.Options;
27
27
  loading: boolean;
28
28
  height: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface VectorDataPoint {
7
7
  x: number;
8
8
  y: number;
@@ -26,7 +26,7 @@ export declare class NileWaterfallChart extends NileElement {
26
26
  yAxisTitle: string;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  chartBg: string;
31
31
  chartBorderRadius: string | number;
32
32
  chartBorder: string;
@@ -28,7 +28,7 @@ export declare class NileXrangeChart extends NileElement {
28
28
  height: string;
29
29
  showLegend: boolean;
30
30
  /** Full legend configuration — all Highcharts legend options in one object. */
31
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
31
+ legend: import('../internal/types/index.js').LegendConfig | null;
32
32
  chartBg: string;
33
33
  chartBorderRadius: string | number;
34
34
  chartBorder: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.24",
3
+ "version": "2.9.25",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",