@aquera/nile-visualization 2.9.25 → 2.9.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,6 +35,9 @@ 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.26 (July 14, 2026)
39
+ - Nile Chart: Exposed CSS `part`s across the chart shell so consumers can style internals via `::part()` — the card (`chart-card`, `chart-body`, `chart-inner`), header (`header`, `header-titles`, `header-title`, `header-subtitle`, `header-actions`), reset-zoom control (`reset-zoom-tooltip`, `reset-zoom`, `reset-zoom-glyph`), AI affordances (`ai-trigger`, `ai-trigger-glyph`, `ai-panel`, `ai-panel-content`), and the actions menu (`menu-anchor`, `menu-trigger`, `menu-trigger-glyph`, `menu`, `menu-separator`, `menu-group-header`, `menu-item-glyph`, and `menu-item` with kind-specific sub-parts `type`, `custom`, `fullscreen`, `print`, `download-png`, `download-svg`, `download-csv`) (UIF-1304)
40
+
38
41
  #### Version 2.9.25 (July 10, 2026)
39
42
  - 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
43
  - 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)
@@ -53,6 +53,35 @@ import '../nile-filter-chart/index.js';
53
53
  import '../nile-chart-message/nile-chart-message.js';
54
54
  import '../nile-chart-list/nile-chart-list.js';
55
55
  import '../nile-ai-panel/index.js';
56
+ /**
57
+ * Universal chart wrapper. Renders a card with an optional header (titles +
58
+ * actions) and the active chart type below.
59
+ *
60
+ * @csspart chart-card - The outer card wrapper.
61
+ * @csspart chart-body - The wrapper between the header and the chart body.
62
+ * @csspart chart-inner - The chart body region below the header.
63
+ * @csspart header - The header row (titles + actions).
64
+ * @csspart header-titles - The titles column (title + subtitle).
65
+ * @csspart header-title - The title text.
66
+ * @csspart header-subtitle - The subtitle text.
67
+ * @csspart header-actions - The actions column (reset-zoom, AI, menu).
68
+ * @csspart reset-zoom-tooltip - Tooltip wrapping the reset-zoom button (master-detail only).
69
+ * @csspart reset-zoom - The reset-zoom button (master-detail only).
70
+ * @csspart reset-zoom-glyph - Glyph inside the reset-zoom button.
71
+ * @csspart ai-trigger - The "Ask AI" button.
72
+ * @csspart ai-trigger-glyph - Glyph inside the "Ask AI" button.
73
+ * @csspart ai-panel - The AI chat panel overlay.
74
+ * @csspart ai-panel-content - The nile-ai-panel element inside the overlay.
75
+ * @csspart menu-anchor - The actions-menu dropdown anchor.
76
+ * @csspart menu-trigger - The actions-menu trigger button.
77
+ * @csspart menu-trigger-glyph - Glyph inside the actions-menu trigger.
78
+ * @csspart menu - The actions-menu popup (also matches `dropdown`).
79
+ * @csspart menu-group-header - A group heading inside the actions menu.
80
+ * @csspart menu-separator - A separator inside the actions menu.
81
+ * @csspart menu-item - Any actions-menu item (also carries a kind-specific
82
+ * sub-part: `type`, `custom`, `fullscreen`, `print`, `download-png`, `download-svg`, `download-csv`).
83
+ * @csspart menu-item-glyph - Glyph inside an actions-menu item.
84
+ */
56
85
  export declare class NileChart extends NileElement {
57
86
  static styles: CSSResultGroup;
58
87
  private _headerTipEl;
@@ -129,6 +129,35 @@ function ensureHeaderTooltipStyles() {
129
129
  document.head.appendChild(style);
130
130
  _headerTooltipStylesInjected = true;
131
131
  }
132
+ /**
133
+ * Universal chart wrapper. Renders a card with an optional header (titles +
134
+ * actions) and the active chart type below.
135
+ *
136
+ * @csspart chart-card - The outer card wrapper.
137
+ * @csspart chart-body - The wrapper between the header and the chart body.
138
+ * @csspart chart-inner - The chart body region below the header.
139
+ * @csspart header - The header row (titles + actions).
140
+ * @csspart header-titles - The titles column (title + subtitle).
141
+ * @csspart header-title - The title text.
142
+ * @csspart header-subtitle - The subtitle text.
143
+ * @csspart header-actions - The actions column (reset-zoom, AI, menu).
144
+ * @csspart reset-zoom-tooltip - Tooltip wrapping the reset-zoom button (master-detail only).
145
+ * @csspart reset-zoom - The reset-zoom button (master-detail only).
146
+ * @csspart reset-zoom-glyph - Glyph inside the reset-zoom button.
147
+ * @csspart ai-trigger - The "Ask AI" button.
148
+ * @csspart ai-trigger-glyph - Glyph inside the "Ask AI" button.
149
+ * @csspart ai-panel - The AI chat panel overlay.
150
+ * @csspart ai-panel-content - The nile-ai-panel element inside the overlay.
151
+ * @csspart menu-anchor - The actions-menu dropdown anchor.
152
+ * @csspart menu-trigger - The actions-menu trigger button.
153
+ * @csspart menu-trigger-glyph - Glyph inside the actions-menu trigger.
154
+ * @csspart menu - The actions-menu popup (also matches `dropdown`).
155
+ * @csspart menu-group-header - A group heading inside the actions menu.
156
+ * @csspart menu-separator - A separator inside the actions menu.
157
+ * @csspart menu-item - Any actions-menu item (also carries a kind-specific
158
+ * sub-part: `type`, `custom`, `fullscreen`, `print`, `download-png`, `download-svg`, `download-csv`).
159
+ * @csspart menu-item-glyph - Glyph inside an actions-menu item.
160
+ */
132
161
  let NileChart = NileChart_1 = class NileChart extends NileElement {
133
162
  constructor() {
134
163
  super(...arguments);
@@ -466,6 +495,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
466
495
  ? html `<nile-glyph
467
496
  slot="prefix"
468
497
  class="nile-chart-actions-menu-glyph"
498
+ part="menu-item-glyph"
469
499
  name=${item.glyph}
470
500
  method=${item.method ?? 'stroke'}
471
501
  color=${item.color ?? 'var(--nile-colors-dark-500,var(--ng-colors-fg-secondary-700))'}
@@ -474,8 +504,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
474
504
  : nothing;
475
505
  if (item.type === 'custom') {
476
506
  return html `
477
- ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator"></div>` : nothing}
478
- <nile-menu-item class="nile-chart-actions-menu-item" value=${`custom:${item.id}`}
507
+ ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator" part="menu-separator"></div>` : nothing}
508
+ <nile-menu-item class="nile-chart-actions-menu-item" part="menu-item custom" value=${`custom:${item.id}`}
479
509
  @click=${() => { this.closeMenu(); this.emit('nile-menu-change', { id: item.id }); }}>
480
510
  ${glyph}${item.label}
481
511
  </nile-menu-item>
@@ -484,12 +514,12 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
484
514
  if (!hasChart)
485
515
  return nothing;
486
516
  return html `
487
- ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator"></div>` : nothing}
488
- ${item.fullscreen ? html `<nile-menu-item class="nile-chart-actions-menu-item" value="fullscreen" @click=${() => this.viewFullscreen()}>${glyph}${item.label ?? 'Fullscreen'}</nile-menu-item>` : nothing}
489
- ${item.print ? html `<nile-menu-item class="nile-chart-actions-menu-item" value="print" @click=${() => this.printChart()}>${glyph}${item.label ?? 'Print'}</nile-menu-item>` : nothing}
490
- ${item.downloadPng ? html `<nile-menu-item class="nile-chart-actions-menu-item" value="download-png" @click=${() => this.exportChart('image/png')}>${glyph}${item.label ?? 'Download PNG'}</nile-menu-item>` : nothing}
491
- ${item.downloadSvg ? html `<nile-menu-item class="nile-chart-actions-menu-item" value="download-svg" @click=${() => this.exportChart('image/svg+xml')}>${glyph}${item.label ?? 'Download SVG'}</nile-menu-item>` : nothing}
492
- ${item.downloadCsv ? html `<nile-menu-item class="nile-chart-actions-menu-item" value="download-csv" @click=${() => this.downloadCsv()}>${glyph}${item.label ?? 'Download CSV'}</nile-menu-item>` : nothing}
517
+ ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator" part="menu-separator"></div>` : nothing}
518
+ ${item.fullscreen ? html `<nile-menu-item class="nile-chart-actions-menu-item" part="menu-item fullscreen" value="fullscreen" @click=${() => this.viewFullscreen()}>${glyph}${item.label ?? 'Fullscreen'}</nile-menu-item>` : nothing}
519
+ ${item.print ? html `<nile-menu-item class="nile-chart-actions-menu-item" part="menu-item print" value="print" @click=${() => this.printChart()}>${glyph}${item.label ?? 'Print'}</nile-menu-item>` : nothing}
520
+ ${item.downloadPng ? html `<nile-menu-item class="nile-chart-actions-menu-item" part="menu-item download-png" value="download-png" @click=${() => this.exportChart('image/png')}>${glyph}${item.label ?? 'Download PNG'}</nile-menu-item>` : nothing}
521
+ ${item.downloadSvg ? html `<nile-menu-item class="nile-chart-actions-menu-item" part="menu-item download-svg" value="download-svg" @click=${() => this.exportChart('image/svg+xml')}>${glyph}${item.label ?? 'Download SVG'}</nile-menu-item>` : nothing}
522
+ ${item.downloadCsv ? html `<nile-menu-item class="nile-chart-actions-menu-item" part="menu-item download-csv" value="download-csv" @click=${() => this.downloadCsv()}>${glyph}${item.label ?? 'Download CSV'}</nile-menu-item>` : nothing}
493
523
  `;
494
524
  }
495
525
  renderActionsMenu() {
@@ -507,35 +537,36 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
507
537
  const hasAnyItems = !!(types?.length || allItems.length);
508
538
  if (!hasAnyItems) {
509
539
  return html `
510
- <button type="button" class="nile-chart-menu-trigger" aria-label="Chart actions">
511
- <nile-glyph name="options" size="16"></nile-glyph>
540
+ <button type="button" class="nile-chart-menu-trigger" part="menu-trigger" aria-label="Chart actions">
541
+ <nile-glyph name="options" size="16" part="menu-trigger-glyph"></nile-glyph>
512
542
  </button>
513
543
  `;
514
544
  }
515
545
  return html `
516
- <nile-dropdown class="nile-chart-menu-anchor" placement="bottom-end" distance="4" portal>
546
+ <nile-dropdown class="nile-chart-menu-anchor" placement="bottom-end" distance="4" portal part="menu-anchor">
517
547
  <button
518
548
  type="button"
519
549
  slot="trigger"
520
550
  class="nile-chart-menu-trigger"
551
+ part="menu-trigger"
521
552
  aria-label="Chart actions"
522
553
  >
523
- <nile-glyph name="options" size="16"></nile-glyph>
554
+ <nile-glyph name="options" size="16" part="menu-trigger-glyph"></nile-glyph>
524
555
  </button>
525
- <nile-menu class="nile-chart-actions-menu" part="dropdown">
556
+ <nile-menu class="nile-chart-actions-menu" part="dropdown menu">
526
557
  ${types?.length ? html `
527
558
  ${types.map(type => html `
528
- <nile-menu-item class="nile-chart-actions-menu-item" value=${`type:${type}`} ?active=${type === this.activeType} @click=${() => this.switchType(type)}>
559
+ <nile-menu-item class="nile-chart-actions-menu-item" part="menu-item type" value=${`type:${type}`} ?active=${type === this.activeType} @click=${() => this.switchType(type)}>
529
560
  ${chartTypeLabel(type)}
530
561
  </nile-menu-item>
531
562
  `)}
532
- ${allItems.length ? html `<div class="nile-chart-actions-menu-separator" role="separator"></div>` : nothing}
563
+ ${allItems.length ? html `<div class="nile-chart-actions-menu-separator" role="separator" part="menu-separator"></div>` : nothing}
533
564
  ` : nothing}
534
565
  ${allItems.map(item => {
535
566
  if (item.type === 'group') {
536
567
  return html `
537
- ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator" part="seperator"></div>` : nothing}
538
- <span class="nile-chart-actions-menu-group-header" role="presentation" part="header">${item.label}</span>
568
+ ${item.divider ? html `<div class="nile-chart-actions-menu-separator" role="separator" part="menu-separator"></div>` : nothing}
569
+ <span class="nile-chart-actions-menu-group-header" role="presentation" part="menu-group-header">${item.label}</span>
539
570
  ${item.items.map(child => this._renderMenuItem(child, hasChart))}
540
571
  `;
541
572
  }
@@ -556,7 +587,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
556
587
  @click=${this.toggleChat}
557
588
  part="ai-trigger"
558
589
  >
559
- <nile-glyph name="smart-code" size="16"></nile-glyph>
590
+ <nile-glyph name="smart-code" size="16" part="ai-trigger-glyph"></nile-glyph>
560
591
  </button>
561
592
  <slot name="nile-ai-trigger-after"></slot>
562
593
  `;
@@ -614,7 +645,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
614
645
  <div class="nile-chart-header-actions" part="header-actions">
615
646
  <slot name="header-actions" @slotchange=${this.onHeaderActionsSlotChange}></slot>
616
647
  ${this.masterZoomed && (this.activeType ?? this.resolvedConfig?.type) === 'master-detail'
617
- ? html `<nile-tooltip content="Reset zoom" placement="top">
648
+ ? html `<nile-tooltip content="Reset zoom" placement="top" part="reset-zoom-tooltip">
618
649
  <button
619
650
  type="button"
620
651
  class="nile-chart-menu-trigger nile-chart-reset-zoom"
@@ -622,7 +653,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
622
653
  aria-label="Reset zoom"
623
654
  @click=${() => this.masterDetailChart?.resetZoom()}
624
655
  >
625
- <nile-glyph name="refresh" size="16"></nile-glyph>
656
+ <nile-glyph name="refresh" size="16" part="reset-zoom-glyph"></nile-glyph>
626
657
  </button>
627
658
  </nile-tooltip>`
628
659
  : nothing}
@@ -643,8 +674,9 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
643
674
  const summaryMessage = summary;
644
675
  const welcomeMessage = summary ? '' : (aiConfig?.welcomeMessage ?? '');
645
676
  return html `
646
- <div class="nile-ai-panel-overlay" ?data-open=${this.chatOpen}>
677
+ <div class="nile-ai-panel-overlay" part="ai-panel" ?data-open=${this.chatOpen}>
647
678
  <nile-ai-panel
679
+ part="ai-panel-content"
648
680
  .placeholder=${aiConfig?.placeholder ?? 'Ask about this chart...'}
649
681
  .welcomeMessage=${welcomeMessage}
650
682
  .summaryMessage=${summaryMessage}
@@ -1947,7 +1979,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1947
1979
  return html `
1948
1980
  <div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''} ${isLoading ? 'nile-chart-card--loading' : ''} ${this.activeConfig?.type === 'kpi' ? 'nile-chart-card--kpi' : ''}" part="chart-card">
1949
1981
  ${this.renderHeader()}
1950
- <div class="nile-chart-wrapper">
1982
+ <div class="nile-chart-wrapper" part="chart-body">
1951
1983
  <div class="nile-chart-inner ${this.activeConfig?.type === 'kpi' ? 'nile-chart-inner--kpi' : ''} ${this.activeConfig?.type === 'filter' ? 'nile-chart-inner--filter' : ''}" part="chart-inner">
1952
1984
  ${isLoading
1953
1985
  ? this.renderSkeleton()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.25",
3
+ "version": "2.9.26",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",