@mantha911/ng-echarts 0.1.0-rc.19 → 0.1.0-rc.22

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/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0-rc.19 — Unreleased source
3
+ ## 0.1.0-rc.22 — Composed areas
4
+
5
+ - Add typed area series to shared-axis composed charts, with optional gradient/solid fills, named area stacks, raw events and existing curve settings.
6
+ - Keep bar and area stack groups separate, preserve missing values and isolate area/bar/line presentation during kind changes.
7
+ - Reuse shared area-fill construction without new renderer modules or dependencies; preserve rc.21 and all earlier artifacts. Human review remains deferred.
8
+
9
+ ## 0.1.0-rc.21 — Documentation correction
10
+
11
+ - Correct packaged availability/version guidance after rc.19 publication, and document pagination and named composed stacks by their introduction versions.
12
+ - Preserve rc.20 runtime/declarations, dependencies, licensing, notices and all archived candidates. Human release gates remain pending.
13
+
14
+ ## 0.1.0-rc.20 — Verified local candidate
15
+
16
+ - Add optional named bar stacks to composed charts on the existing shared scale, with signed end caps, raw point actions and independent supplied line values.
17
+ - Preserve the verified rc.19 performance/Angular artifact and all earlier archives. Human release gates remain pending.
18
+
19
+ ## 0.1.0-rc.19 — Verified local candidate
4
20
 
5
21
  - Reconcile renderer recovery, legend visibility and transient plot previews with dependent signals; explicitly phase browser rendering while retaining mixed CSS-color and focus operations.
6
22
  - Add opt-in `tablePageSize` to bar, line, area, composed and pie tables, with keyboard paging, bounded row creation and original-row selection events. The default remains a complete table.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Angular chart library
2
2
 
3
- Experimental standalone Angular 22 components using Apache ECharts. Public prerelease identity: `@mantha911/ng-echarts`. Working source: `0.1.0-rc.19` (unpublished); the public prerelease remains `0.1.0-rc.18`. Original library code is MIT licensed; preserve `LICENSE`, `THIRD_PARTY_NOTICES.md`, and the `third-party/` notices. The API is experimental; human screen-reader interpretation remains unreviewed at the user’s request.
3
+ Experimental standalone Angular 22 components using Apache ECharts. Public prerelease identity: `@mantha911/ng-echarts`. Current candidate: `0.1.0-rc.22`. Public prereleases use the `next` tag; consult the repository publication record for the current registry version. Original library code is MIT licensed; preserve `LICENSE`, `THIRD_PARTY_NOTICES.md`, and the `third-party/` notices. The API is experimental; human screen-reader interpretation remains unreviewed at the user’s request.
4
4
 
5
5
  ## Installation
6
6
 
@@ -13,10 +13,10 @@ npm install @mantha911/ng-echarts@next echarts@6.1.0
13
13
  For a retained exact local candidate:
14
14
 
15
15
  ```sh
16
- npm install /absolute/path/to/mantha911-ng-echarts-0.1.0-rc.19.tgz echarts@6.1.0
16
+ npm install /absolute/path/to/mantha911-ng-echarts-0.1.0-rc.22.tgz echarts@6.1.0
17
17
  ```
18
18
 
19
- Retain the tarball at the lockfile's recorded path, or store it in the consumer's `vendor/` directory. Commit the lockfile and use `npm ci` for repeat installs. Repack and reinstall to consume source changes. The registry `next` tag still points to rc.18; table pagination requires a local rc.19 source build until a new version is published.
19
+ Retain the tarball at the lockfile's recorded path, or store it in the consumer's `vendor/` directory. Commit the lockfile and use `npm ci` for repeat installs. Repack and reinstall to consume source changes. Table pagination is available since rc.19. Named composed bar stacks require rc.20 or later. Composed areas require rc.22 or later. The exact local candidate includes these features; a registry install must resolve a version containing the features you use.
20
20
 
21
21
  No global ECharts registration, library stylesheet, Angular provider or React runtime is required. The package supplies scoped styles and a lazy Canvas renderer. Give its containing card a nonzero width. Cartesian/radar/pie plot height defaults to 320 px, with native controls adding to total height; radial progress defaults to 240 px and calendar/Sankey use family-specific layouts.
22
22
 
@@ -68,7 +68,7 @@ The installed-declaration check compiles this exact packaged example, each API g
68
68
  | `PieChart<T>` | `@mantha911/ng-echarts/pie` | One measure across categories; innerRadius 0 for pie, 0.6 for donut; optional outside labels |
69
69
  | `RadialProgress` | `@mantha911/ng-echarts/radial` | Scalar completion with a positive maximum, native progress semantics and a decorative ring |
70
70
  | `RadarChart<T>` | `@mantha911/ng-echarts/radar` | 3–12 dimensions, 1–4 comparison series, explicit zero-to-maximum scales and native table controls |
71
- | `ComposedChart<T>` | `@mantha911/ng-echarts/composed` | Vertical unstacked bars and lines on one shared scale; typed per-series kind |
71
+ | `ComposedChart<T>` | `@mantha911/ng-echarts/composed` | Bars, lines and areas on one shared scale; separate named bar/area stacks |
72
72
  | `CalendarHeatmap<T>` | `@mantha911/ng-echarts/calendar` | Single explicit year and maximum, strict date-only observations, native monthly tables and responsive year/quarter layout |
73
73
  | `SankeyChart<N, L>` | `@mantha911/ng-echarts/sankey` | Horizontal directed acyclic flows, up to 24 nodes/60 links, native node totals and link actions |
74
74
  | `ChartFrame` and shared types | `@mantha911/ng-echarts/core` | Presentation shell with required title, optional description and projected content; no engine runtime |
@@ -101,13 +101,13 @@ Tested: Angular/CLI 22.2.6, TypeScript 6.0.3, ECharts 6.1.0, RxJS 7.8.2, Node 24
101
101
 
102
102
  The starting measured envelope is 200 categories × three Cartesian series or 12 pie/donut categories on the recorded M2 Pro machine. Stress fixtures use 2,000 Cartesian or 100 pie/donut categories; these are observations, not hard limits or portable latency guarantees. Outside labels may shorten/hide collisions; expanded tables have separate costs.
103
103
 
104
- Focused imports keep unrelated engines out. Line and area intentionally share ECharts' Line engine. Root imports preserve class identity but include combined registrations. Deep paths and core `ɵ` exports are unsupported implementation APIs. Size checks count all lazy chunks, excluding Angular/RxJS peers: gzip/Brotli caps are 200,000/175,000 bytes per family, 10,000/9,000 for core, 219,500/187,500 for root, and 203,000/175,000 for root-frame emitted orphan chunks (zero reachable engine modules).
104
+ Focused imports keep unrelated engines out. Line and area intentionally share ECharts' Line engine. Root imports preserve class identity but include combined registrations. Deep paths and core `ɵ` exports are unsupported implementation APIs. Size checks count all lazy chunks, excluding Angular/RxJS peers: gzip/Brotli caps are 200,000/175,000 bytes per family, 10,000/9,000 for core, 222,000/190,000 for root, and 206,000/178,000 for root-frame emitted orphan chunks (zero reachable engine modules).
105
105
 
106
106
  Raw ECharts options, custom tooltip templates, time/logarithmic axes, server plot images/export, brushes, advanced decoration and additional chart families are outside the MVP. APIs remain experimental. Automated acceptance passes; human interpretation and final artifact/release gates remain pending.
107
107
 
108
108
  ## Composed charts
109
109
 
110
- The post-MVP `ComposedChart` and `ComposedSeries<T>` exports in `/composed` combine vertical bars and lines on one category/value scale. Every descriptor adds `kind: 'bar' | 'line'` to the shared series fields; lines accept `smooth` and `showPoints`. Supply comparable units. The renderer uses supplied trend values; the demo computes its trailing mean separately. Dual axes, stacking and area composition are outside this first increment.
110
+ The post-MVP `ComposedChart` and `ComposedSeries<T>` exports in `/composed` combine vertical bars, lines and areas on one category/value scale. Every descriptor adds `kind: 'bar' | 'line' | 'area'` to the shared series fields; lines accept `smooth` and `showPoints`. Supply comparable units. The renderer uses supplied trend values; the demo computes its trailing mean separately. Bars optionally accept a nonempty `stack` name: equal names stack by sign; omitted names keep bars grouped. Lines remain independent supplied values. Area descriptors (rc.22+) accept smooth/showPoints, gradient (default true) and optional stack names. Bar and area stack groups are separate even when their public names match. Positive/negative values accumulate separately; a missing observation stays missing, with other observed series still available. Raw actions never return cumulative totals. Dual axes remain outside this increment. Named bar stacks are available in published rc.21. Composed areas require rc.22 or later.
111
111
 
112
112
  ## Controlled bar selection
113
113
 
@@ -147,6 +147,6 @@ Charts reserve plot space during loading, empty and error states and retain unav
147
147
 
148
148
  The compatibility root reexports bar, line, area, pie/donut and composed components plus `ChartFrame` and applicable types. Radar, radial progress, calendar and Sankey require their focused entries. Original API documentation is at [the repository docs index](https://github.com/phalla-doll/ng-echarts#documents). Private rc.15 includes opt-in bar `previewEnabled` / `pointPreview` for transient pointer/table-focus context, settled-input reconciliation and Escape cancellation. Earlier archives, including rc.13/rc.14 and the documentation-only rc.12, retain their original bytes and scoped evidence.
149
149
 
150
- ## Optional table pagination in rc.19 source
150
+ ## Optional table pagination since rc.19
151
151
 
152
152
  Bar, line, area, composed and pie accept `[tablePageSize]="50"`. The default `null` renders the complete table. A positive safe integer limits table row creation to the current page while the plot retains every observation. Previous/Next buttons preserve keyboard focus and announce the visible row range. Replacing the data array or page size restarts at the first page; collapsing and reopening retains the page. Off-page rows remain available through paging, with original-row selection events and hidden-series values preserved. Radar, calendar and Sankey retain their existing bounded tables.
@@ -1,19 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, InjectionToken, inject, input } from "@angular/core";
3
- import { ChartFrame, ɵCartesianChart, ɵChartStage, ɵTablePager, ɵbuildCurveOptions } from "@mantha911/ng-echarts/core";
3
+ import { ChartFrame, ɵCartesianChart, ɵChartStage, ɵTablePager, ɵbuildAreaFill, ɵbuildCurveOptions } from "@mantha911/ng-echarts/core";
4
4
  const AREA_RENDERER_LOADER = new InjectionToken("Area renderer loader", {
5
5
  providedIn: "root",
6
6
  factory: () => () => import("./mantha911-ng-echarts-area-area-renderer-DQmIKv7N.mjs").then((module) => module.createAreaRenderer)
7
7
  });
8
- function alphaColor(color, factor) {
9
- if (/^#[\da-f]{6}$/i.test(color)) return `rgba(${[
10
- 1,
11
- 3,
12
- 5
13
- ].map((offset) => Number.parseInt(color.slice(offset, offset + 2), 16)).join(",")},${factor})`;
14
- const rgba = color.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/);
15
- return rgba ? `rgba(${rgba[1]},${rgba[2]},${rgba[3]},${Number(rgba[4] ?? 1) * factor})` : "transparent";
16
- }
17
8
  function buildAreaOptions(context, smooth, showPoints, stacked, gradient) {
18
9
  const options = ɵbuildCurveOptions(context, smooth, showPoints);
19
10
  if (!Array.isArray(options.series)) throw new Error("Expected curve series");
@@ -26,23 +17,7 @@ function buildAreaOptions(context, smooth, showPoints, stacked, gradient) {
26
17
  stack: stacked ? "total" : void 0,
27
18
  stackStrategy: "samesign",
28
19
  triggerEvent: true,
29
- areaStyle: {
30
- opacity: 1,
31
- color: gradient ? {
32
- type: "linear",
33
- x: 0,
34
- y: 0,
35
- x2: 0,
36
- y2: 1,
37
- colorStops: [{
38
- offset: 0,
39
- color: alphaColor(color, .22)
40
- }, {
41
- offset: 1,
42
- color: alphaColor(color, .04)
43
- }]
44
- } : alphaColor(color, .16)
45
- }
20
+ areaStyle: ɵbuildAreaFill(color, gradient)
46
21
  };
47
22
  })
48
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mantha911-ng-echarts-area.mjs","names":[],"sources":["../../../projects/chart-library/area/src/lib/area-browser.ts","../../../projects/chart-library/area/src/lib/area-options.ts","../../../projects/chart-library/area/src/lib/area-chart.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.html"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { AreaOption } from './area-options';\nexport const AREA_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<AreaOption>>\n>('Area renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./area-renderer').then((module) => module.createAreaRenderer),\n});\n","import type { LineSeriesOption } from 'echarts/charts';\nimport {\n ɵbuildCurveOptions,\n type ɵCartesianContext,\n type ɵCurveOption,\n} from '@mantha911/ng-echarts/core';\nexport type AreaOption = ɵCurveOption;\nfunction alphaColor(color: string, factor: number): string {\n if (/^#[\\da-f]{6}$/i.test(color))\n return `rgba(${[1, 3, 5].map((offset) => Number.parseInt(color.slice(offset, offset + 2), 16)).join(',')},${factor})`;\n const rgba = color.match(\n /^rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/,\n );\n return rgba\n ? `rgba(${rgba[1]},${rgba[2]},${rgba[3]},${Number(rgba[4] ?? 1) * factor})`\n : 'transparent';\n}\nexport function buildAreaOptions<T>(\n context: ɵCartesianContext<T>,\n smooth: boolean,\n showPoints: boolean,\n stacked: boolean,\n gradient: boolean,\n): AreaOption {\n const options = ɵbuildCurveOptions(context, smooth, showPoints);\n if (!Array.isArray(options.series)) throw new Error('Expected curve series');\n return {\n ...options,\n series: options.series.map((item): LineSeriesOption => {\n const color = typeof item.lineStyle?.color === 'string' ? item.lineStyle.color : '#047857';\n return {\n ...item,\n stack: stacked ? 'total' : undefined,\n stackStrategy: 'samesign',\n triggerEvent: true,\n areaStyle: {\n opacity: 1,\n color: gradient\n ? {\n type: 'linear',\n x: 0,\n y: 0,\n x2: 0,\n y2: 1,\n colorStops: [\n { offset: 0, color: alphaColor(color, 0.22) },\n { offset: 1, color: alphaColor(color, 0.04) },\n ],\n }\n : alphaColor(color, 0.16),\n },\n };\n }),\n };\n}\n","import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵTablePager,\n ɵCartesianChart,\n type ɵCartesianContext,\n} from '@mantha911/ng-echarts/core';\nimport { AREA_RENDERER_LOADER } from './area-browser';\nimport { buildAreaOptions, type AreaOption } from './area-options';\n@Component({\n selector: 'nec-area-chart',\n imports: [ChartFrame, ɵChartStage, ɵTablePager],\n templateUrl: '../../../core/src/lib/cartesian-chart.html',\n styleUrls: [\n '../../../core/src/lib/cartesian-chart.css',\n '../../../core/src/lib/chart-controls.css',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AreaChart<T extends object> extends ɵCartesianChart<T, AreaOption> {\n readonly smooth = input(false);\n readonly showPoints = input(false);\n readonly stacked = input(false);\n readonly gradient = input(true);\n private readonly loader = inject(AREA_RENDERER_LOADER);\n protected override renderer() {\n return this.loader();\n }\n protected override familyConfiguration() {\n return {\n smooth: this.smooth(),\n showPoints: this.showPoints(),\n stacked: this.stacked(),\n gradient: this.gradient(),\n };\n }\n protected override familyError() {\n return typeof this.smooth() === 'boolean' &&\n typeof this.showPoints() === 'boolean' &&\n typeof this.stacked() === 'boolean' &&\n typeof this.gradient() === 'boolean'\n ? null\n : 'Area settings must be booleans.';\n }\n protected override buildOptions(context: ɵCartesianContext<T>): AreaOption {\n return buildAreaOptions(\n context,\n this.smooth(),\n this.showPoints(),\n this.stacked(),\n this.gradient(),\n );\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n (retry)=\"retryRenderer()\"\n >\n <div\n #plot\n class=\"plot\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n aria-hidden=\"true\"\n ></div>\n\n @if (currentState.kind === 'ready' && allSeriesHidden()) {\n <div class=\"plot-message\" role=\"status\">\n <span>All series are hidden. Choose a series below.</span>\n </div>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <div class=\"legend\" aria-label=\"Chart series\">\n @for (item of legendItems(); track item.id) {\n <button\n type=\"button\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-pressed]=\"item.visible\"\n (click)=\"toggleSeries(item.id)\"\n >\n <span class=\"swatch\" [style.background]=\"item.color\" aria-hidden=\"true\"></span>\n {{ item.label }}\n <span class=\"visibility\" [class.legend-note]=\"false\">{{\n item.visible ? 'Visible' : 'Hidden'\n }}</span>\n </button>\n }\n </div>\n @if (showDataTable()) {\n <button\n type=\"button\"\n class=\"table-toggle\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-expanded]=\"tableExpanded()\"\n (click)=\"toggleTable()\"\n >\n {{ tableExpanded() ? 'Hide data table' : 'Show data table' }}\n </button>\n @if (tableExpanded() && currentState.kind === 'ready') {\n <nec-table-pager [pagination]=\"tablePagination\" [label]=\"title()\" />\n <div\n class=\"table-scroll\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"title() + ' data table'\"\n >\n <table>\n <caption>\n {{\n title()\n }}\n values\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Category</th>\n @for (item of legendItems(); track item.id) {\n <th scope=\"col\">{{ item.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableRows(); track row.id) {\n <tr\n [class.selected-row]=\"row.selected\"\n [attr.aria-current]=\"row.current ? 'true' : null\"\n >\n <th scope=\"row\">\n {{ row.category }}\n @if (row.selected) {\n <span class=\"selection-label\">Selected</span>\n }\n </th>\n @for (cell of row.cells; track cell.seriesId) {\n <td>\n @if (cell.value !== null) {\n <button\n type=\"button\"\n [attr.aria-label]=\"cell.actionLabel\"\n [attr.data-preview-row]=\"row.id\"\n [attr.data-preview-series]=\"cell.seriesId\"\n (click)=\"selectPoint(cell, 'table')\"\n >\n {{ cell.text }}\n </button>\n } @else {\n <span>{{ cell.text }}</span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n }\n </div>\n</nec-chart-frame>\n"],"mappings":";;;AAGA,MAAa,uBAAuB,IAAI,eAEtC,wBAAwB;CACxB,YAAY;CACZ,qBAAqB,OAAO,yDAAkB,CAAC,MAAM,WAAW,OAAO,kBAAkB;AAC1F,CAAA;ACDD,SAAS,WAAW,OAAe,QAAc;CAC/C,IAAI,iBAAiB,KAAK,KAAK,GAC7B,OAAO,QAAQ;EAAC;EAAG;EAAG;CAAC,CAAC,CAAC,KAAK,WAAW,OAAO,SAAS,MAAM,MAAM,QAAQ,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,EAAC,GAAI,OAAM;CACpH,MAAM,OAAO,MAAM,MACjB,6EAA6E;CAE/E,OAAO,OACH,QAAQ,KAAK,GAAE,GAAI,KAAK,GAAE,GAAI,KAAK,GAAE,GAAI,OAAO,KAAK,MAAM,CAAC,IAAI,OAAM,KACtE;AACN;AACA,SAAgB,iBACd,SACA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A;;AAQnC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAVrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SACjB;IAAC;IAAY;IAAa;GAAW;GAAC,iBAM9B,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,wjFAAA,wrBAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"mantha911-ng-echarts-area.mjs","names":[],"sources":["../../../projects/chart-library/area/src/lib/area-browser.ts","../../../projects/chart-library/area/src/lib/area-options.ts","../../../projects/chart-library/area/src/lib/area-chart.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.html"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { AreaOption } from './area-options';\nexport const AREA_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<AreaOption>>\n>('Area renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./area-renderer').then((module) => module.createAreaRenderer),\n});\n","import type { LineSeriesOption } from 'echarts/charts';\nimport {\n ɵbuildCurveOptions,\n ɵbuildAreaFill,\n type ɵCartesianContext,\n type ɵCurveOption,\n} from '@mantha911/ng-echarts/core';\nexport type AreaOption = ɵCurveOption;\nexport function buildAreaOptions<T>(\n context: ɵCartesianContext<T>,\n smooth: boolean,\n showPoints: boolean,\n stacked: boolean,\n gradient: boolean,\n): AreaOption {\n const options = ɵbuildCurveOptions(context, smooth, showPoints);\n if (!Array.isArray(options.series)) throw new Error('Expected curve series');\n return {\n ...options,\n series: options.series.map((item): LineSeriesOption => {\n const color = typeof item.lineStyle?.color === 'string' ? item.lineStyle.color : '#047857';\n return {\n ...item,\n stack: stacked ? 'total' : undefined,\n stackStrategy: 'samesign',\n triggerEvent: true,\n areaStyle: ɵbuildAreaFill(color, gradient),\n };\n }),\n };\n}\n","import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵTablePager,\n ɵCartesianChart,\n type ɵCartesianContext,\n} from '@mantha911/ng-echarts/core';\nimport { AREA_RENDERER_LOADER } from './area-browser';\nimport { buildAreaOptions, type AreaOption } from './area-options';\n@Component({\n selector: 'nec-area-chart',\n imports: [ChartFrame, ɵChartStage, ɵTablePager],\n templateUrl: '../../../core/src/lib/cartesian-chart.html',\n styleUrls: [\n '../../../core/src/lib/cartesian-chart.css',\n '../../../core/src/lib/chart-controls.css',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AreaChart<T extends object> extends ɵCartesianChart<T, AreaOption> {\n readonly smooth = input(false);\n readonly showPoints = input(false);\n readonly stacked = input(false);\n readonly gradient = input(true);\n private readonly loader = inject(AREA_RENDERER_LOADER);\n protected override renderer() {\n return this.loader();\n }\n protected override familyConfiguration() {\n return {\n smooth: this.smooth(),\n showPoints: this.showPoints(),\n stacked: this.stacked(),\n gradient: this.gradient(),\n };\n }\n protected override familyError() {\n return typeof this.smooth() === 'boolean' &&\n typeof this.showPoints() === 'boolean' &&\n typeof this.stacked() === 'boolean' &&\n typeof this.gradient() === 'boolean'\n ? null\n : 'Area settings must be booleans.';\n }\n protected override buildOptions(context: ɵCartesianContext<T>): AreaOption {\n return buildAreaOptions(\n context,\n this.smooth(),\n this.showPoints(),\n this.stacked(),\n this.gradient(),\n );\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n (retry)=\"retryRenderer()\"\n >\n <div\n #plot\n class=\"plot\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n aria-hidden=\"true\"\n ></div>\n\n @if (currentState.kind === 'ready' && allSeriesHidden()) {\n <div class=\"plot-message\" role=\"status\">\n <span>All series are hidden. Choose a series below.</span>\n </div>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <div class=\"legend\" aria-label=\"Chart series\">\n @for (item of legendItems(); track item.id) {\n <button\n type=\"button\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-pressed]=\"item.visible\"\n (click)=\"toggleSeries(item.id)\"\n >\n <span class=\"swatch\" [style.background]=\"item.color\" aria-hidden=\"true\"></span>\n {{ item.label }}\n <span class=\"visibility\" [class.legend-note]=\"false\">{{\n item.visible ? 'Visible' : 'Hidden'\n }}</span>\n </button>\n }\n </div>\n @if (showDataTable()) {\n <button\n type=\"button\"\n class=\"table-toggle\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-expanded]=\"tableExpanded()\"\n (click)=\"toggleTable()\"\n >\n {{ tableExpanded() ? 'Hide data table' : 'Show data table' }}\n </button>\n @if (tableExpanded() && currentState.kind === 'ready') {\n <nec-table-pager [pagination]=\"tablePagination\" [label]=\"title()\" />\n <div\n class=\"table-scroll\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"title() + ' data table'\"\n >\n <table>\n <caption>\n {{\n title()\n }}\n values\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Category</th>\n @for (item of legendItems(); track item.id) {\n <th scope=\"col\">{{ item.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableRows(); track row.id) {\n <tr\n [class.selected-row]=\"row.selected\"\n [attr.aria-current]=\"row.current ? 'true' : null\"\n >\n <th scope=\"row\">\n {{ row.category }}\n @if (row.selected) {\n <span class=\"selection-label\">Selected</span>\n }\n </th>\n @for (cell of row.cells; track cell.seriesId) {\n <td>\n @if (cell.value !== null) {\n <button\n type=\"button\"\n [attr.aria-label]=\"cell.actionLabel\"\n [attr.data-preview-row]=\"row.id\"\n [attr.data-preview-series]=\"cell.seriesId\"\n (click)=\"selectPoint(cell, 'table')\"\n >\n {{ cell.text }}\n </button>\n } @else {\n <span>{{ cell.text }}</span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n }\n </div>\n</nec-chart-frame>\n"],"mappings":";;;AAGA,MAAa,uBAAuB,IAAI,eAEtC,wBAAwB;CACxB,YAAY;CACZ,qBAAqB,OAAO,yDAAkB,CAAC,MAAM,WAAW,OAAO,kBAAkB;AAC1F,CAAA;ACAD,SAAgB,iBACd,SACA,QACA,YACA,SACA,UAAiB;CAEjB,MAAM,UAAU,mBAAmB,SAAS,QAAQ,UAAU;CAC9D,IAAI,CAAC,MAAM,QAAQ,QAAQ,MAAM,GAAG,MAAM,IAAI,MAAM,uBAAuB;CAC3E,OAAO;EACL,GAAG;EACH,QAAQ,QAAQ,OAAO,KAAK,SAA0B;GACpD,MAAM,QAAQ,OAAO,KAAK,WAAW,UAAU,WAAW,KAAK,UAAU,QAAQ;GACjF,OAAO;IACL,GAAG;IACH,OAAO,UAAU,UAAU;IAC3B,eAAe;IACf,cAAc;IACd,WAAW,eAAe,OAAO,QAAQ;GAC1C;EACH,CAAC;CACF;AACH;ACVA,IAAa,YAAb,MAAa,kBAAoC,gBAA8B;CACpE,SAAS,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACrB,aAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,UAAU,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,WAAW,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACd,SAAS,OAAO,oBAAoB;CAClC,WAAQ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;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,OAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAW,UAAA;IAAA,QAAA,CAAA,cAAA,OAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAQnC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAVrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SACjB;IAAC;IAAY;IAAa;GAAW;GAAC,iBAM9B,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,wjFAAA,wrBAAA;EAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, InjectionToken, inject } from "@angular/core";
3
- import { ChartFrame, ɵCartesianChart, ɵChartStage, ɵTablePager, ɵbuildCartesianOptions } from "@mantha911/ng-echarts/core";
3
+ import { ChartFrame, ɵCartesianChart, ɵChartStage, ɵTablePager, ɵbuildAreaFill, ɵbuildCartesianOptions } from "@mantha911/ng-echarts/core";
4
4
  const COMPOSED_RENDERER_LOADER = new InjectionToken("Composed renderer loader", {
5
5
  providedIn: "root",
6
6
  factory: () => () => import("./mantha911-ng-echarts-composed-composed-renderer-C9EFo56K.mjs").then((module) => module.createComposedRenderer)
@@ -19,10 +19,31 @@ function buildComposedOptions(context, series) {
19
19
  series: series.flatMap((item, index) => {
20
20
  if (hiddenIds.has(item.id)) return [];
21
21
  const color = tokens.series[index % tokens.series.length] ?? "#047857";
22
- const data = model.rows.map((row) => ({
23
- id: row.id,
24
- value: row.points[index]?.value ?? "-"
25
- }));
22
+ const data = model.rows.map((row) => {
23
+ const value = row.points[index]?.value ?? null;
24
+ let borderRadius = 0;
25
+ if (item.kind === "bar" && item.stack !== void 0 && value !== null && value !== 0) {
26
+ if (!series.some((later, laterIndex) => {
27
+ const other = row.points[laterIndex]?.value ?? 0;
28
+ return laterIndex > index && later.kind === "bar" && later.stack === item.stack && !hiddenIds.has(later.id) && other !== 0 && Math.sign(other) === Math.sign(value);
29
+ })) borderRadius = value < 0 ? [
30
+ 0,
31
+ 0,
32
+ 2,
33
+ 2
34
+ ] : [
35
+ 2,
36
+ 2,
37
+ 0,
38
+ 0
39
+ ];
40
+ }
41
+ return {
42
+ id: row.id,
43
+ value: value ?? "-",
44
+ ...item.kind === "bar" && item.stack !== void 0 ? { itemStyle: { borderRadius } } : {}
45
+ };
46
+ });
26
47
  const identity = {
27
48
  id: item.id,
28
49
  name: item.label,
@@ -31,27 +52,34 @@ function buildComposedOptions(context, series) {
31
52
  return item.kind === "bar" ? [{
32
53
  ...identity,
33
54
  type: "bar",
55
+ stack: item.stack === void 0 ? void 0 : `nec-bar:${item.stack}`,
56
+ stackStrategy: "samesign",
34
57
  z: 2,
35
58
  barMaxWidth: 48,
36
59
  itemStyle: {
37
60
  color,
38
- borderRadius: 2
61
+ borderRadius: item.stack === void 0 ? 2 : 0
39
62
  }
40
63
  }] : [{
41
64
  ...identity,
42
65
  type: "line",
43
- z: 3,
66
+ z: item.kind === "area" ? 1 : 3,
67
+ ...item.kind === "area" ? {
68
+ stack: item.stack === void 0 ? void 0 : `nec-area:${item.stack}`,
69
+ stackStrategy: "samesign",
70
+ areaStyle: ɵbuildAreaFill(color, item.gradient ?? true)
71
+ } : {},
44
72
  smooth: item.smooth ?? false,
45
73
  showSymbol: item.showPoints ?? true,
46
74
  connectNulls: false,
47
- symbol: "diamond",
75
+ symbol: item.kind === "area" ? "circle" : "diamond",
48
76
  clip: false,
49
77
  symbolSize: 7,
50
- triggerEvent: "line",
78
+ triggerEvent: item.kind === "area" ? true : "line",
51
79
  lineStyle: {
52
80
  color,
53
- width: 2.5,
54
- type: "dashed",
81
+ width: item.kind === "area" ? 2 : 2.5,
82
+ type: item.kind === "area" ? "solid" : "dashed",
55
83
  cap: "round"
56
84
  },
57
85
  itemStyle: {
@@ -66,9 +94,17 @@ function buildComposedOptions(context, series) {
66
94
  function composedSeriesError(series) {
67
95
  if (!Array.isArray(series)) return "Chart data and series must be arrays.";
68
96
  for (const item of series) {
69
- if (!item || !["bar", "line"].includes(item.kind)) return "Composed series require a 'bar' or 'line' kind.";
97
+ if (!item || ![
98
+ "bar",
99
+ "line",
100
+ "area"
101
+ ].includes(item.kind)) return "Composed series require a 'bar', 'line' or 'area' kind.";
70
102
  if (item.kind === "bar" && (item.smooth !== void 0 || item.showPoints !== void 0)) return "Line settings cannot be used on bar series.";
71
- if (item.kind === "line" && (item.smooth !== void 0 && typeof item.smooth !== "boolean" || item.showPoints !== void 0 && typeof item.showPoints !== "boolean")) return "Line settings must be booleans.";
103
+ if (item.kind !== "line" && item.stack !== void 0 && (typeof item.stack !== "string" || !item.stack.trim() || item.stack !== item.stack.trim())) return "Bar and area stack names must be nonempty strings without surrounding whitespace.";
104
+ if (item.kind !== "area" && item.gradient !== void 0) return "Fill settings require an area series.";
105
+ if (item.kind === "area" && item.gradient !== void 0 && typeof item.gradient !== "boolean") return "Area gradient must be a boolean.";
106
+ if (item.kind === "line" && item.stack !== void 0) return "Stack settings cannot be used on line series.";
107
+ if (item.kind !== "bar" && (item.smooth !== void 0 && typeof item.smooth !== "boolean" || item.showPoints !== void 0 && typeof item.showPoints !== "boolean")) return "Curve settings must be booleans.";
72
108
  }
73
109
  return null;
74
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mantha911-ng-echarts-composed.mjs","names":[],"sources":["../../../projects/chart-library/composed/src/lib/composed-browser.ts","../../../projects/chart-library/composed/src/lib/composed-options.ts","../../../projects/chart-library/composed/src/lib/composed-types.ts","../../../projects/chart-library/composed/src/lib/composed-chart.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.html"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { ComposedOption } from './composed-options';\nexport const COMPOSED_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<ComposedOption>>\n>('Composed renderer loader', {\n providedIn: 'root',\n factory: () => () =>\n import('./composed-renderer').then((module) => module.createComposedRenderer),\n});\n","import type { BarSeriesOption, LineSeriesOption } from 'echarts/charts';\nimport type { GridComponentOption, TooltipComponentOption } from 'echarts/components';\nimport type { ComposeOption } from 'echarts/core';\nimport { ɵbuildCartesianOptions, type ɵCartesianContext } from '@mantha911/ng-echarts/core';\nimport type { ComposedSeries } from './composed-types';\nexport type ComposedOption = ComposeOption<\n BarSeriesOption | LineSeriesOption | GridComponentOption | TooltipComponentOption\n>;\n\nexport function buildComposedOptions<T>(\n context: ɵCartesianContext<T>,\n series: readonly ComposedSeries<T>[],\n): ComposedOption {\n const { model, hiddenIds, tokens, animation, format, categoryTicks } = context;\n const common = ɵbuildCartesianOptions(\n model,\n hiddenIds,\n tokens,\n false,\n animation,\n format,\n categoryTicks,\n );\n const categoryAxis = common.xAxis;\n if (categoryAxis.type !== 'category') throw new Error('Expected category axis');\n return {\n ...common,\n // Keep category centers stable even while every bar is hidden.\n xAxis: { ...categoryAxis, boundaryGap: true },\n series: series.flatMap((item, index): (BarSeriesOption | LineSeriesOption)[] => {\n if (hiddenIds.has(item.id)) return [];\n const color = tokens.series[index % tokens.series.length] ?? '#047857';\n const data = model.rows.map((row) => ({\n id: row.id,\n value: row.points[index]?.value ?? '-',\n }));\n const identity = { id: item.id, name: item.label, data };\n return item.kind === 'bar'\n ? [\n {\n ...identity,\n type: 'bar',\n z: 2,\n barMaxWidth: 48,\n itemStyle: { color, borderRadius: 2 },\n },\n ]\n : [\n {\n ...identity,\n type: 'line',\n z: 3,\n smooth: item.smooth ?? false,\n showSymbol: item.showPoints ?? true,\n connectNulls: false,\n symbol: 'diamond',\n clip: false,\n symbolSize: 7,\n triggerEvent: 'line',\n lineStyle: { color, width: 2.5, type: 'dashed', cap: 'round' },\n itemStyle: { color: tokens.background, borderColor: color, borderWidth: 2 },\n },\n ];\n }),\n };\n}\n","import type { ChartSeries } from '@mantha911/ng-echarts/core';\n\nexport interface ComposedBarSeries<T> extends ChartSeries<T> {\n readonly kind: 'bar';\n readonly smooth?: never;\n readonly showPoints?: never;\n}\nexport interface ComposedLineSeries<T> extends ChartSeries<T> {\n readonly kind: 'line';\n readonly smooth?: boolean;\n readonly showPoints?: boolean;\n}\n/** Series share one category axis and one numeric scale; measures must use comparable units. */\nexport type ComposedSeries<T> = ComposedBarSeries<T> | ComposedLineSeries<T>;\n\nexport function composedSeriesError<T>(series: readonly ComposedSeries<T>[]): string | null {\n if (!Array.isArray(series)) return 'Chart data and series must be arrays.';\n for (const item of series) {\n if (!item || !['bar', 'line'].includes(item.kind))\n return \"Composed series require a 'bar' or 'line' kind.\";\n if (item.kind === 'bar' && (item.smooth !== undefined || item.showPoints !== undefined))\n return 'Line settings cannot be used on bar series.';\n if (\n item.kind === 'line' &&\n ((item.smooth !== undefined && typeof item.smooth !== 'boolean') ||\n (item.showPoints !== undefined && typeof item.showPoints !== 'boolean'))\n )\n return 'Line settings must be booleans.';\n }\n return null;\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵTablePager,\n ɵCartesianChart,\n type ɵCartesianContext,\n} from '@mantha911/ng-echarts/core';\nimport { COMPOSED_RENDERER_LOADER } from './composed-browser';\nimport { buildComposedOptions, type ComposedOption } from './composed-options';\nimport { composedSeriesError, type ComposedSeries } from './composed-types';\n@Component({\n selector: 'nec-composed-chart',\n imports: [ChartFrame, ɵChartStage, ɵTablePager],\n templateUrl: '../../../core/src/lib/cartesian-chart.html',\n styleUrls: [\n '../../../core/src/lib/cartesian-chart.css',\n '../../../core/src/lib/chart-controls.css',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComposedChart<T extends object> extends ɵCartesianChart<\n T,\n ComposedOption,\n ComposedSeries<T>\n> {\n private readonly loader = inject(COMPOSED_RENDERER_LOADER);\n protected override renderer() {\n return this.loader();\n }\n protected override familyConfiguration() {\n return this.series();\n }\n protected override familyError() {\n return composedSeriesError(this.series());\n }\n protected override buildOptions(context: ɵCartesianContext<T>): ComposedOption {\n return buildComposedOptions(context, this.series());\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n (retry)=\"retryRenderer()\"\n >\n <div\n #plot\n class=\"plot\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n aria-hidden=\"true\"\n ></div>\n\n @if (currentState.kind === 'ready' && allSeriesHidden()) {\n <div class=\"plot-message\" role=\"status\">\n <span>All series are hidden. Choose a series below.</span>\n </div>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <div class=\"legend\" aria-label=\"Chart series\">\n @for (item of legendItems(); track item.id) {\n <button\n type=\"button\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-pressed]=\"item.visible\"\n (click)=\"toggleSeries(item.id)\"\n >\n <span class=\"swatch\" [style.background]=\"item.color\" aria-hidden=\"true\"></span>\n {{ item.label }}\n <span class=\"visibility\" [class.legend-note]=\"false\">{{\n item.visible ? 'Visible' : 'Hidden'\n }}</span>\n </button>\n }\n </div>\n @if (showDataTable()) {\n <button\n type=\"button\"\n class=\"table-toggle\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-expanded]=\"tableExpanded()\"\n (click)=\"toggleTable()\"\n >\n {{ tableExpanded() ? 'Hide data table' : 'Show data table' }}\n </button>\n @if (tableExpanded() && currentState.kind === 'ready') {\n <nec-table-pager [pagination]=\"tablePagination\" [label]=\"title()\" />\n <div\n class=\"table-scroll\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"title() + ' data table'\"\n >\n <table>\n <caption>\n {{\n title()\n }}\n values\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Category</th>\n @for (item of legendItems(); track item.id) {\n <th scope=\"col\">{{ item.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableRows(); track row.id) {\n <tr\n [class.selected-row]=\"row.selected\"\n [attr.aria-current]=\"row.current ? 'true' : null\"\n >\n <th scope=\"row\">\n {{ row.category }}\n @if (row.selected) {\n <span class=\"selection-label\">Selected</span>\n }\n </th>\n @for (cell of row.cells; track cell.seriesId) {\n <td>\n @if (cell.value !== null) {\n <button\n type=\"button\"\n [attr.aria-label]=\"cell.actionLabel\"\n [attr.data-preview-row]=\"row.id\"\n [attr.data-preview-series]=\"cell.seriesId\"\n (click)=\"selectPoint(cell, 'table')\"\n >\n {{ cell.text }}\n </button>\n } @else {\n <span>{{ cell.text }}</span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n }\n </div>\n</nec-chart-frame>\n"],"mappings":";;;AAGA,MAAa,2BAA2B,IAAI,eAE1C,4BAA4B;CAC5B,YAAY;CACZ,qBACE,OAAO,iEAAsB,CAAC,MAAM,WAAW,OAAO,sBAAsB;AAC/E,CAAA;ACAD,SAAgB,qBACd,SACA,QAAoC;CAEpC,MAAM,EAAE,OAAO,WAAW,QAAQ,WAAW,QAAQ,kBAAkB;CACvE,MAAM,SAAS,uBACb,OACA,WACA,QACA,OACA,WACA,QACA,aAAa;CAEf,MAAM,eAAe,OAAO;CAC5B,IAAI,aAAa,SAAS,YAAY,MAAM,IAAI,MAAM,wBAAwB;CAC9E,OAAO;EACL,GAAG;EAEH,OAAO;GAAE,GAAG;GAAc,aAAa;EAAI;EAC3C,QAAQ,OAAO,SAAS,MAAM,UAAiD;GAC7E,IAAI,UAAU,I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AAmB;EACpC,OAAO,KAAK,OAAM;CACpB;CACmB,cAAW;EAC5B,OAAO,oBAAoB,KAAK,OAAM,CAAE;CAC1C;CACmB,aAAa,SAA6B;EAC3D,OAAO,qBAAqB,SAAS,KAAK,OAAM,CAAE;CACpD;CAjBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAa,MAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAb,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAa,cAAA;EAAA,UAAA;EAAA,iBAAA;EAAA,UAAA;EAAA,UCrB1B;EA0HA,QAAA,CAAA,wjFAAA,wrBAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MD7GY;IAAU,UAAA;IAAA,QAAA,CAAA,SAAA,aAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAW,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,OAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAW,UAAA;IAAA,QAAA,CAAA,cAAA,OAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAQnC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EAVzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,SACrB;IAAC;IAAY;IAAa;GAAW;GAAC,iBAM9B,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,wjFAAA,wrBAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"mantha911-ng-echarts-composed.mjs","names":[],"sources":["../../../projects/chart-library/composed/src/lib/composed-browser.ts","../../../projects/chart-library/composed/src/lib/composed-options.ts","../../../projects/chart-library/composed/src/lib/composed-types.ts","../../../projects/chart-library/composed/src/lib/composed-chart.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.html"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { ComposedOption } from './composed-options';\nexport const COMPOSED_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<ComposedOption>>\n>('Composed renderer loader', {\n providedIn: 'root',\n factory: () => () =>\n import('./composed-renderer').then((module) => module.createComposedRenderer),\n});\n","import type { BarSeriesOption, LineSeriesOption } from 'echarts/charts';\nimport type { GridComponentOption, TooltipComponentOption } from 'echarts/components';\nimport type { ComposeOption } from 'echarts/core';\nimport {\n ɵbuildCartesianOptions,\n ɵbuildAreaFill,\n type ɵCartesianContext,\n} from '@mantha911/ng-echarts/core';\nimport type { ComposedSeries } from './composed-types';\nexport type ComposedOption = ComposeOption<\n BarSeriesOption | LineSeriesOption | GridComponentOption | TooltipComponentOption\n>;\n\nexport function buildComposedOptions<T>(\n context: ɵCartesianContext<T>,\n series: readonly ComposedSeries<T>[],\n): ComposedOption {\n const { model, hiddenIds, tokens, animation, format, categoryTicks } = context;\n const common = ɵbuildCartesianOptions(\n model,\n hiddenIds,\n tokens,\n false,\n animation,\n format,\n categoryTicks,\n );\n const categoryAxis = common.xAxis;\n if (categoryAxis.type !== 'category') throw new Error('Expected category axis');\n return {\n ...common,\n // Keep category centers stable even while every bar is hidden.\n xAxis: { ...categoryAxis, boundaryGap: true },\n series: series.flatMap((item, index): (BarSeriesOption | LineSeriesOption)[] => {\n if (hiddenIds.has(item.id)) return [];\n const color = tokens.series[index % tokens.series.length] ?? '#047857';\n const data = model.rows.map((row) => {\n const value = row.points[index]?.value ?? null;\n let borderRadius: number | number[] = 0;\n if (item.kind === 'bar' && item.stack !== undefined && value !== null && value !== 0) {\n const covered = series.some((later, laterIndex) => {\n const other = row.points[laterIndex]?.value ?? 0;\n return (\n laterIndex > index &&\n later.kind === 'bar' &&\n later.stack === item.stack &&\n !hiddenIds.has(later.id) &&\n other !== 0 &&\n Math.sign(other) === Math.sign(value)\n );\n });\n if (!covered) borderRadius = value < 0 ? [0, 0, 2, 2] : [2, 2, 0, 0];\n }\n return {\n id: row.id,\n value: value ?? '-',\n ...(item.kind === 'bar' && item.stack !== undefined\n ? { itemStyle: { borderRadius } }\n : {}),\n };\n });\n const identity = { id: item.id, name: item.label, data };\n return item.kind === 'bar'\n ? [\n {\n ...identity,\n type: 'bar',\n stack: item.stack === undefined ? undefined : `nec-bar:${item.stack}`,\n stackStrategy: 'samesign',\n z: 2,\n barMaxWidth: 48,\n itemStyle: { color, borderRadius: item.stack === undefined ? 2 : 0 },\n },\n ]\n : [\n {\n ...identity,\n type: 'line',\n z: item.kind === 'area' ? 1 : 3,\n ...(item.kind === 'area'\n ? {\n stack: item.stack === undefined ? undefined : `nec-area:${item.stack}`,\n stackStrategy: 'samesign' as const,\n areaStyle: ɵbuildAreaFill(color, item.gradient ?? true),\n }\n : {}),\n smooth: item.smooth ?? false,\n showSymbol: item.showPoints ?? true,\n connectNulls: false,\n symbol: item.kind === 'area' ? 'circle' : 'diamond',\n clip: false,\n symbolSize: 7,\n triggerEvent: item.kind === 'area' ? true : 'line',\n lineStyle: {\n color,\n width: item.kind === 'area' ? 2 : 2.5,\n type: item.kind === 'area' ? 'solid' : 'dashed',\n cap: 'round',\n },\n itemStyle: { color: tokens.background, borderColor: color, borderWidth: 2 },\n },\n ];\n }),\n };\n}\n","import type { ChartSeries } from '@mantha911/ng-echarts/core';\n\nexport interface ComposedBarSeries<T> extends ChartSeries<T> {\n readonly kind: 'bar';\n readonly gradient?: never;\n /** Bars with the same nonempty name stack by sign; omission keeps a grouped bar. */\n readonly stack?: string;\n readonly smooth?: never;\n readonly showPoints?: never;\n}\nexport interface ComposedLineSeries<T> extends ChartSeries<T> {\n readonly kind: 'line';\n readonly gradient?: never;\n readonly stack?: never;\n readonly smooth?: boolean;\n readonly showPoints?: boolean;\n}\nexport interface ComposedAreaSeries<T> extends ChartSeries<T> {\n readonly kind: 'area';\n readonly stack?: string;\n readonly smooth?: boolean;\n readonly showPoints?: boolean;\n readonly gradient?: boolean;\n}\n/** Series share one category axis and one numeric scale; measures must use comparable units. */\nexport type ComposedSeries<T> =\n ComposedBarSeries<T> | ComposedLineSeries<T> | ComposedAreaSeries<T>;\n\nexport function composedSeriesError<T>(series: readonly ComposedSeries<T>[]): string | null {\n if (!Array.isArray(series)) return 'Chart data and series must be arrays.';\n for (const item of series) {\n if (!item || !['bar', 'line', 'area'].includes(item.kind))\n return \"Composed series require a 'bar', 'line' or 'area' kind.\";\n if (item.kind === 'bar' && (item.smooth !== undefined || item.showPoints !== undefined))\n return 'Line settings cannot be used on bar series.';\n if (\n item.kind !== 'line' &&\n item.stack !== undefined &&\n (typeof item.stack !== 'string' || !item.stack.trim() || item.stack !== item.stack.trim())\n )\n return 'Bar and area stack names must be nonempty strings without surrounding whitespace.';\n if (item.kind !== 'area' && item.gradient !== undefined)\n return 'Fill settings require an area series.';\n if (item.kind === 'area' && item.gradient !== undefined && typeof item.gradient !== 'boolean')\n return 'Area gradient must be a boolean.';\n if (item.kind === 'line' && item.stack !== undefined)\n return 'Stack settings cannot be used on line series.';\n if (\n item.kind !== 'bar' &&\n ((item.smooth !== undefined && typeof item.smooth !== 'boolean') ||\n (item.showPoints !== undefined && typeof item.showPoints !== 'boolean'))\n )\n return 'Curve settings must be booleans.';\n }\n return null;\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵTablePager,\n ɵCartesianChart,\n type ɵCartesianContext,\n} from '@mantha911/ng-echarts/core';\nimport { COMPOSED_RENDERER_LOADER } from './composed-browser';\nimport { buildComposedOptions, type ComposedOption } from './composed-options';\nimport { composedSeriesError, type ComposedSeries } from './composed-types';\n@Component({\n selector: 'nec-composed-chart',\n imports: [ChartFrame, ɵChartStage, ɵTablePager],\n templateUrl: '../../../core/src/lib/cartesian-chart.html',\n styleUrls: [\n '../../../core/src/lib/cartesian-chart.css',\n '../../../core/src/lib/chart-controls.css',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComposedChart<T extends object> extends ɵCartesianChart<\n T,\n ComposedOption,\n ComposedSeries<T>\n> {\n private readonly loader = inject(COMPOSED_RENDERER_LOADER);\n protected override renderer() {\n return this.loader();\n }\n protected override familyConfiguration() {\n return this.series();\n }\n protected override familyError() {\n return composedSeriesError(this.series());\n }\n protected override buildOptions(context: ɵCartesianContext<T>): ComposedOption {\n return buildComposedOptions(context, this.series());\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n (retry)=\"retryRenderer()\"\n >\n <div\n #plot\n class=\"plot\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n aria-hidden=\"true\"\n ></div>\n\n @if (currentState.kind === 'ready' && allSeriesHidden()) {\n <div class=\"plot-message\" role=\"status\">\n <span>All series are hidden. Choose a series below.</span>\n </div>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <div class=\"legend\" aria-label=\"Chart series\">\n @for (item of legendItems(); track item.id) {\n <button\n type=\"button\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-pressed]=\"item.visible\"\n (click)=\"toggleSeries(item.id)\"\n >\n <span class=\"swatch\" [style.background]=\"item.color\" aria-hidden=\"true\"></span>\n {{ item.label }}\n <span class=\"visibility\" [class.legend-note]=\"false\">{{\n item.visible ? 'Visible' : 'Hidden'\n }}</span>\n </button>\n }\n </div>\n @if (showDataTable()) {\n <button\n type=\"button\"\n class=\"table-toggle\"\n [disabled]=\"currentState.kind !== 'ready'\"\n [attr.aria-expanded]=\"tableExpanded()\"\n (click)=\"toggleTable()\"\n >\n {{ tableExpanded() ? 'Hide data table' : 'Show data table' }}\n </button>\n @if (tableExpanded() && currentState.kind === 'ready') {\n <nec-table-pager [pagination]=\"tablePagination\" [label]=\"title()\" />\n <div\n class=\"table-scroll\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"title() + ' data table'\"\n >\n <table>\n <caption>\n {{\n title()\n }}\n values\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Category</th>\n @for (item of legendItems(); track item.id) {\n <th scope=\"col\">{{ item.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableRows(); track row.id) {\n <tr\n [class.selected-row]=\"row.selected\"\n [attr.aria-current]=\"row.current ? 'true' : null\"\n >\n <th scope=\"row\">\n {{ row.category }}\n @if (row.selected) {\n <span class=\"selection-label\">Selected</span>\n }\n </th>\n @for (cell of row.cells; track cell.seriesId) {\n <td>\n @if (cell.value !== null) {\n <button\n type=\"button\"\n [attr.aria-label]=\"cell.actionLabel\"\n [attr.data-preview-row]=\"row.id\"\n [attr.data-preview-series]=\"cell.seriesId\"\n (click)=\"selectPoint(cell, 'table')\"\n >\n {{ cell.text }}\n </button>\n } @else {\n <span>{{ cell.text }}</span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n }\n </div>\n</nec-chart-frame>\n"],"mappings":";;;AAGA,MAAa,2BAA2B,IAAI,eAE1C,4BAA4B;CAC5B,YAAY;CACZ,qBACE,OAAO,iEAAsB,CAAC,MAAM,WAAW,OAAO,sBAAsB;AAC/E,CAAA;ACID,SAAgB,qBACd,SACA,QAAoC;CAEpC,MAAM,EAAE,OAAO,WAAW,QAAQ,WAAW,QAAQ,kBAAkB;CACvE,MAAM,SAAS,uBACb,OACA,WACA,QACA,OACA,WACA,QACA,aAAa;CAEf,M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CAAA,wjFAAA,wrBAAA;EAAA,CAAA"}
@@ -1561,6 +1561,34 @@ i0.ɵɵngDeclareClassMetadata({
1561
1561
  }]
1562
1562
  }
1563
1563
  });
1564
- export { ChartFrame, CartesianChart as ɵCartesianChart, ChartFocusKeeper as ɵChartFocusKeeper, ChartStage as ɵChartStage, PlotController as ɵPlotController, TablePager as ɵTablePager, TablePagination as ɵTablePagination, browserPlotEnvironment as ɵbrowserPlotEnvironment, buildCartesianOptions as ɵbuildCartesianOptions, buildCurveOptions as ɵbuildCurveOptions, createValueFormatting as ɵcreateValueFormatting, curvePoint as ɵcurvePoint, defaultCartesianTheme as ɵdefaultCartesianTheme, escapeTooltipText as ɵescapeTooltipText, formatCategoryTicks as ɵformatCategoryTicks, normalizeCartesianData as ɵnormalizeCartesianData, readCartesianTheme as ɵreadCartesianTheme, resolveCartesianState as ɵresolveCartesianState, tooltipMarkup as ɵtooltipMarkup, tooltipStyle as ɵtooltipStyle };
1564
+ function alphaColor(color, factor) {
1565
+ if (/^#[\da-f]{6}$/i.test(color)) return `rgba(${[
1566
+ 1,
1567
+ 3,
1568
+ 5
1569
+ ].map((offset) => Number.parseInt(color.slice(offset, offset + 2), 16)).join(",")},${factor})`;
1570
+ const rgba = color.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/);
1571
+ return rgba ? `rgba(${rgba[1]},${rgba[2]},${rgba[3]},${Number(rgba[4] ?? 1) * factor})` : "transparent";
1572
+ }
1573
+ function buildAreaFill(color, gradient) {
1574
+ return {
1575
+ opacity: 1,
1576
+ color: gradient ? {
1577
+ type: "linear",
1578
+ x: 0,
1579
+ y: 0,
1580
+ x2: 0,
1581
+ y2: 1,
1582
+ colorStops: [{
1583
+ offset: 0,
1584
+ color: alphaColor(color, .22)
1585
+ }, {
1586
+ offset: 1,
1587
+ color: alphaColor(color, .04)
1588
+ }]
1589
+ } : alphaColor(color, .16)
1590
+ };
1591
+ }
1592
+ export { ChartFrame, CartesianChart as ɵCartesianChart, ChartFocusKeeper as ɵChartFocusKeeper, ChartStage as ɵChartStage, PlotController as ɵPlotController, TablePager as ɵTablePager, TablePagination as ɵTablePagination, browserPlotEnvironment as ɵbrowserPlotEnvironment, buildAreaFill as ɵbuildAreaFill, buildCartesianOptions as ɵbuildCartesianOptions, buildCurveOptions as ɵbuildCurveOptions, createValueFormatting as ɵcreateValueFormatting, curvePoint as ɵcurvePoint, defaultCartesianTheme as ɵdefaultCartesianTheme, escapeTooltipText as ɵescapeTooltipText, formatCategoryTicks as ɵformatCategoryTicks, normalizeCartesianData as ɵnormalizeCartesianData, readCartesianTheme as ɵreadCartesianTheme, resolveCartesianState as ɵresolveCartesianState, tooltipMarkup as ɵtooltipMarkup, tooltipStyle as ɵtooltipStyle };
1565
1593
 
1566
1594
  //# sourceMappingURL=mantha911-ng-echarts-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mantha911-ng-echarts-core.mjs","names":["record"],"sources":["../../../projects/chart-library/core/src/lib/chart-frame.ts","../../../projects/chart-library/core/src/lib/chart-frame.html","../../../projects/chart-library/core/src/lib/tooltip.ts","../../../projects/chart-library/core/src/lib/cartesian-options.ts","../../../projects/chart-library/core/src/lib/cartesian-browser.ts","../../../projects/chart-library/core/src/lib/cartesian-model.ts","../../../projects/chart-library/core/src/lib/category-ticks.ts","../../../projects/chart-library/core/src/lib/value-formatting.ts","../../../projects/chart-library/core/src/lib/chart-focus.ts","../../../projects/chart-library/core/src/lib/table-pagination.ts","../../../projects/chart-library/core/src/lib/plot-controller.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.ts","../../../projects/chart-library/core/src/lib/curve-options.ts","../../../projects/chart-library/core/src/lib/curve-point.ts","../../../projects/chart-library/core/src/lib/chart-stage.ts","../../../projects/chart-library/core/src/lib/table-pager.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n/** Shared presentation shell; no renderer or chart lifecycle behavior yet. */\n@Component({\n selector: 'nec-chart-frame',\n templateUrl: './chart-frame.html',\n styleUrl: './chart-frame.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartFrame {\n readonly title = input.required<string>();\n readonly description = input('');\n}\n","<section class=\"chart-frame\" [attr.aria-label]=\"title()\">\n <header>\n <h2>{{ title() }}</h2>\n @if (description()) {\n <p>{{ description() }}</p>\n }\n </header>\n <ng-content />\n</section>\n","import type { CartesianThemeTokens } from './cartesian-options';\n\nexport function escapeTooltipText(value: string): string {\n return value.replace(\n /[&<>\"']/g,\n (character) =>\n ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;', \"'\": '&#39;' })[character]!,\n );\n}\n\nexport function tooltipStyle(tokens: CartesianThemeTokens) {\n return {\n backgroundColor: tokens.background,\n borderColor: tokens.border,\n textStyle: { color: tokens.text, fontFamily: tokens.fontFamily, fontSize: 12, lineHeight: 20 },\n padding: [10, 12] as [number, number],\n borderRadius: 8,\n extraCssText:\n 'max-width: min(280px, calc(100% - 16px)); white-space: normal; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.12);',\n };\n}\n\nexport interface TooltipRow {\n readonly label: string;\n readonly value: string;\n readonly color?: string;\n}\n\n/** Escape every consumer-supplied string at the final HTML boundary. */\nexport function tooltipMarkup(title: string, rows: readonly TooltipRow[]): string {\n const escape = escapeTooltipText;\n return `<div data-nec-tooltip><strong style=\"display:block;font-weight:600;margin-bottom:6px;overflow-wrap:anywhere\">${escape(title)}</strong>${rows\n .map(\n (row) =>\n `<div style=\"display:flex;align-items:baseline;gap:12px;margin-top:4px\">${row.color ? `<span aria-hidden=\"true\" style=\"flex:none;width:8px;height:8px;border-radius:2px;background:${escape(row.color)}\"></span>` : ''}<span style=\"flex:1;min-width:0;overflow-wrap:anywhere\">${escape(row.label)}</span><span style=\"flex:0 1 auto;min-width:0;max-width:65%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:right\">${escape(row.value)}</span></div>`,\n )\n .join('')}</div>`;\n}\n","import { tooltipStyle, tooltipMarkup } from './tooltip';\n// First two palette colors adapted from EvilCharts (2026 Gurbinder, MIT); see package third-party notice.\nimport type { ChartTheme } from './chart-types';\nimport type { CartesianModel } from './cartesian-model';\nexport interface CartesianThemeTokens {\n readonly fontFamily: string;\n readonly background: string;\n readonly text: string;\n readonly muted: string;\n readonly border: string;\n readonly series: readonly string[];\n}\n\nexport function defaultCartesianTheme(theme: ChartTheme): CartesianThemeTokens {\n return theme === 'dark'\n ? {\n fontFamily: 'system-ui, sans-serif',\n background: '#18202c',\n text: '#edf2fa',\n muted: '#b2bfd2',\n border: '#3b4a61',\n series: ['#10b981', '#f43f5e', '#60a5fa', '#fbbf24'],\n }\n : {\n fontFamily: 'system-ui, sans-serif',\n background: '#ffffff',\n text: '#18202c',\n muted: '#536176',\n border: '#d6dce5',\n series: ['#047857', '#be123c', '#2563eb', '#a16207'],\n };\n}\n\nexport { escapeTooltipText } from './tooltip';\n\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nexport function buildCartesianOptions<T>(\n model: Exclude<CartesianModel<T>, { kind: 'error' }>,\n hiddenIds: ReadonlySet<string>,\n tokens: CartesianThemeTokens,\n horizontal: boolean,\n animation: boolean,\n format: (value: number) => string,\n categoryTicks: readonly string[] = model.rows.map((row) => row.category),\n) {\n const hasVisibleSeries = model.series.some((series) => !hiddenIds.has(series.id));\n const categoryAxis = {\n type: 'category' as const,\n data: model.rows.map((row) => row.id),\n inverse: horizontal,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n color: tokens.muted,\n fontSize: 12,\n formatter: (_value: string, index: number) => categoryTicks[index] ?? '',\n },\n };\n const valueAxis = {\n type: 'value' as const,\n splitNumber: horizontal ? 3 : 5,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n show: hasVisibleSeries,\n color: tokens.muted,\n fontSize: 12,\n formatter: format,\n hideOverlap: true,\n },\n splitLine: {\n show: hasVisibleSeries,\n lineStyle: { color: tokens.border, type: 'dashed' as const },\n },\n };\n return {\n animation,\n animationDuration: 300,\n animationDurationUpdate: 200,\n backgroundColor: tokens.background,\n textStyle: { fontFamily: tokens.fontFamily, color: tokens.text },\n grid: {\n left: 12,\n right: 16,\n top: 12,\n bottom: 8,\n outerBoundsMode: 'same' as const,\n outerBoundsContain: 'axisLabel' as const,\n },\n xAxis: horizontal ? valueAxis : categoryAxis,\n yAxis: horizontal ? categoryAxis : valueAxis,\n tooltip: {\n trigger: 'axis' as const,\n confine: true,\n ...tooltipStyle(tokens),\n formatter: (params: unknown) => {\n const items = Array.isArray(params) ? params : [params];\n const first = items.find((item) => record(item) && record(item['data']));\n if (!record(first) || !record(first['data'])) return '';\n const rowId: unknown = first['data']['id'];\n const row = model.rows.find((candidate) => candidate.id === rowId);\n if (!row) return '';\n const values = row.points.flatMap((point, index) => {\n if (hiddenIds.has(point.seriesId)) return [];\n const label = model.series.find((item) => item.id === point.seriesId)?.label ?? '';\n return [\n {\n label,\n value: point.value === null ? 'Missing' : format(point.value),\n color: tokens.series[index % tokens.series.length] ?? '#047857',\n },\n ];\n });\n return tooltipMarkup(row.category, values);\n },\n },\n };\n}\n","import { defaultCartesianTheme, type CartesianThemeTokens } from './cartesian-options';\nimport type { ChartSeries, ChartTheme } from './chart-types';\nimport type { PlotRendererFactory, PlotEnvironment, PlotPoint } from './plot-controller';\n\n/** Delegate transient table interactions; large tables do not need per-cell listeners. */\nexport function observeTablePreviews(\n host: HTMLElement,\n onPreview: (point: PlotPoint | null, trigger: 'pointer' | 'focus') => void,\n): () => void {\n const action = (target: EventTarget | null) =>\n target instanceof Element\n ? target.closest<HTMLButtonElement>('tbody button[data-preview-row]')\n : null;\n const handle = (event: Event) => {\n const pointer = event.type.startsWith('pointer');\n if (pointer && (event as PointerEvent).pointerType === 'touch') return;\n const button = action(event.target);\n if (!button || !host.contains(button)) return;\n const related = action((event as FocusEvent).relatedTarget);\n if (related === button) return;\n const leaving = event.type === 'pointerout' || event.type === 'focusout';\n onPreview(\n leaving\n ? null\n : {\n rowId: button.dataset['previewRow']!,\n seriesId: button.dataset['previewSeries']!,\n },\n pointer ? 'pointer' : 'focus',\n );\n };\n const types = ['pointerover', 'pointerout', 'focusin', 'focusout'] as const;\n for (const type of types) host.addEventListener(type, handle);\n // Keyboard focus can arrive before Angular applies the opt-in input. Retain\n // that real focus when attaching, without moving focus or requiring another Tab.\n const focused = action(host.ownerDocument.activeElement);\n if (focused && host.contains(focused))\n onPreview(\n { rowId: focused.dataset['previewRow']!, seriesId: focused.dataset['previewSeries']! },\n 'focus',\n );\n return () => {\n for (const type of types) host.removeEventListener(type, handle);\n };\n}\nexport function browserPlotEnvironment<Option>(\n load: () => Promise<PlotRendererFactory<Option>>,\n host: HTMLElement,\n): PlotEnvironment<Option> {\n return {\n load: async () => {\n // Canvas text measurements must use the loaded host font from the first render.\n // A failed web font still permits the browser's normal fallback stack.\n const font = getComputedStyle(host).fontFamily || 'system-ui, sans-serif';\n const [factory] = await Promise.all([\n load(),\n host.ownerDocument.fonts?.load(`12px ${font}`).catch(() => undefined),\n ]);\n return factory;\n },\n observe: (host, onResize) => {\n const observer = new ResizeObserver(onResize);\n observer.observe(host);\n return () => observer.disconnect();\n },\n schedule: (callback) => requestAnimationFrame(callback),\n cancel: (id) => cancelAnimationFrame(id),\n };\n}\n\n/** Resolve inherited typography and CSS colors at the browser boundary. */\nexport function readCartesianTheme<T>(\n host: HTMLElement,\n theme: ChartTheme,\n series: readonly ChartSeries<T>[],\n plotSurface: HTMLElement,\n): CartesianThemeTokens {\n const defaults = defaultCartesianTheme(theme);\n const styles = getComputedStyle(host);\n const probe = host.ownerDocument.createElement('span');\n probe.style.cssText = 'position:absolute;visibility:hidden;pointer-events:none';\n plotSurface.append(probe);\n const canvas = host.ownerDocument.createElement('canvas');\n canvas.width = canvas.height = 1;\n const context = canvas.getContext('2d', { willReadFrequently: true });\n const resolve = (raw: string, fallback: string): string => {\n if (!raw || !CSS.supports('color', raw) || !context) return fallback;\n probe.style.color = raw;\n context.clearRect(0, 0, 1, 1);\n context.fillStyle = getComputedStyle(probe).color;\n context.fillRect(0, 0, 1, 1);\n const [r, g, b, a] = context.getImageData(0, 0, 1, 1).data;\n return `rgba(${r},${g},${b},${a! / 255})`;\n };\n const token = (name: string, fallback: string): string =>\n resolve(styles.getPropertyValue(`--nec-${name}`).trim(), fallback);\n try {\n return {\n fontFamily: styles.fontFamily || defaults.fontFamily,\n background: token('background', defaults.background),\n text: token('text', defaults.text),\n muted: token('muted', defaults.muted),\n border: token('border', defaults.border),\n series: series.map((item, index) => {\n const fallback = defaults.series[index % defaults.series.length]!;\n return item.color ? resolve(item.color, fallback) : token(`series-${index + 1}`, fallback);\n }),\n };\n } finally {\n probe.remove();\n }\n}\n","import type { ChartSeries, StringKey } from './chart-types';\n\nexport interface CartesianPoint<T> {\n readonly rowId: string;\n readonly seriesId: string;\n readonly row: T;\n readonly value: number | null;\n}\n\nexport interface CartesianRow<T> {\n readonly id: string;\n readonly category: string;\n readonly points: readonly CartesianPoint<T>[];\n}\n\nexport type CartesianModel<T> =\n | { readonly kind: 'error'; readonly message: string }\n | {\n readonly kind: 'empty' | 'ready';\n readonly rows: readonly CartesianRow<T>[];\n readonly series: readonly ChartSeries<T>[];\n };\n\nexport function normalizeCartesianData<T extends object>(\n data: readonly T[],\n rowIdKey: StringKey<T>,\n categoryKey: StringKey<T>,\n series: readonly ChartSeries<T>[],\n): CartesianModel<T> {\n const invalid = (message: string): CartesianModel<T> => ({ kind: 'error', message });\n if (!Array.isArray(data) || !Array.isArray(series)) {\n return invalid('Chart data and series must be arrays.');\n }\n const seriesIds = new Set<string>();\n for (const item of series) {\n if (!item || typeof item.id !== 'string' || !item.id || seriesIds.has(item.id)) {\n return invalid('Series require unique, nonempty string identifiers.');\n }\n if (typeof item.key !== 'string' || typeof item.label !== 'string') {\n return invalid('Series require a numeric field key and a text label.');\n }\n seriesIds.add(item.id);\n }\n const rowIds = new Set<string>();\n const rows: CartesianRow<T>[] = [];\n let hasValue = false;\n for (const row of data) {\n if (!row || typeof row !== 'object') return invalid('Each chart row must be an object.');\n const id = row[rowIdKey];\n const category = row[categoryKey];\n if (typeof id !== 'string' || !id || rowIds.has(id)) {\n return invalid('Rows require unique, nonempty string identifiers.');\n }\n if (typeof category !== 'string') return invalid('Category labels must be strings.');\n rowIds.add(id);\n const points: CartesianPoint<T>[] = [];\n for (const item of series) {\n const value: unknown = row[item.key];\n if (value != null && (typeof value !== 'number' || !Number.isFinite(value))) {\n return invalid('Measures must be finite numbers or missing values.');\n }\n if (typeof value === 'number') hasValue = true;\n points.push({\n rowId: id,\n seriesId: item.id,\n row,\n value: value == null ? null : (value as number),\n });\n }\n rows.push({ id, category, points });\n }\n return { kind: hasValue ? 'ready' : 'empty', rows, series };\n}\n\nexport type ChartState =\n | { readonly kind: 'ready' }\n | { readonly kind: 'loading' | 'empty' | 'error'; readonly message: string };\n\nexport function resolveCartesianState(\n applicationError: string | null,\n loading: boolean,\n model:\n { readonly kind: 'error'; readonly message: string } | { readonly kind: 'ready' | 'empty' },\n rendererError: boolean,\n configurationError: string | null,\n): ChartState {\n if (applicationError !== null)\n return { kind: 'error', message: applicationError || 'Unable to display chart.' };\n if (loading) return { kind: 'loading', message: 'Loading chart…' };\n if (model.kind === 'error') return model;\n if (configurationError) return { kind: 'error', message: configurationError };\n if (rendererError)\n return { kind: 'error', message: 'Unable to render chart. Try again or update the data.' };\n if (model.kind === 'empty') return { kind: 'empty', message: 'No chart data available.' };\n return { kind: 'ready' };\n}\n","import type { CategoryTickFormatter } from './chart-types';\n\n/** Evaluate consumer code before rendering, never from an ECharts callback. */\nexport function formatCategoryTicks(\n categories: readonly string[],\n formatter: CategoryTickFormatter | undefined,\n): { readonly labels: readonly string[]; readonly error: string | null } {\n try {\n if (formatter !== undefined && typeof formatter !== 'function') throw new TypeError();\n const labels = categories.map((category, index) => {\n const label = formatter ? formatter(category, index) : category;\n if (typeof label !== 'string') throw new TypeError();\n return label;\n });\n return { labels, error: null };\n } catch {\n return {\n labels: [],\n error: 'Category tick formatting failed. Use a function that returns text.',\n };\n }\n}\n","import type { ValueFormatter } from './chart-types';\n\nconst formatterError = 'Value formatting failed. Use a pure function that returns text.';\n\n/** Shared numeric text; missing observations never reach consumer callbacks. */\nexport function createValueFormatting(\n locale: string,\n options: Intl.NumberFormatOptions | undefined,\n formatter: ValueFormatter | undefined,\n values: readonly (number | null)[],\n): { readonly format: ValueFormatter; readonly error: string | null } {\n let numberFormat: Intl.NumberFormat;\n try {\n if (\n typeof locale !== 'string' ||\n !locale ||\n (options !== undefined &&\n (typeof options !== 'object' || options === null || Array.isArray(options)))\n )\n throw new TypeError();\n numberFormat = new Intl.NumberFormat(locale, options);\n } catch {\n return { format: () => '', error: 'The chart locale or number format options are invalid.' };\n }\n if (formatter === undefined) return { format: numberFormat.format, error: null };\n try {\n if (typeof formatter !== 'function') throw new TypeError();\n // Cache known observations so opening a table or tooltip never reruns consumer code.\n const labels = new Map<number | string, string>();\n const format: ValueFormatter = (value) => {\n const key = Object.is(value, -0) ? '-0' : value;\n if (labels.has(key)) return labels.get(key)!;\n try {\n const label = formatter(value);\n if (typeof label !== 'string') throw new TypeError();\n labels.set(key, label);\n return label;\n } catch {\n // Unexpected axis-tick failures are contained by the browser plot controller.\n throw new Error(formatterError);\n }\n };\n for (const value of values) if (value !== null) format(value);\n return { format, error: null };\n } catch {\n return { format: () => '', error: formatterError };\n }\n}\n","/** Keep native control focus when keyed DOM moves; never take it back from another control. */\nexport class ChartFocusKeeper {\n private remembered: HTMLElement | null = null;\n private readonly document: Document;\n private readonly onFocus = (event: FocusEvent): void => {\n const target = event.target;\n this.remembered = target instanceof HTMLElement && this.host.contains(target) ? target : null;\n };\n private readonly onPointer = (event: PointerEvent): void => {\n if (!(event.target instanceof Node) || !this.remembered?.contains(event.target))\n this.remembered = null;\n };\n\n constructor(private readonly host: HTMLElement) {\n this.document = host.ownerDocument;\n this.document.addEventListener('focusin', this.onFocus);\n this.document.addEventListener('pointerdown', this.onPointer);\n }\n\n restore(): void {\n const previous = this.remembered;\n if (\n !previous ||\n !this.document.hasFocus() ||\n this.document.activeElement !== this.document.body\n )\n return;\n if (this.available(previous)) {\n previous.focus({ preventScroll: true });\n return;\n }\n // The focused row/series disappeared, or ready UI changed to a status message.\n const selectors = [\n '.table-toggle',\n '.legend button',\n '[role=\"alert\"], [role=\"status\"]',\n '.chart-frame',\n ];\n let fallback: HTMLElement | undefined;\n for (const selector of selectors) {\n fallback = [...this.host.querySelectorAll<HTMLElement>(selector)].find((element) =>\n this.available(element),\n );\n if (fallback) break;\n }\n this.remembered = null;\n if (fallback) {\n if (fallback.tagName !== 'BUTTON') fallback.tabIndex = -1;\n fallback.focus({ preventScroll: true });\n }\n }\n\n private available(element: HTMLElement): boolean {\n return (\n element.isConnected &&\n this.host.contains(element) &&\n !element.matches(':disabled') &&\n !element.closest('[inert], [hidden], [aria-hidden=\"true\"]')\n );\n }\n\n destroy(): void {\n this.document.removeEventListener('focusin', this.onFocus);\n this.document.removeEventListener('pointerdown', this.onPointer);\n this.remembered = null;\n }\n}\n","import { computed, linkedSignal } from '@angular/core';\n\n/** Internal table window; paging never changes plot data or selection ownership. */\nexport class TablePagination {\n readonly error = computed(() => {\n const size = this.pageSize();\n return size === null || (Number.isSafeInteger(size) && size > 0)\n ? null\n : 'Table page size must be a positive safe integer or null.';\n });\n readonly total = computed(() => {\n const rows = this.data();\n return Array.isArray(rows) ? rows.length : 0;\n });\n private readonly requestedPage = linkedSignal(() => {\n // New immutable data and page-size changes restart at the first page.\n this.data();\n this.pageSize();\n return 0;\n });\n readonly count = computed(() => {\n const size = this.pageSize();\n return !this.error() && size !== null ? Math.max(1, Math.ceil(this.total() / size)) : 1;\n });\n readonly page = computed(() => Math.min(this.requestedPage(), this.count() - 1));\n readonly start = computed(() => this.page() * (this.pageSize() ?? this.total()));\n readonly end = computed(() =>\n Math.min(this.total(), this.start() + (this.pageSize() ?? this.total())),\n );\n\n constructor(\n private readonly data: () => readonly unknown[],\n private readonly pageSize: () => number | null,\n ) {}\n\n rows<T>(rows: readonly T[]): readonly T[] {\n return this.pageSize() === null ? rows : rows.slice(this.start(), this.end());\n }\n\n move(delta: number): void {\n this.requestedPage.set(Math.max(0, Math.min(this.page() + delta, this.count() - 1)));\n }\n}\n","export interface PlotPoint {\n readonly rowId: string;\n readonly seriesId: string;\n}\n\nexport interface PlotRenderer<Option> {\n update(options: Option): void;\n /** A following update owns option rebuilding when optionsPending is true. */\n resize(context?: { readonly optionsPending: boolean }): void;\n dispose(): void;\n}\n\nexport type PlotRendererFactory<Option> = (\n host: HTMLElement,\n onPoint: (point: PlotPoint) => void,\n onRange?: (rowIds: readonly string[], snapshot: unknown) => void,\n onPreview?: (point: PlotPoint | null) => void,\n) => PlotRenderer<Option>;\n\nexport interface PlotEnvironment<Option> {\n load(): Promise<PlotRendererFactory<Option>>;\n observe(host: HTMLElement, onResize: () => void): () => void;\n schedule(callback: () => void): number;\n cancel(id: number): void;\n}\n\n/** Coordinates browser work; builders and Angular templates never own chart instances. */\nexport class PlotController<Option> {\n private options: Option | null = null;\n private renderer: PlotRenderer<Option> | null = null;\n private frame: number | null = null;\n private loading = false;\n private dirty = false;\n private generation = 0;\n private destroyed = false;\n private width = 0;\n private height = 0;\n private readonly disconnect: () => void;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly environment: PlotEnvironment<Option>,\n private readonly onPoint: (point: PlotPoint) => void,\n private readonly onError: () => void,\n private readonly onRange: (rowIds: readonly string[], snapshot: unknown) => void = () => {},\n private readonly onPreview: (point: PlotPoint | null) => void = () => {},\n ) {\n this.disconnect = environment.observe(host, () => this.schedule());\n }\n\n update(options: Option | null): void {\n if (this.destroyed) return;\n this.options = options;\n this.dirty = true;\n if (options === null) {\n this.generation++;\n this.loading = false;\n this.cancelFrame();\n this.disposeRenderer();\n return;\n }\n this.schedule();\n }\n\n destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.generation++;\n this.cancelFrame();\n this.disconnect();\n this.disposeRenderer();\n }\n\n private schedule(): void {\n if (this.destroyed || !this.options || this.frame !== null) return;\n this.frame = this.environment.schedule(() => {\n this.frame = null;\n void this.render();\n });\n }\n\n private async render(): Promise<void> {\n if (this.destroyed || !this.options || !this.host.clientWidth || !this.host.clientHeight)\n return;\n // A queued observer delivery must not clear another render's pending import.\n if (!this.renderer && this.loading) return;\n const generation = this.generation;\n try {\n if (!this.renderer) {\n this.loading = true;\n const factory = await this.environment.load();\n if (this.destroyed || generation !== this.generation || !this.options) return;\n // Measure again after asynchronous loading; a formerly visible host may now be hidden.\n if (!this.host.clientWidth || !this.host.clientHeight) return;\n this.width = this.host.clientWidth;\n this.height = this.host.clientHeight;\n // Renderer factories initialize at the host's current size.\n this.renderer = factory(this.host, this.onPoint, this.onRange, this.onPreview);\n this.dirty = true;\n }\n const width = this.host.clientWidth;\n const height = this.host.clientHeight;\n if (width !== this.width || height !== this.height) {\n this.renderer.resize({ optionsPending: this.dirty });\n this.width = width;\n this.height = height;\n }\n if (this.dirty && this.options) {\n this.renderer.update(this.options);\n this.dirty = false;\n }\n } catch {\n if (!this.destroyed && generation === this.generation) {\n this.options = null;\n this.generation++;\n this.loading = false;\n this.cancelFrame();\n this.disposeRenderer();\n this.onError();\n }\n } finally {\n if (generation === this.generation) this.loading = false;\n }\n }\n\n private disposeRenderer(): void {\n this.renderer?.dispose();\n this.renderer = null;\n this.width = this.height = 0;\n }\n\n private cancelFrame(): void {\n if (this.frame !== null) this.environment.cancel(this.frame);\n this.frame = null;\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Directive,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n output,\n PLATFORM_ID,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n browserPlotEnvironment,\n readCartesianTheme,\n observeTablePreviews,\n} from './cartesian-browser';\nimport {\n normalizeCartesianData,\n resolveCartesianState,\n type CartesianModel,\n} from './cartesian-model';\nimport { defaultCartesianTheme, type CartesianThemeTokens } from './cartesian-options';\nimport type { PlotRendererFactory } from './plot-controller';\nimport { formatCategoryTicks } from './category-ticks';\nimport { createValueFormatting } from './value-formatting';\nimport { ChartFocusKeeper } from './chart-focus';\nimport { TablePagination } from './table-pagination';\nimport type {\n CategoryTickFormatter,\n ChartSeries,\n ChartTheme,\n LegendVisibilityChange,\n PointSelection,\n PointPreview,\n StringKey,\n ValueFormatter,\n} from './chart-types';\nimport { PlotController, type PlotPoint } from './plot-controller';\n\ninterface PlotPreviewSnapshot {\n readonly point: PlotPoint;\n readonly context: readonly unknown[];\n}\n\n/** Internal Cartesian behavior shared by the Cartesian entries; not a supported consumer API. */\n@Directive()\nexport abstract class CartesianChart<\n T extends object,\n Option,\n Series extends ChartSeries<T> = ChartSeries<T>,\n> {\n protected abstract renderer(): Promise<PlotRendererFactory<Option>>;\n protected abstract familyConfiguration(): unknown;\n protected abstract familyError(): string | null;\n protected abstract buildOptions(context: CartesianContext<T>): Option;\n /** A family can opt into controlled row feedback without changing point events. */\n protected rowSelectionId(): string | null {\n return null;\n }\n protected rowIsSelected(id: string): boolean {\n return id === this.rowSelectionId();\n }\n protected selectRange(_rowIds: readonly string[], _snapshot: unknown): void {}\n protected canPreview(): boolean {\n return false;\n }\n protected observePreviews(): boolean {\n return this.canPreview();\n }\n protected emitPreview(_point: PointPreview<T> | null): void {}\n private pointerPreview: { point: PlotPoint; source: 'plot' | 'table' } | null = null;\n private focusPreview: PlotPoint | null = null;\n private lastPreview: PointPreview<T> | null = null;\n private readonly plotContext = computed(() => [\n this.model(),\n this.settings(),\n this.hiddenIds(),\n this.formatting(),\n this.categoryTicks(),\n this.tokens(),\n this.tableExpanded(),\n this.tablePagination.page(),\n ]);\n private readonly plotPreview = linkedSignal<\n { readonly context: readonly unknown[]; readonly ready: boolean },\n PlotPreviewSnapshot | null\n >({\n source: () => ({ context: this.plotContext(), ready: this.state().kind === 'ready' }),\n computation: ({ context, ready }, previous) =>\n ready && previous?.value?.context === context ? previous.value : null,\n equal: (a, b) =>\n a?.context === b?.context &&\n a?.point.rowId === b?.point.rowId &&\n a?.point.seriesId === b?.point.seriesId,\n });\n private previewSnapshot: readonly unknown[] | null = null;\n private readonly previewContext = computed(() => [\n this.model(),\n this.settings(),\n this.hiddenIds(),\n this.tableExpanded(),\n this.tablePagination.page(),\n this.state(),\n ]);\n readonly title = input.required<string>();\n readonly description = input('');\n readonly data = input.required<readonly T[]>();\n readonly rowIdKey = input.required<StringKey<T>>();\n readonly categoryKey = input.required<StringKey<T>>();\n readonly series = input.required<readonly Series[]>();\n readonly height = input(320);\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly categoryTickFormatter = input<CategoryTickFormatter>();\n readonly showDataTable = input(true);\n readonly tablePageSize = input<number | null>(null);\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n readonly pointSelect = output<PointSelection<T>>();\n readonly legendChange = output<LegendVisibilityChange>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly hiddenIds = linkedSignal<readonly Series[], ReadonlySet<string>>({\n source: this.series,\n computation: (series, previous) => {\n const hidden = previous?.value ?? new Set<string>();\n // Valid removals still count while row data is loading or invalid.\n if (\n !Array.isArray(series) ||\n !series.every(\n (item) =>\n item &&\n typeof item.id === 'string' &&\n item.id &&\n typeof item.key === 'string' &&\n typeof item.label === 'string',\n )\n )\n return hidden;\n const validIds = new Set(series.map((item) => item.id));\n if (validIds.size !== series.length) return hidden;\n const retained = new Set([...hidden].filter((id) => validIds.has(id)));\n return retained.size === hidden.size ? hidden : retained;\n },\n });\n private readonly measuredTheme = signal<CartesianThemeTokens | null>(null);\n private controller: PlotController<Option> | null = null;\n private removeMotionListener: (() => void) | null = null;\n private focusKeeper: ChartFocusKeeper | null = null;\n private removePreviewListeners: (() => void) | null = null;\n\n // A failed renderer stays failed until retry or a relevant input changes.\n protected readonly rendererError = linkedSignal(() => {\n this.model();\n this.settings();\n this.formatting();\n this.categoryTicks();\n return false;\n });\n protected readonly tableExpanded = signal(false);\n protected readonly tablePagination = new TablePagination(this.data, this.tablePageSize);\n protected readonly model = computed(() =>\n normalizeCartesianData(this.data(), this.rowIdKey(), this.categoryKey(), this.series()),\n );\n private readonly formatting = computed(() => {\n const model = this.model();\n return createValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'error'\n ? []\n : model.rows.flatMap((row) => row.points.map((point) => point.value)),\n );\n });\n private readonly categoryTicks = computed(() => {\n const model = this.model();\n return formatCategoryTicks(\n model.kind === 'error' ? [] : model.rows.map((row) => row.category),\n this.categoryTickFormatter(),\n );\n });\n private readonly settings = computed(() => ({\n height: this.height(),\n family: this.familyConfiguration(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n tablePageSize: this.tablePageSize(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? defaultCartesianTheme(this.theme()),\n );\n protected readonly plotHeight = computed(() =>\n Number.isFinite(this.height()) && this.height() > 0 ? this.height() : 320,\n );\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n !Number.isFinite(settings.height) || settings.height <= 0\n ? 'Chart height must be a positive, finite number.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Chart theme configuration is invalid.'\n : (this.familyError() ??\n this.tablePagination.error() ??\n this.formatting().error ??\n this.categoryTicks().error);\n return resolveCartesianState(\n settings.error,\n settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n });\n protected readonly legendItems = computed(() => {\n // Reconcile removals even when invalid rows leave the legend empty.\n const hiddenIds = this.hiddenIds();\n const model = this.model();\n if (model.kind === 'error') return [];\n return model.series.map((item, index) => ({\n id: item.id,\n label: item.label,\n visible: !hiddenIds.has(item.id),\n color: this.tokens().series[index % this.tokens().series.length],\n }));\n });\n protected readonly allSeriesHidden = computed(() => {\n const items = this.legendItems();\n return items.length > 0 && items.every((item) => !item.visible);\n });\n private readonly options = computed(() => {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind === 'error') return null;\n return this.buildOptions({\n model,\n hiddenIds: this.hiddenIds(),\n tokens: this.tokens(),\n animation: this.animation() && !this.reducedMotion(),\n format: this.formatting().format,\n categoryTicks: this.categoryTicks().labels,\n });\n });\n protected readonly tableRows = computed(() => {\n const model = this.model();\n if (\n !this.showDataTable() ||\n !this.tableExpanded() ||\n this.state().kind !== 'ready' ||\n model.kind === 'error'\n )\n return [];\n return this.tablePagination.rows(model.rows).map((row) => ({\n id: row.id,\n category: row.category,\n selected: this.rowIsSelected(row.id),\n current: row.id === this.rowSelectionId(),\n cells: row.points.map((point, index) => {\n const text = point.value === null ? 'Missing' : this.formatting().format(point.value);\n return {\n ...point,\n text,\n actionLabel: `Select ${model.series[index]?.label ?? ''} for ${row.category}: ${text}`,\n };\n }),\n }));\n });\n\n constructor() {\n effect(() => {\n const context = this.previewContext();\n // An event can already describe the new inputs before this scheduled effect\n // runs. Invalidate only previews captured against an older context.\n untracked(() => {\n if (this.previewSnapshot !== context) this.clearPreview();\n });\n });\n effect(() => {\n const current = this.plotPreview();\n const enabled = this.canPreview();\n // Native pointer events can arrive before Angular propagates an enabling\n // input. Reconcile the latest hit after inputs settle, without a new move.\n if (enabled) untracked(() => this.previewPoint(current?.point ?? null, 'plot', 'pointer'));\n });\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent): void =>\n this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new PlotController(\n this.plot().nativeElement,\n browserPlotEnvironment(() => this.renderer(), this.host.nativeElement),\n (point) => this.selectPoint(point, 'plot'),\n () => this.rendererError.set(true),\n (ids, snapshot) => this.selectRange(ids, snapshot),\n (point) => this.plotPreview.set(point ? { point, context: this.plotContext() } : null),\n );\n this.browserReady.set(true);\n this.focusKeeper = new ChartFocusKeeper(this.host.nativeElement);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n // Resolving CSS colors writes a probe and immediately reads its computed color.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (!this.browserReady()) return;\n const series = this.series();\n const theme = this.theme();\n this.themeRevision();\n if (\n !Array.isArray(series) ||\n !series.every(\n (item) =>\n item &&\n typeof item.id === 'string' &&\n typeof item.key === 'string' &&\n typeof item.label === 'string',\n )\n )\n return;\n try {\n this.measuredTheme.set(\n readCartesianTheme(this.host.nativeElement, theme, series, this.plot().nativeElement),\n );\n } catch {\n this.rendererError.set(true);\n }\n },\n });\n // Option updates only schedule rendering or dispose the previous plot.\n afterRenderEffect({\n write: () => {\n this.browserReady();\n this.controller?.update(this.options());\n },\n });\n // Listener attachment also reconciles the control that currently owns focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (this.browserReady() && this.observePreviews()) {\n this.removePreviewListeners ??= observeTablePreviews(\n this.host.nativeElement,\n (point, trigger) => this.previewPoint(point, 'table', trigger),\n );\n } else {\n this.removePreviewListeners?.();\n this.removePreviewListeners = null;\n }\n },\n });\n // Focus restoration checks current DOM ownership before changing focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n this.state();\n this.tableRows();\n this.legendItems();\n this.focusKeeper?.restore();\n },\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.removePreviewListeners?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n\n protected toggleTable(): void {\n this.tableExpanded.update((expanded) => !expanded);\n }\n\n protected previewPoint(\n point: PlotPoint | null,\n source: 'plot' | 'table',\n trigger: 'pointer' | 'focus',\n ): void {\n if (this.destroyRef.destroyed || !this.canPreview()) return;\n const context = this.previewContext();\n if (this.previewSnapshot !== context) this.clearPreview();\n if (trigger === 'focus') this.focusPreview = point;\n else this.pointerPreview = point ? { point, source } : null;\n const pointer = this.pointerPreview;\n const candidate = pointer?.point ?? this.focusPreview;\n const origin = pointer?.source ?? 'table';\n const model = this.model();\n const value =\n candidate &&\n model.kind !== 'error' &&\n this.state().kind === 'ready' &&\n !(origin === 'plot' && this.hiddenIds().has(candidate.seriesId))\n ? model.rows\n .find((row) => row.id === candidate.rowId)\n ?.points.find((cell) => cell.seriesId === candidate.seriesId)\n : null;\n const next: PointPreview<T> | null =\n value && value.value !== null\n ? { ...value, value: value.value, source: origin, trigger: pointer ? 'pointer' : 'focus' }\n : null;\n this.previewSnapshot = context;\n if (\n next?.row === this.lastPreview?.row &&\n next?.seriesId === this.lastPreview?.seriesId &&\n next?.value === this.lastPreview?.value &&\n next?.source === this.lastPreview?.source &&\n next?.trigger === this.lastPreview?.trigger\n )\n return;\n this.lastPreview = next;\n this.emitPreview(next);\n }\n\n private clearPreview(): void {\n this.previewSnapshot = null;\n this.pointerPreview = this.focusPreview = null;\n if (this.lastPreview === null) return;\n this.lastPreview = null;\n this.emitPreview(null);\n }\n\n protected resetPointPreview(): void {\n this.plotPreview.set(null);\n this.clearPreview();\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n\n protected toggleSeries(id: string): void {\n if (this.state().kind !== 'ready') return;\n const hidden = new Set(this.hiddenIds());\n if (hidden.has(id)) hidden.delete(id);\n else hidden.add(id);\n this.hiddenIds.set(hidden);\n this.legendChange.emit({ seriesId: id, visible: !hidden.has(id) });\n }\n\n protected selectPoint(point: PlotPoint, source: 'plot' | 'table'): void {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind === 'error') return;\n if (source === 'plot' && this.hiddenIds().has(point.seriesId)) return;\n const value = model.rows\n .find((row) => row.id === point.rowId)\n ?.points.find((cell) => cell.seriesId === point.seriesId);\n if (!value || value.value === null) return;\n this.resetPointPreview();\n this.pointSelect.emit({ ...value, value: value.value, source });\n }\n}\n\nexport interface CartesianContext<T> {\n readonly model: Exclude<CartesianModel<T>, { kind: 'error' }>;\n readonly hiddenIds: ReadonlySet<string>;\n readonly tokens: CartesianThemeTokens;\n readonly animation: boolean;\n readonly format: ValueFormatter;\n readonly categoryTicks: readonly string[];\n}\n","import type { LineSeriesOption } from 'echarts/charts';\nimport type { GridComponentOption, TooltipComponentOption } from 'echarts/components';\nimport type { ComposeOption } from 'echarts/core';\nimport { buildCartesianOptions } from './cartesian-options';\nimport type { CartesianContext } from './cartesian-chart';\nexport type CurveOption = ComposeOption<\n LineSeriesOption | GridComponentOption | TooltipComponentOption\n>;\nexport function buildCurveOptions<T>(\n context: CartesianContext<T>,\n smooth: boolean,\n showPoints: boolean,\n): CurveOption {\n const { model, hiddenIds, tokens, animation, format, categoryTicks } = context;\n const common = buildCartesianOptions(\n model,\n hiddenIds,\n tokens,\n false,\n animation,\n format,\n categoryTicks,\n );\n const categoryAxis = common.xAxis;\n if (categoryAxis.type !== 'category') throw new Error('Expected category axis');\n return {\n ...common,\n xAxis: { ...categoryAxis, boundaryGap: false },\n series: model.series.flatMap((item, index): LineSeriesOption[] => {\n if (hiddenIds.has(item.id)) return [];\n const color = tokens.series[index % tokens.series.length] ?? '#047857';\n return [\n {\n id: item.id,\n name: item.label,\n type: 'line',\n smooth,\n showSymbol: showPoints,\n connectNulls: false,\n symbol: index % 2 === 0 ? 'circle' : 'diamond',\n clip: false,\n symbolSize: 6,\n triggerEvent: 'line',\n lineStyle: { color, width: 2, type: index % 2 === 0 ? 'solid' : 'dashed' },\n itemStyle: { color: tokens.background, borderColor: color, borderWidth: 2 },\n data: model.rows.map((row) => ({ id: row.id, value: row.points[index]?.value ?? '-' })),\n },\n ];\n }),\n };\n}\n","import type { PlotPoint } from './plot-controller';\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\nexport function curvePoint(\n event: unknown,\n options: unknown,\n convert: (x: number) => unknown,\n): PlotPoint | undefined {\n if (!record(event) || !record(options)) return;\n if (\n record(event['data']) &&\n typeof event['data']['id'] === 'string' &&\n typeof event['seriesId'] === 'string'\n ) {\n return { rowId: event['data']['id'], seriesId: event['seriesId'] };\n }\n // Whole-line clicks (including when markers are hidden) select the nearest category\n // on that painted series. Gaps have no painted path and missing cells never emit.\n if (\n (event['selfType'] !== 'line' && event['selfType'] !== 'area') ||\n typeof event['seriesIndex'] !== 'number' ||\n !record(event['event'])\n )\n return;\n const x = event['event']['offsetX'];\n if (typeof x !== 'number' || !Number.isFinite(x)) return;\n const category = convert(x);\n if (typeof category !== 'number' || !Number.isFinite(category)) return;\n const series =\n record(options) && Array.isArray(options['series'])\n ? options['series'][event['seriesIndex']]\n : undefined;\n if (!record(series)) return;\n const data = series['data'];\n if (!Array.isArray(data) || data.length === 0 || typeof series['id'] !== 'string') return;\n const point: unknown = data[Math.max(0, Math.min(data.length - 1, Math.round(category)))];\n if (\n record(point) &&\n typeof point['id'] === 'string' &&\n typeof point['value'] === 'number' &&\n Number.isFinite(point['value'])\n )\n return { rowId: point['id'], seriesId: series['id'] };\n return undefined;\n}\n","import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport type { ChartState } from './cartesian-model';\n\n/** Internal plot shell: state changes preserve the renderer's allocated geometry. */\n@Component({\n selector: 'nec-chart-stage',\n template: `\n <ng-content />\n @let current = state();\n @if (current.kind !== 'ready') {\n <div class=\"chart-status\" [class.is-loading]=\"current.kind === 'loading'\">\n @if (current.kind === 'loading') {\n <span class=\"loading-mark\" aria-hidden=\"true\"><i></i><i></i><i></i></span>\n }\n <p [attr.role]=\"current.kind === 'error' ? 'alert' : 'status'\">{{ current.message }}</p>\n @if (current.kind === 'error' && retryable()) {\n <button type=\"button\" (click)=\"retry.emit()\">{{ retryLabel() }}</button>\n }\n </div>\n }\n `,\n styles: `\n :host {\n display: block;\n position: relative;\n min-width: 0;\n }\n .chart-status {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 20px;\n overflow: auto;\n box-sizing: border-box;\n text-align: center;\n }\n p {\n margin: 0;\n max-width: 42ch;\n color: var(--nec-muted, #536176);\n font: inherit;\n font-size: 13px;\n line-height: 1.6;\n overflow-wrap: anywhere;\n }\n button {\n padding: 8px 12px;\n border: 1px solid var(--nec-border, #d6dce5);\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n }\n button:focus-visible {\n outline: 2px solid var(--nec-focus, #648dff);\n outline-offset: 3px;\n }\n .loading-mark {\n display: flex;\n align-items: end;\n gap: 4px;\n height: 24px;\n opacity: 0.55;\n }\n i {\n width: 5px;\n height: 14px;\n border-radius: 2px;\n background: var(--nec-muted, #536176);\n }\n i:nth-child(2) {\n height: 24px;\n }\n i:nth-child(3) {\n height: 19px;\n }\n `,\n host: { '[style.min-height.px]': 'height()' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartStage {\n readonly state = input.required<ChartState>();\n readonly height = input<number | null>(320);\n readonly retryable = input(false);\n readonly retryLabel = input('Retry chart');\n readonly retry = output<void>();\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport type { TablePagination } from './table-pagination';\n\n@Component({\n selector: 'nec-table-pager',\n template: `\n @let pages = pagination();\n @if (pages.count() > 1) {\n <nav [attr.aria-label]=\"label() + ' data table pages'\">\n <button\n type=\"button\"\n aria-label=\"Previous table page\"\n [attr.aria-disabled]=\"pages.page() === 0 ? 'true' : null\"\n (click)=\"pages.move(-1)\"\n >\n Previous\n </button>\n <span role=\"status\" aria-atomic=\"true\">\n Rows {{ pages.start() + 1 }}–{{ pages.end() }} of {{ pages.total() }}\n </span>\n <button\n type=\"button\"\n aria-label=\"Next table page\"\n [attr.aria-disabled]=\"pages.page() === pages.count() - 1 ? 'true' : null\"\n (click)=\"pages.move(1)\"\n >\n Next\n </button>\n </nav>\n }\n `,\n styles: `\n nav {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n margin-top: 1rem;\n }\n span {\n font-size: 0.875rem;\n font-variant-numeric: tabular-nums;\n }\n button {\n padding: 0.5rem 0.75rem;\n border: 1px solid var(--nec-border, #d6dce5);\n border-radius: 0.375rem;\n color: inherit;\n background: transparent;\n font: inherit;\n cursor: pointer;\n }\n button:focus-visible {\n outline: 3px solid var(--nec-focus, #648dff);\n outline-offset: 3px;\n }\n button[aria-disabled='true'] {\n color: var(--nec-muted, #536176);\n cursor: default;\n border-style: dashed;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TablePager {\n readonly pagination = input.required<TablePagination>();\n readonly label = input.required<string>();\n}\n"],"mappings":";;;AASA,IAAa,aAAb,MAAa,WAAU;CACZ,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAFrB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAV,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAU,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;I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;;;;GAyBT,iBAgCgB,wBAAwB;GAAM,QAAA,CAAA,2dAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"mantha911-ng-echarts-core.mjs","names":["record"],"sources":["../../../projects/chart-library/core/src/lib/chart-frame.ts","../../../projects/chart-library/core/src/lib/chart-frame.html","../../../projects/chart-library/core/src/lib/tooltip.ts","../../../projects/chart-library/core/src/lib/cartesian-options.ts","../../../projects/chart-library/core/src/lib/cartesian-browser.ts","../../../projects/chart-library/core/src/lib/cartesian-model.ts","../../../projects/chart-library/core/src/lib/category-ticks.ts","../../../projects/chart-library/core/src/lib/value-formatting.ts","../../../projects/chart-library/core/src/lib/chart-focus.ts","../../../projects/chart-library/core/src/lib/table-pagination.ts","../../../projects/chart-library/core/src/lib/plot-controller.ts","../../../projects/chart-library/core/src/lib/cartesian-chart.ts","../../../projects/chart-library/core/src/lib/curve-options.ts","../../../projects/chart-library/core/src/lib/curve-point.ts","../../../projects/chart-library/core/src/lib/chart-stage.ts","../../../projects/chart-library/core/src/lib/table-pager.ts","../../../projects/chart-library/core/src/lib/area-fill.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n/** Shared presentation shell; no renderer or chart lifecycle behavior yet. */\n@Component({\n selector: 'nec-chart-frame',\n templateUrl: './chart-frame.html',\n styleUrl: './chart-frame.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartFrame {\n readonly title = input.required<string>();\n readonly description = input('');\n}\n","<section class=\"chart-frame\" [attr.aria-label]=\"title()\">\n <header>\n <h2>{{ title() }}</h2>\n @if (description()) {\n <p>{{ description() }}</p>\n }\n </header>\n <ng-content />\n</section>\n","import type { CartesianThemeTokens } from './cartesian-options';\n\nexport function escapeTooltipText(value: string): string {\n return value.replace(\n /[&<>\"']/g,\n (character) =>\n ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;', \"'\": '&#39;' })[character]!,\n );\n}\n\nexport function tooltipStyle(tokens: CartesianThemeTokens) {\n return {\n backgroundColor: tokens.background,\n borderColor: tokens.border,\n textStyle: { color: tokens.text, fontFamily: tokens.fontFamily, fontSize: 12, lineHeight: 20 },\n padding: [10, 12] as [number, number],\n borderRadius: 8,\n extraCssText:\n 'max-width: min(280px, calc(100% - 16px)); white-space: normal; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.12);',\n };\n}\n\nexport interface TooltipRow {\n readonly label: string;\n readonly value: string;\n readonly color?: string;\n}\n\n/** Escape every consumer-supplied string at the final HTML boundary. */\nexport function tooltipMarkup(title: string, rows: readonly TooltipRow[]): string {\n const escape = escapeTooltipText;\n return `<div data-nec-tooltip><strong style=\"display:block;font-weight:600;margin-bottom:6px;overflow-wrap:anywhere\">${escape(title)}</strong>${rows\n .map(\n (row) =>\n `<div style=\"display:flex;align-items:baseline;gap:12px;margin-top:4px\">${row.color ? `<span aria-hidden=\"true\" style=\"flex:none;width:8px;height:8px;border-radius:2px;background:${escape(row.color)}\"></span>` : ''}<span style=\"flex:1;min-width:0;overflow-wrap:anywhere\">${escape(row.label)}</span><span style=\"flex:0 1 auto;min-width:0;max-width:65%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:right\">${escape(row.value)}</span></div>`,\n )\n .join('')}</div>`;\n}\n","import { tooltipStyle, tooltipMarkup } from './tooltip';\n// First two palette colors adapted from EvilCharts (2026 Gurbinder, MIT); see package third-party notice.\nimport type { ChartTheme } from './chart-types';\nimport type { CartesianModel } from './cartesian-model';\nexport interface CartesianThemeTokens {\n readonly fontFamily: string;\n readonly background: string;\n readonly text: string;\n readonly muted: string;\n readonly border: string;\n readonly series: readonly string[];\n}\n\nexport function defaultCartesianTheme(theme: ChartTheme): CartesianThemeTokens {\n return theme === 'dark'\n ? {\n fontFamily: 'system-ui, sans-serif',\n background: '#18202c',\n text: '#edf2fa',\n muted: '#b2bfd2',\n border: '#3b4a61',\n series: ['#10b981', '#f43f5e', '#60a5fa', '#fbbf24'],\n }\n : {\n fontFamily: 'system-ui, sans-serif',\n background: '#ffffff',\n text: '#18202c',\n muted: '#536176',\n border: '#d6dce5',\n series: ['#047857', '#be123c', '#2563eb', '#a16207'],\n };\n}\n\nexport { escapeTooltipText } from './tooltip';\n\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nexport function buildCartesianOptions<T>(\n model: Exclude<CartesianModel<T>, { kind: 'error' }>,\n hiddenIds: ReadonlySet<string>,\n tokens: CartesianThemeTokens,\n horizontal: boolean,\n animation: boolean,\n format: (value: number) => string,\n categoryTicks: readonly string[] = model.rows.map((row) => row.category),\n) {\n const hasVisibleSeries = model.series.some((series) => !hiddenIds.has(series.id));\n const categoryAxis = {\n type: 'category' as const,\n data: model.rows.map((row) => row.id),\n inverse: horizontal,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n color: tokens.muted,\n fontSize: 12,\n formatter: (_value: string, index: number) => categoryTicks[index] ?? '',\n },\n };\n const valueAxis = {\n type: 'value' as const,\n splitNumber: horizontal ? 3 : 5,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n show: hasVisibleSeries,\n color: tokens.muted,\n fontSize: 12,\n formatter: format,\n hideOverlap: true,\n },\n splitLine: {\n show: hasVisibleSeries,\n lineStyle: { color: tokens.border, type: 'dashed' as const },\n },\n };\n return {\n animation,\n animationDuration: 300,\n animationDurationUpdate: 200,\n backgroundColor: tokens.background,\n textStyle: { fontFamily: tokens.fontFamily, color: tokens.text },\n grid: {\n left: 12,\n right: 16,\n top: 12,\n bottom: 8,\n outerBoundsMode: 'same' as const,\n outerBoundsContain: 'axisLabel' as const,\n },\n xAxis: horizontal ? valueAxis : categoryAxis,\n yAxis: horizontal ? categoryAxis : valueAxis,\n tooltip: {\n trigger: 'axis' as const,\n confine: true,\n ...tooltipStyle(tokens),\n formatter: (params: unknown) => {\n const items = Array.isArray(params) ? params : [params];\n const first = items.find((item) => record(item) && record(item['data']));\n if (!record(first) || !record(first['data'])) return '';\n const rowId: unknown = first['data']['id'];\n const row = model.rows.find((candidate) => candidate.id === rowId);\n if (!row) return '';\n const values = row.points.flatMap((point, index) => {\n if (hiddenIds.has(point.seriesId)) return [];\n const label = model.series.find((item) => item.id === point.seriesId)?.label ?? '';\n return [\n {\n label,\n value: point.value === null ? 'Missing' : format(point.value),\n color: tokens.series[index % tokens.series.length] ?? '#047857',\n },\n ];\n });\n return tooltipMarkup(row.category, values);\n },\n },\n };\n}\n","import { defaultCartesianTheme, type CartesianThemeTokens } from './cartesian-options';\nimport type { ChartSeries, ChartTheme } from './chart-types';\nimport type { PlotRendererFactory, PlotEnvironment, PlotPoint } from './plot-controller';\n\n/** Delegate transient table interactions; large tables do not need per-cell listeners. */\nexport function observeTablePreviews(\n host: HTMLElement,\n onPreview: (point: PlotPoint | null, trigger: 'pointer' | 'focus') => void,\n): () => void {\n const action = (target: EventTarget | null) =>\n target instanceof Element\n ? target.closest<HTMLButtonElement>('tbody button[data-preview-row]')\n : null;\n const handle = (event: Event) => {\n const pointer = event.type.startsWith('pointer');\n if (pointer && (event as PointerEvent).pointerType === 'touch') return;\n const button = action(event.target);\n if (!button || !host.contains(button)) return;\n const related = action((event as FocusEvent).relatedTarget);\n if (related === button) return;\n const leaving = event.type === 'pointerout' || event.type === 'focusout';\n onPreview(\n leaving\n ? null\n : {\n rowId: button.dataset['previewRow']!,\n seriesId: button.dataset['previewSeries']!,\n },\n pointer ? 'pointer' : 'focus',\n );\n };\n const types = ['pointerover', 'pointerout', 'focusin', 'focusout'] as const;\n for (const type of types) host.addEventListener(type, handle);\n // Keyboard focus can arrive before Angular applies the opt-in input. Retain\n // that real focus when attaching, without moving focus or requiring another Tab.\n const focused = action(host.ownerDocument.activeElement);\n if (focused && host.contains(focused))\n onPreview(\n { rowId: focused.dataset['previewRow']!, seriesId: focused.dataset['previewSeries']! },\n 'focus',\n );\n return () => {\n for (const type of types) host.removeEventListener(type, handle);\n };\n}\nexport function browserPlotEnvironment<Option>(\n load: () => Promise<PlotRendererFactory<Option>>,\n host: HTMLElement,\n): PlotEnvironment<Option> {\n return {\n load: async () => {\n // Canvas text measurements must use the loaded host font from the first render.\n // A failed web font still permits the browser's normal fallback stack.\n const font = getComputedStyle(host).fontFamily || 'system-ui, sans-serif';\n const [factory] = await Promise.all([\n load(),\n host.ownerDocument.fonts?.load(`12px ${font}`).catch(() => undefined),\n ]);\n return factory;\n },\n observe: (host, onResize) => {\n const observer = new ResizeObserver(onResize);\n observer.observe(host);\n return () => observer.disconnect();\n },\n schedule: (callback) => requestAnimationFrame(callback),\n cancel: (id) => cancelAnimationFrame(id),\n };\n}\n\n/** Resolve inherited typography and CSS colors at the browser boundary. */\nexport function readCartesianTheme<T>(\n host: HTMLElement,\n theme: ChartTheme,\n series: readonly ChartSeries<T>[],\n plotSurface: HTMLElement,\n): CartesianThemeTokens {\n const defaults = defaultCartesianTheme(theme);\n const styles = getComputedStyle(host);\n const probe = host.ownerDocument.createElement('span');\n probe.style.cssText = 'position:absolute;visibility:hidden;pointer-events:none';\n plotSurface.append(probe);\n const canvas = host.ownerDocument.createElement('canvas');\n canvas.width = canvas.height = 1;\n const context = canvas.getContext('2d', { willReadFrequently: true });\n const resolve = (raw: string, fallback: string): string => {\n if (!raw || !CSS.supports('color', raw) || !context) return fallback;\n probe.style.color = raw;\n context.clearRect(0, 0, 1, 1);\n context.fillStyle = getComputedStyle(probe).color;\n context.fillRect(0, 0, 1, 1);\n const [r, g, b, a] = context.getImageData(0, 0, 1, 1).data;\n return `rgba(${r},${g},${b},${a! / 255})`;\n };\n const token = (name: string, fallback: string): string =>\n resolve(styles.getPropertyValue(`--nec-${name}`).trim(), fallback);\n try {\n return {\n fontFamily: styles.fontFamily || defaults.fontFamily,\n background: token('background', defaults.background),\n text: token('text', defaults.text),\n muted: token('muted', defaults.muted),\n border: token('border', defaults.border),\n series: series.map((item, index) => {\n const fallback = defaults.series[index % defaults.series.length]!;\n return item.color ? resolve(item.color, fallback) : token(`series-${index + 1}`, fallback);\n }),\n };\n } finally {\n probe.remove();\n }\n}\n","import type { ChartSeries, StringKey } from './chart-types';\n\nexport interface CartesianPoint<T> {\n readonly rowId: string;\n readonly seriesId: string;\n readonly row: T;\n readonly value: number | null;\n}\n\nexport interface CartesianRow<T> {\n readonly id: string;\n readonly category: string;\n readonly points: readonly CartesianPoint<T>[];\n}\n\nexport type CartesianModel<T> =\n | { readonly kind: 'error'; readonly message: string }\n | {\n readonly kind: 'empty' | 'ready';\n readonly rows: readonly CartesianRow<T>[];\n readonly series: readonly ChartSeries<T>[];\n };\n\nexport function normalizeCartesianData<T extends object>(\n data: readonly T[],\n rowIdKey: StringKey<T>,\n categoryKey: StringKey<T>,\n series: readonly ChartSeries<T>[],\n): CartesianModel<T> {\n const invalid = (message: string): CartesianModel<T> => ({ kind: 'error', message });\n if (!Array.isArray(data) || !Array.isArray(series)) {\n return invalid('Chart data and series must be arrays.');\n }\n const seriesIds = new Set<string>();\n for (const item of series) {\n if (!item || typeof item.id !== 'string' || !item.id || seriesIds.has(item.id)) {\n return invalid('Series require unique, nonempty string identifiers.');\n }\n if (typeof item.key !== 'string' || typeof item.label !== 'string') {\n return invalid('Series require a numeric field key and a text label.');\n }\n seriesIds.add(item.id);\n }\n const rowIds = new Set<string>();\n const rows: CartesianRow<T>[] = [];\n let hasValue = false;\n for (const row of data) {\n if (!row || typeof row !== 'object') return invalid('Each chart row must be an object.');\n const id = row[rowIdKey];\n const category = row[categoryKey];\n if (typeof id !== 'string' || !id || rowIds.has(id)) {\n return invalid('Rows require unique, nonempty string identifiers.');\n }\n if (typeof category !== 'string') return invalid('Category labels must be strings.');\n rowIds.add(id);\n const points: CartesianPoint<T>[] = [];\n for (const item of series) {\n const value: unknown = row[item.key];\n if (value != null && (typeof value !== 'number' || !Number.isFinite(value))) {\n return invalid('Measures must be finite numbers or missing values.');\n }\n if (typeof value === 'number') hasValue = true;\n points.push({\n rowId: id,\n seriesId: item.id,\n row,\n value: value == null ? null : (value as number),\n });\n }\n rows.push({ id, category, points });\n }\n return { kind: hasValue ? 'ready' : 'empty', rows, series };\n}\n\nexport type ChartState =\n | { readonly kind: 'ready' }\n | { readonly kind: 'loading' | 'empty' | 'error'; readonly message: string };\n\nexport function resolveCartesianState(\n applicationError: string | null,\n loading: boolean,\n model:\n { readonly kind: 'error'; readonly message: string } | { readonly kind: 'ready' | 'empty' },\n rendererError: boolean,\n configurationError: string | null,\n): ChartState {\n if (applicationError !== null)\n return { kind: 'error', message: applicationError || 'Unable to display chart.' };\n if (loading) return { kind: 'loading', message: 'Loading chart…' };\n if (model.kind === 'error') return model;\n if (configurationError) return { kind: 'error', message: configurationError };\n if (rendererError)\n return { kind: 'error', message: 'Unable to render chart. Try again or update the data.' };\n if (model.kind === 'empty') return { kind: 'empty', message: 'No chart data available.' };\n return { kind: 'ready' };\n}\n","import type { CategoryTickFormatter } from './chart-types';\n\n/** Evaluate consumer code before rendering, never from an ECharts callback. */\nexport function formatCategoryTicks(\n categories: readonly string[],\n formatter: CategoryTickFormatter | undefined,\n): { readonly labels: readonly string[]; readonly error: string | null } {\n try {\n if (formatter !== undefined && typeof formatter !== 'function') throw new TypeError();\n const labels = categories.map((category, index) => {\n const label = formatter ? formatter(category, index) : category;\n if (typeof label !== 'string') throw new TypeError();\n return label;\n });\n return { labels, error: null };\n } catch {\n return {\n labels: [],\n error: 'Category tick formatting failed. Use a function that returns text.',\n };\n }\n}\n","import type { ValueFormatter } from './chart-types';\n\nconst formatterError = 'Value formatting failed. Use a pure function that returns text.';\n\n/** Shared numeric text; missing observations never reach consumer callbacks. */\nexport function createValueFormatting(\n locale: string,\n options: Intl.NumberFormatOptions | undefined,\n formatter: ValueFormatter | undefined,\n values: readonly (number | null)[],\n): { readonly format: ValueFormatter; readonly error: string | null } {\n let numberFormat: Intl.NumberFormat;\n try {\n if (\n typeof locale !== 'string' ||\n !locale ||\n (options !== undefined &&\n (typeof options !== 'object' || options === null || Array.isArray(options)))\n )\n throw new TypeError();\n numberFormat = new Intl.NumberFormat(locale, options);\n } catch {\n return { format: () => '', error: 'The chart locale or number format options are invalid.' };\n }\n if (formatter === undefined) return { format: numberFormat.format, error: null };\n try {\n if (typeof formatter !== 'function') throw new TypeError();\n // Cache known observations so opening a table or tooltip never reruns consumer code.\n const labels = new Map<number | string, string>();\n const format: ValueFormatter = (value) => {\n const key = Object.is(value, -0) ? '-0' : value;\n if (labels.has(key)) return labels.get(key)!;\n try {\n const label = formatter(value);\n if (typeof label !== 'string') throw new TypeError();\n labels.set(key, label);\n return label;\n } catch {\n // Unexpected axis-tick failures are contained by the browser plot controller.\n throw new Error(formatterError);\n }\n };\n for (const value of values) if (value !== null) format(value);\n return { format, error: null };\n } catch {\n return { format: () => '', error: formatterError };\n }\n}\n","/** Keep native control focus when keyed DOM moves; never take it back from another control. */\nexport class ChartFocusKeeper {\n private remembered: HTMLElement | null = null;\n private readonly document: Document;\n private readonly onFocus = (event: FocusEvent): void => {\n const target = event.target;\n this.remembered = target instanceof HTMLElement && this.host.contains(target) ? target : null;\n };\n private readonly onPointer = (event: PointerEvent): void => {\n if (!(event.target instanceof Node) || !this.remembered?.contains(event.target))\n this.remembered = null;\n };\n\n constructor(private readonly host: HTMLElement) {\n this.document = host.ownerDocument;\n this.document.addEventListener('focusin', this.onFocus);\n this.document.addEventListener('pointerdown', this.onPointer);\n }\n\n restore(): void {\n const previous = this.remembered;\n if (\n !previous ||\n !this.document.hasFocus() ||\n this.document.activeElement !== this.document.body\n )\n return;\n if (this.available(previous)) {\n previous.focus({ preventScroll: true });\n return;\n }\n // The focused row/series disappeared, or ready UI changed to a status message.\n const selectors = [\n '.table-toggle',\n '.legend button',\n '[role=\"alert\"], [role=\"status\"]',\n '.chart-frame',\n ];\n let fallback: HTMLElement | undefined;\n for (const selector of selectors) {\n fallback = [...this.host.querySelectorAll<HTMLElement>(selector)].find((element) =>\n this.available(element),\n );\n if (fallback) break;\n }\n this.remembered = null;\n if (fallback) {\n if (fallback.tagName !== 'BUTTON') fallback.tabIndex = -1;\n fallback.focus({ preventScroll: true });\n }\n }\n\n private available(element: HTMLElement): boolean {\n return (\n element.isConnected &&\n this.host.contains(element) &&\n !element.matches(':disabled') &&\n !element.closest('[inert], [hidden], [aria-hidden=\"true\"]')\n );\n }\n\n destroy(): void {\n this.document.removeEventListener('focusin', this.onFocus);\n this.document.removeEventListener('pointerdown', this.onPointer);\n this.remembered = null;\n }\n}\n","import { computed, linkedSignal } from '@angular/core';\n\n/** Internal table window; paging never changes plot data or selection ownership. */\nexport class TablePagination {\n readonly error = computed(() => {\n const size = this.pageSize();\n return size === null || (Number.isSafeInteger(size) && size > 0)\n ? null\n : 'Table page size must be a positive safe integer or null.';\n });\n readonly total = computed(() => {\n const rows = this.data();\n return Array.isArray(rows) ? rows.length : 0;\n });\n private readonly requestedPage = linkedSignal(() => {\n // New immutable data and page-size changes restart at the first page.\n this.data();\n this.pageSize();\n return 0;\n });\n readonly count = computed(() => {\n const size = this.pageSize();\n return !this.error() && size !== null ? Math.max(1, Math.ceil(this.total() / size)) : 1;\n });\n readonly page = computed(() => Math.min(this.requestedPage(), this.count() - 1));\n readonly start = computed(() => this.page() * (this.pageSize() ?? this.total()));\n readonly end = computed(() =>\n Math.min(this.total(), this.start() + (this.pageSize() ?? this.total())),\n );\n\n constructor(\n private readonly data: () => readonly unknown[],\n private readonly pageSize: () => number | null,\n ) {}\n\n rows<T>(rows: readonly T[]): readonly T[] {\n return this.pageSize() === null ? rows : rows.slice(this.start(), this.end());\n }\n\n move(delta: number): void {\n this.requestedPage.set(Math.max(0, Math.min(this.page() + delta, this.count() - 1)));\n }\n}\n","export interface PlotPoint {\n readonly rowId: string;\n readonly seriesId: string;\n}\n\nexport interface PlotRenderer<Option> {\n update(options: Option): void;\n /** A following update owns option rebuilding when optionsPending is true. */\n resize(context?: { readonly optionsPending: boolean }): void;\n dispose(): void;\n}\n\nexport type PlotRendererFactory<Option> = (\n host: HTMLElement,\n onPoint: (point: PlotPoint) => void,\n onRange?: (rowIds: readonly string[], snapshot: unknown) => void,\n onPreview?: (point: PlotPoint | null) => void,\n) => PlotRenderer<Option>;\n\nexport interface PlotEnvironment<Option> {\n load(): Promise<PlotRendererFactory<Option>>;\n observe(host: HTMLElement, onResize: () => void): () => void;\n schedule(callback: () => void): number;\n cancel(id: number): void;\n}\n\n/** Coordinates browser work; builders and Angular templates never own chart instances. */\nexport class PlotController<Option> {\n private options: Option | null = null;\n private renderer: PlotRenderer<Option> | null = null;\n private frame: number | null = null;\n private loading = false;\n private dirty = false;\n private generation = 0;\n private destroyed = false;\n private width = 0;\n private height = 0;\n private readonly disconnect: () => void;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly environment: PlotEnvironment<Option>,\n private readonly onPoint: (point: PlotPoint) => void,\n private readonly onError: () => void,\n private readonly onRange: (rowIds: readonly string[], snapshot: unknown) => void = () => {},\n private readonly onPreview: (point: PlotPoint | null) => void = () => {},\n ) {\n this.disconnect = environment.observe(host, () => this.schedule());\n }\n\n update(options: Option | null): void {\n if (this.destroyed) return;\n this.options = options;\n this.dirty = true;\n if (options === null) {\n this.generation++;\n this.loading = false;\n this.cancelFrame();\n this.disposeRenderer();\n return;\n }\n this.schedule();\n }\n\n destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.generation++;\n this.cancelFrame();\n this.disconnect();\n this.disposeRenderer();\n }\n\n private schedule(): void {\n if (this.destroyed || !this.options || this.frame !== null) return;\n this.frame = this.environment.schedule(() => {\n this.frame = null;\n void this.render();\n });\n }\n\n private async render(): Promise<void> {\n if (this.destroyed || !this.options || !this.host.clientWidth || !this.host.clientHeight)\n return;\n // A queued observer delivery must not clear another render's pending import.\n if (!this.renderer && this.loading) return;\n const generation = this.generation;\n try {\n if (!this.renderer) {\n this.loading = true;\n const factory = await this.environment.load();\n if (this.destroyed || generation !== this.generation || !this.options) return;\n // Measure again after asynchronous loading; a formerly visible host may now be hidden.\n if (!this.host.clientWidth || !this.host.clientHeight) return;\n this.width = this.host.clientWidth;\n this.height = this.host.clientHeight;\n // Renderer factories initialize at the host's current size.\n this.renderer = factory(this.host, this.onPoint, this.onRange, this.onPreview);\n this.dirty = true;\n }\n const width = this.host.clientWidth;\n const height = this.host.clientHeight;\n if (width !== this.width || height !== this.height) {\n this.renderer.resize({ optionsPending: this.dirty });\n this.width = width;\n this.height = height;\n }\n if (this.dirty && this.options) {\n this.renderer.update(this.options);\n this.dirty = false;\n }\n } catch {\n if (!this.destroyed && generation === this.generation) {\n this.options = null;\n this.generation++;\n this.loading = false;\n this.cancelFrame();\n this.disposeRenderer();\n this.onError();\n }\n } finally {\n if (generation === this.generation) this.loading = false;\n }\n }\n\n private disposeRenderer(): void {\n this.renderer?.dispose();\n this.renderer = null;\n this.width = this.height = 0;\n }\n\n private cancelFrame(): void {\n if (this.frame !== null) this.environment.cancel(this.frame);\n this.frame = null;\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Directive,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n output,\n PLATFORM_ID,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n browserPlotEnvironment,\n readCartesianTheme,\n observeTablePreviews,\n} from './cartesian-browser';\nimport {\n normalizeCartesianData,\n resolveCartesianState,\n type CartesianModel,\n} from './cartesian-model';\nimport { defaultCartesianTheme, type CartesianThemeTokens } from './cartesian-options';\nimport type { PlotRendererFactory } from './plot-controller';\nimport { formatCategoryTicks } from './category-ticks';\nimport { createValueFormatting } from './value-formatting';\nimport { ChartFocusKeeper } from './chart-focus';\nimport { TablePagination } from './table-pagination';\nimport type {\n CategoryTickFormatter,\n ChartSeries,\n ChartTheme,\n LegendVisibilityChange,\n PointSelection,\n PointPreview,\n StringKey,\n ValueFormatter,\n} from './chart-types';\nimport { PlotController, type PlotPoint } from './plot-controller';\n\ninterface PlotPreviewSnapshot {\n readonly point: PlotPoint;\n readonly context: readonly unknown[];\n}\n\n/** Internal Cartesian behavior shared by the Cartesian entries; not a supported consumer API. */\n@Directive()\nexport abstract class CartesianChart<\n T extends object,\n Option,\n Series extends ChartSeries<T> = ChartSeries<T>,\n> {\n protected abstract renderer(): Promise<PlotRendererFactory<Option>>;\n protected abstract familyConfiguration(): unknown;\n protected abstract familyError(): string | null;\n protected abstract buildOptions(context: CartesianContext<T>): Option;\n /** A family can opt into controlled row feedback without changing point events. */\n protected rowSelectionId(): string | null {\n return null;\n }\n protected rowIsSelected(id: string): boolean {\n return id === this.rowSelectionId();\n }\n protected selectRange(_rowIds: readonly string[], _snapshot: unknown): void {}\n protected canPreview(): boolean {\n return false;\n }\n protected observePreviews(): boolean {\n return this.canPreview();\n }\n protected emitPreview(_point: PointPreview<T> | null): void {}\n private pointerPreview: { point: PlotPoint; source: 'plot' | 'table' } | null = null;\n private focusPreview: PlotPoint | null = null;\n private lastPreview: PointPreview<T> | null = null;\n private readonly plotContext = computed(() => [\n this.model(),\n this.settings(),\n this.hiddenIds(),\n this.formatting(),\n this.categoryTicks(),\n this.tokens(),\n this.tableExpanded(),\n this.tablePagination.page(),\n ]);\n private readonly plotPreview = linkedSignal<\n { readonly context: readonly unknown[]; readonly ready: boolean },\n PlotPreviewSnapshot | null\n >({\n source: () => ({ context: this.plotContext(), ready: this.state().kind === 'ready' }),\n computation: ({ context, ready }, previous) =>\n ready && previous?.value?.context === context ? previous.value : null,\n equal: (a, b) =>\n a?.context === b?.context &&\n a?.point.rowId === b?.point.rowId &&\n a?.point.seriesId === b?.point.seriesId,\n });\n private previewSnapshot: readonly unknown[] | null = null;\n private readonly previewContext = computed(() => [\n this.model(),\n this.settings(),\n this.hiddenIds(),\n this.tableExpanded(),\n this.tablePagination.page(),\n this.state(),\n ]);\n readonly title = input.required<string>();\n readonly description = input('');\n readonly data = input.required<readonly T[]>();\n readonly rowIdKey = input.required<StringKey<T>>();\n readonly categoryKey = input.required<StringKey<T>>();\n readonly series = input.required<readonly Series[]>();\n readonly height = input(320);\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly categoryTickFormatter = input<CategoryTickFormatter>();\n readonly showDataTable = input(true);\n readonly tablePageSize = input<number | null>(null);\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n readonly pointSelect = output<PointSelection<T>>();\n readonly legendChange = output<LegendVisibilityChange>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly hiddenIds = linkedSignal<readonly Series[], ReadonlySet<string>>({\n source: this.series,\n computation: (series, previous) => {\n const hidden = previous?.value ?? new Set<string>();\n // Valid removals still count while row data is loading or invalid.\n if (\n !Array.isArray(series) ||\n !series.every(\n (item) =>\n item &&\n typeof item.id === 'string' &&\n item.id &&\n typeof item.key === 'string' &&\n typeof item.label === 'string',\n )\n )\n return hidden;\n const validIds = new Set(series.map((item) => item.id));\n if (validIds.size !== series.length) return hidden;\n const retained = new Set([...hidden].filter((id) => validIds.has(id)));\n return retained.size === hidden.size ? hidden : retained;\n },\n });\n private readonly measuredTheme = signal<CartesianThemeTokens | null>(null);\n private controller: PlotController<Option> | null = null;\n private removeMotionListener: (() => void) | null = null;\n private focusKeeper: ChartFocusKeeper | null = null;\n private removePreviewListeners: (() => void) | null = null;\n\n // A failed renderer stays failed until retry or a relevant input changes.\n protected readonly rendererError = linkedSignal(() => {\n this.model();\n this.settings();\n this.formatting();\n this.categoryTicks();\n return false;\n });\n protected readonly tableExpanded = signal(false);\n protected readonly tablePagination = new TablePagination(this.data, this.tablePageSize);\n protected readonly model = computed(() =>\n normalizeCartesianData(this.data(), this.rowIdKey(), this.categoryKey(), this.series()),\n );\n private readonly formatting = computed(() => {\n const model = this.model();\n return createValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'error'\n ? []\n : model.rows.flatMap((row) => row.points.map((point) => point.value)),\n );\n });\n private readonly categoryTicks = computed(() => {\n const model = this.model();\n return formatCategoryTicks(\n model.kind === 'error' ? [] : model.rows.map((row) => row.category),\n this.categoryTickFormatter(),\n );\n });\n private readonly settings = computed(() => ({\n height: this.height(),\n family: this.familyConfiguration(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n tablePageSize: this.tablePageSize(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? defaultCartesianTheme(this.theme()),\n );\n protected readonly plotHeight = computed(() =>\n Number.isFinite(this.height()) && this.height() > 0 ? this.height() : 320,\n );\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n !Number.isFinite(settings.height) || settings.height <= 0\n ? 'Chart height must be a positive, finite number.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Chart theme configuration is invalid.'\n : (this.familyError() ??\n this.tablePagination.error() ??\n this.formatting().error ??\n this.categoryTicks().error);\n return resolveCartesianState(\n settings.error,\n settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n });\n protected readonly legendItems = computed(() => {\n // Reconcile removals even when invalid rows leave the legend empty.\n const hiddenIds = this.hiddenIds();\n const model = this.model();\n if (model.kind === 'error') return [];\n return model.series.map((item, index) => ({\n id: item.id,\n label: item.label,\n visible: !hiddenIds.has(item.id),\n color: this.tokens().series[index % this.tokens().series.length],\n }));\n });\n protected readonly allSeriesHidden = computed(() => {\n const items = this.legendItems();\n return items.length > 0 && items.every((item) => !item.visible);\n });\n private readonly options = computed(() => {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind === 'error') return null;\n return this.buildOptions({\n model,\n hiddenIds: this.hiddenIds(),\n tokens: this.tokens(),\n animation: this.animation() && !this.reducedMotion(),\n format: this.formatting().format,\n categoryTicks: this.categoryTicks().labels,\n });\n });\n protected readonly tableRows = computed(() => {\n const model = this.model();\n if (\n !this.showDataTable() ||\n !this.tableExpanded() ||\n this.state().kind !== 'ready' ||\n model.kind === 'error'\n )\n return [];\n return this.tablePagination.rows(model.rows).map((row) => ({\n id: row.id,\n category: row.category,\n selected: this.rowIsSelected(row.id),\n current: row.id === this.rowSelectionId(),\n cells: row.points.map((point, index) => {\n const text = point.value === null ? 'Missing' : this.formatting().format(point.value);\n return {\n ...point,\n text,\n actionLabel: `Select ${model.series[index]?.label ?? ''} for ${row.category}: ${text}`,\n };\n }),\n }));\n });\n\n constructor() {\n effect(() => {\n const context = this.previewContext();\n // An event can already describe the new inputs before this scheduled effect\n // runs. Invalidate only previews captured against an older context.\n untracked(() => {\n if (this.previewSnapshot !== context) this.clearPreview();\n });\n });\n effect(() => {\n const current = this.plotPreview();\n const enabled = this.canPreview();\n // Native pointer events can arrive before Angular propagates an enabling\n // input. Reconcile the latest hit after inputs settle, without a new move.\n if (enabled) untracked(() => this.previewPoint(current?.point ?? null, 'plot', 'pointer'));\n });\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent): void =>\n this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new PlotController(\n this.plot().nativeElement,\n browserPlotEnvironment(() => this.renderer(), this.host.nativeElement),\n (point) => this.selectPoint(point, 'plot'),\n () => this.rendererError.set(true),\n (ids, snapshot) => this.selectRange(ids, snapshot),\n (point) => this.plotPreview.set(point ? { point, context: this.plotContext() } : null),\n );\n this.browserReady.set(true);\n this.focusKeeper = new ChartFocusKeeper(this.host.nativeElement);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n // Resolving CSS colors writes a probe and immediately reads its computed color.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (!this.browserReady()) return;\n const series = this.series();\n const theme = this.theme();\n this.themeRevision();\n if (\n !Array.isArray(series) ||\n !series.every(\n (item) =>\n item &&\n typeof item.id === 'string' &&\n typeof item.key === 'string' &&\n typeof item.label === 'string',\n )\n )\n return;\n try {\n this.measuredTheme.set(\n readCartesianTheme(this.host.nativeElement, theme, series, this.plot().nativeElement),\n );\n } catch {\n this.rendererError.set(true);\n }\n },\n });\n // Option updates only schedule rendering or dispose the previous plot.\n afterRenderEffect({\n write: () => {\n this.browserReady();\n this.controller?.update(this.options());\n },\n });\n // Listener attachment also reconciles the control that currently owns focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (this.browserReady() && this.observePreviews()) {\n this.removePreviewListeners ??= observeTablePreviews(\n this.host.nativeElement,\n (point, trigger) => this.previewPoint(point, 'table', trigger),\n );\n } else {\n this.removePreviewListeners?.();\n this.removePreviewListeners = null;\n }\n },\n });\n // Focus restoration checks current DOM ownership before changing focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n this.state();\n this.tableRows();\n this.legendItems();\n this.focusKeeper?.restore();\n },\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.removePreviewListeners?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n\n protected toggleTable(): void {\n this.tableExpanded.update((expanded) => !expanded);\n }\n\n protected previewPoint(\n point: PlotPoint | null,\n source: 'plot' | 'table',\n trigger: 'pointer' | 'focus',\n ): void {\n if (this.destroyRef.destroyed || !this.canPreview()) return;\n const context = this.previewContext();\n if (this.previewSnapshot !== context) this.clearPreview();\n if (trigger === 'focus') this.focusPreview = point;\n else this.pointerPreview = point ? { point, source } : null;\n const pointer = this.pointerPreview;\n const candidate = pointer?.point ?? this.focusPreview;\n const origin = pointer?.source ?? 'table';\n const model = this.model();\n const value =\n candidate &&\n model.kind !== 'error' &&\n this.state().kind === 'ready' &&\n !(origin === 'plot' && this.hiddenIds().has(candidate.seriesId))\n ? model.rows\n .find((row) => row.id === candidate.rowId)\n ?.points.find((cell) => cell.seriesId === candidate.seriesId)\n : null;\n const next: PointPreview<T> | null =\n value && value.value !== null\n ? { ...value, value: value.value, source: origin, trigger: pointer ? 'pointer' : 'focus' }\n : null;\n this.previewSnapshot = context;\n if (\n next?.row === this.lastPreview?.row &&\n next?.seriesId === this.lastPreview?.seriesId &&\n next?.value === this.lastPreview?.value &&\n next?.source === this.lastPreview?.source &&\n next?.trigger === this.lastPreview?.trigger\n )\n return;\n this.lastPreview = next;\n this.emitPreview(next);\n }\n\n private clearPreview(): void {\n this.previewSnapshot = null;\n this.pointerPreview = this.focusPreview = null;\n if (this.lastPreview === null) return;\n this.lastPreview = null;\n this.emitPreview(null);\n }\n\n protected resetPointPreview(): void {\n this.plotPreview.set(null);\n this.clearPreview();\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n\n protected toggleSeries(id: string): void {\n if (this.state().kind !== 'ready') return;\n const hidden = new Set(this.hiddenIds());\n if (hidden.has(id)) hidden.delete(id);\n else hidden.add(id);\n this.hiddenIds.set(hidden);\n this.legendChange.emit({ seriesId: id, visible: !hidden.has(id) });\n }\n\n protected selectPoint(point: PlotPoint, source: 'plot' | 'table'): void {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind === 'error') return;\n if (source === 'plot' && this.hiddenIds().has(point.seriesId)) return;\n const value = model.rows\n .find((row) => row.id === point.rowId)\n ?.points.find((cell) => cell.seriesId === point.seriesId);\n if (!value || value.value === null) return;\n this.resetPointPreview();\n this.pointSelect.emit({ ...value, value: value.value, source });\n }\n}\n\nexport interface CartesianContext<T> {\n readonly model: Exclude<CartesianModel<T>, { kind: 'error' }>;\n readonly hiddenIds: ReadonlySet<string>;\n readonly tokens: CartesianThemeTokens;\n readonly animation: boolean;\n readonly format: ValueFormatter;\n readonly categoryTicks: readonly string[];\n}\n","import type { LineSeriesOption } from 'echarts/charts';\nimport type { GridComponentOption, TooltipComponentOption } from 'echarts/components';\nimport type { ComposeOption } from 'echarts/core';\nimport { buildCartesianOptions } from './cartesian-options';\nimport type { CartesianContext } from './cartesian-chart';\nexport type CurveOption = ComposeOption<\n LineSeriesOption | GridComponentOption | TooltipComponentOption\n>;\nexport function buildCurveOptions<T>(\n context: CartesianContext<T>,\n smooth: boolean,\n showPoints: boolean,\n): CurveOption {\n const { model, hiddenIds, tokens, animation, format, categoryTicks } = context;\n const common = buildCartesianOptions(\n model,\n hiddenIds,\n tokens,\n false,\n animation,\n format,\n categoryTicks,\n );\n const categoryAxis = common.xAxis;\n if (categoryAxis.type !== 'category') throw new Error('Expected category axis');\n return {\n ...common,\n xAxis: { ...categoryAxis, boundaryGap: false },\n series: model.series.flatMap((item, index): LineSeriesOption[] => {\n if (hiddenIds.has(item.id)) return [];\n const color = tokens.series[index % tokens.series.length] ?? '#047857';\n return [\n {\n id: item.id,\n name: item.label,\n type: 'line',\n smooth,\n showSymbol: showPoints,\n connectNulls: false,\n symbol: index % 2 === 0 ? 'circle' : 'diamond',\n clip: false,\n symbolSize: 6,\n triggerEvent: 'line',\n lineStyle: { color, width: 2, type: index % 2 === 0 ? 'solid' : 'dashed' },\n itemStyle: { color: tokens.background, borderColor: color, borderWidth: 2 },\n data: model.rows.map((row) => ({ id: row.id, value: row.points[index]?.value ?? '-' })),\n },\n ];\n }),\n };\n}\n","import type { PlotPoint } from './plot-controller';\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\nexport function curvePoint(\n event: unknown,\n options: unknown,\n convert: (x: number) => unknown,\n): PlotPoint | undefined {\n if (!record(event) || !record(options)) return;\n if (\n record(event['data']) &&\n typeof event['data']['id'] === 'string' &&\n typeof event['seriesId'] === 'string'\n ) {\n return { rowId: event['data']['id'], seriesId: event['seriesId'] };\n }\n // Whole-line clicks (including when markers are hidden) select the nearest category\n // on that painted series. Gaps have no painted path and missing cells never emit.\n if (\n (event['selfType'] !== 'line' && event['selfType'] !== 'area') ||\n typeof event['seriesIndex'] !== 'number' ||\n !record(event['event'])\n )\n return;\n const x = event['event']['offsetX'];\n if (typeof x !== 'number' || !Number.isFinite(x)) return;\n const category = convert(x);\n if (typeof category !== 'number' || !Number.isFinite(category)) return;\n const series =\n record(options) && Array.isArray(options['series'])\n ? options['series'][event['seriesIndex']]\n : undefined;\n if (!record(series)) return;\n const data = series['data'];\n if (!Array.isArray(data) || data.length === 0 || typeof series['id'] !== 'string') return;\n const point: unknown = data[Math.max(0, Math.min(data.length - 1, Math.round(category)))];\n if (\n record(point) &&\n typeof point['id'] === 'string' &&\n typeof point['value'] === 'number' &&\n Number.isFinite(point['value'])\n )\n return { rowId: point['id'], seriesId: series['id'] };\n return undefined;\n}\n","import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport type { ChartState } from './cartesian-model';\n\n/** Internal plot shell: state changes preserve the renderer's allocated geometry. */\n@Component({\n selector: 'nec-chart-stage',\n template: `\n <ng-content />\n @let current = state();\n @if (current.kind !== 'ready') {\n <div class=\"chart-status\" [class.is-loading]=\"current.kind === 'loading'\">\n @if (current.kind === 'loading') {\n <span class=\"loading-mark\" aria-hidden=\"true\"><i></i><i></i><i></i></span>\n }\n <p [attr.role]=\"current.kind === 'error' ? 'alert' : 'status'\">{{ current.message }}</p>\n @if (current.kind === 'error' && retryable()) {\n <button type=\"button\" (click)=\"retry.emit()\">{{ retryLabel() }}</button>\n }\n </div>\n }\n `,\n styles: `\n :host {\n display: block;\n position: relative;\n min-width: 0;\n }\n .chart-status {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 20px;\n overflow: auto;\n box-sizing: border-box;\n text-align: center;\n }\n p {\n margin: 0;\n max-width: 42ch;\n color: var(--nec-muted, #536176);\n font: inherit;\n font-size: 13px;\n line-height: 1.6;\n overflow-wrap: anywhere;\n }\n button {\n padding: 8px 12px;\n border: 1px solid var(--nec-border, #d6dce5);\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n }\n button:focus-visible {\n outline: 2px solid var(--nec-focus, #648dff);\n outline-offset: 3px;\n }\n .loading-mark {\n display: flex;\n align-items: end;\n gap: 4px;\n height: 24px;\n opacity: 0.55;\n }\n i {\n width: 5px;\n height: 14px;\n border-radius: 2px;\n background: var(--nec-muted, #536176);\n }\n i:nth-child(2) {\n height: 24px;\n }\n i:nth-child(3) {\n height: 19px;\n }\n `,\n host: { '[style.min-height.px]': 'height()' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartStage {\n readonly state = input.required<ChartState>();\n readonly height = input<number | null>(320);\n readonly retryable = input(false);\n readonly retryLabel = input('Retry chart');\n readonly retry = output<void>();\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport type { TablePagination } from './table-pagination';\n\n@Component({\n selector: 'nec-table-pager',\n template: `\n @let pages = pagination();\n @if (pages.count() > 1) {\n <nav [attr.aria-label]=\"label() + ' data table pages'\">\n <button\n type=\"button\"\n aria-label=\"Previous table page\"\n [attr.aria-disabled]=\"pages.page() === 0 ? 'true' : null\"\n (click)=\"pages.move(-1)\"\n >\n Previous\n </button>\n <span role=\"status\" aria-atomic=\"true\">\n Rows {{ pages.start() + 1 }}–{{ pages.end() }} of {{ pages.total() }}\n </span>\n <button\n type=\"button\"\n aria-label=\"Next table page\"\n [attr.aria-disabled]=\"pages.page() === pages.count() - 1 ? 'true' : null\"\n (click)=\"pages.move(1)\"\n >\n Next\n </button>\n </nav>\n }\n `,\n styles: `\n nav {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n margin-top: 1rem;\n }\n span {\n font-size: 0.875rem;\n font-variant-numeric: tabular-nums;\n }\n button {\n padding: 0.5rem 0.75rem;\n border: 1px solid var(--nec-border, #d6dce5);\n border-radius: 0.375rem;\n color: inherit;\n background: transparent;\n font: inherit;\n cursor: pointer;\n }\n button:focus-visible {\n outline: 3px solid var(--nec-focus, #648dff);\n outline-offset: 3px;\n }\n button[aria-disabled='true'] {\n color: var(--nec-muted, #536176);\n cursor: default;\n border-style: dashed;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TablePager {\n readonly pagination = input.required<TablePagination>();\n readonly label = input.required<string>();\n}\n","import type { LineSeriesOption } from 'echarts/charts';\n\nfunction alphaColor(color: string, factor: number): string {\n if (/^#[\\da-f]{6}$/i.test(color))\n return `rgba(${[1, 3, 5].map((offset) => Number.parseInt(color.slice(offset, offset + 2), 16)).join(',')},${factor})`;\n const rgba = color.match(\n /^rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/,\n );\n return rgba\n ? `rgba(${rgba[1]},${rgba[2]},${rgba[3]},${Number(rgba[4] ?? 1) * factor})`\n : 'transparent';\n}\nexport function buildAreaFill(color: string, gradient: boolean): LineSeriesOption['areaStyle'] {\n return {\n opacity: 1,\n color: gradient\n ? {\n type: 'linear',\n x: 0,\n y: 0,\n x2: 0,\n y2: 1,\n colorStops: [\n { offset: 0, color: alphaColor(color, 0.22) },\n { offset: 1, color: alphaColor(color, 0.04) },\n ],\n }\n : alphaColor(color, 0.16),\n };\n}\n"],"mappings":";;;AASA,IAAa,aAAb,MAAa,WAAU;CACZ,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAFrB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAV,OAAA,OAAA,GAAA,qBAAA;EAAA,YA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A;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EA7DtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAiB,UACjB;;;;;;;;;;;;;;;;;;;;;;;;;;GAyBT,iBAgCgB,wBAAwB;GAAM,QAAA,CAAA,2dAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;AC5DjD,SAAS,WAAW,OAAe,QAAc;CAC/C,IAAI,iBAAiB,KAAK,KAAK,GAC7B,OAAO,QAAQ;EAAC;EAAG;EAAG;CAAC,CAAC,CAAC,KAAK,WAAW,OAAO,SAAS,MAAM,MAAM,QAAQ,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,EAAC,GAAI,OAAM;CACpH,MAAM,OAAO,MAAM,MACjB,6EAA6E;CAE/E,OAAO,OACH,QAAQ,KAAK,GAAE,GAAI,KAAK,GAAE,GAAI,KAAK,GAAE,GAAI,OAAO,KAAK,MAAM,CAAC,IAAI,OAAM,KACtE;AACN;AACA,SAAgB,cAAc,OAAe,UAAiB;CAC5D,OAAO;EACL,SAAS;EACT,OAAO,WACH;GACE,MAAM;GACN,GAAG;GACH,GAAG;GACH,IAAI;GACJ,IAAI;GACJ,YAAY,CACV;IAAE,QAAQ;IAAG,OAAO,WAAW,OAAO,GAAI;GAAC,GAC3C;IAAE,QAAQ;IAAG,OAAO,WAAW,OAAO,GAAI;GAAC,CAC5C;EACF,IACD,WAAW,OAAO,GAAI;CAC3B;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantha911/ng-echarts",
3
- "version": "0.1.0-rc.19",
3
+ "version": "0.1.0-rc.22",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.6",
6
6
  "@angular/core": "^22.2.6",
@@ -5,16 +5,28 @@ import { ComposeOption } from "echarts/core";
5
5
  import * as i0 from "@angular/core";
6
6
  interface ComposedBarSeries<T> extends ChartSeries$1<T> {
7
7
  readonly kind: 'bar';
8
+ readonly gradient?: never;
9
+ /** Bars with the same nonempty name stack by sign; omission keeps a grouped bar. */
10
+ readonly stack?: string;
8
11
  readonly smooth?: never;
9
12
  readonly showPoints?: never;
10
13
  }
11
14
  interface ComposedLineSeries<T> extends ChartSeries$1<T> {
12
15
  readonly kind: 'line';
16
+ readonly gradient?: never;
17
+ readonly stack?: never;
13
18
  readonly smooth?: boolean;
14
19
  readonly showPoints?: boolean;
15
20
  }
21
+ interface ComposedAreaSeries<T> extends ChartSeries$1<T> {
22
+ readonly kind: 'area';
23
+ readonly stack?: string;
24
+ readonly smooth?: boolean;
25
+ readonly showPoints?: boolean;
26
+ readonly gradient?: boolean;
27
+ }
16
28
  /** Series share one category axis and one numeric scale; measures must use comparable units. */
17
- type ComposedSeries<T> = ComposedBarSeries<T> | ComposedLineSeries<T>;
29
+ type ComposedSeries<T> = ComposedBarSeries<T> | ComposedLineSeries<T> | ComposedAreaSeries<T>;
18
30
  declare function composedSeriesError<T>(series: readonly ComposedSeries<T>[]): string | null;
19
31
  type ComposedOption = ComposeOption<BarSeriesOption | LineSeriesOption | GridComponentOption | TooltipComponentOption>;
20
32
  declare function buildComposedOptions<T>(context: ɵCartesianContext<T>, series: readonly ComposedSeries<T>[]): ComposedOption;
@@ -27,4 +39,4 @@ export declare class ComposedChart<T extends object> extends ɵCartesianChart<T,
27
39
  static ɵfac: i0.ɵɵFactoryDeclaration<ComposedChart<any>, never>;
28
40
  static ɵcmp: i0.ɵɵComponentDeclaration<ComposedChart<any>, "nec-composed-chart", never, {}, {}, never, never, true, never>;
29
41
  }
30
- export type { CategoryTickFormatter, ChartSeries, ChartTheme, ComposedBarSeries, ComposedLineSeries, ComposedSeries, LegendVisibilityChange, NumericKey, PointSelection, StringKey, ValueFormatter };
42
+ export type { CategoryTickFormatter, ChartSeries, ChartTheme, ComposedAreaSeries, ComposedBarSeries, ComposedLineSeries, ComposedSeries, LegendVisibilityChange, NumericKey, PointSelection, StringKey, ValueFormatter };
@@ -576,4 +576,5 @@ declare class TablePager {
576
576
  };
577
577
  }, {}, never, never, true, never>;
578
578
  }
579
- export { type BarLayout, type CategoryTickFormatter, type CategoryVisibilityChange, type ChartMeasure, type ChartSeries, type ChartTheme, type LegendVisibilityChange, type NumericKey, type PointPreview, type PointSelection, type StringKey, type ValueFormatter, CartesianChart as ɵCartesianChart, type CartesianContext as ɵCartesianContext, type CartesianModel as ɵCartesianModel, type CartesianPoint as ɵCartesianPoint, type CartesianRow as ɵCartesianRow, type CartesianThemeTokens as ɵCartesianThemeTokens, ChartFocusKeeper as ɵChartFocusKeeper, ChartStage as ɵChartStage, type ChartState as ɵChartState, type CurveOption as ɵCurveOption, PlotController as ɵPlotController, type PlotEnvironment as ɵPlotEnvironment, type PlotPoint as ɵPlotPoint, type PlotRenderer as ɵPlotRenderer, type PlotRendererFactory as ɵPlotRendererFactory, TablePager as ɵTablePager, TablePagination as ɵTablePagination, browserPlotEnvironment as ɵbrowserPlotEnvironment, buildCartesianOptions as ɵbuildCartesianOptions, buildCurveOptions as ɵbuildCurveOptions, createValueFormatting as ɵcreateValueFormatting, curvePoint as ɵcurvePoint, defaultCartesianTheme as ɵdefaultCartesianTheme, escapeTooltipText as ɵescapeTooltipText, formatCategoryTicks as ɵformatCategoryTicks, normalizeCartesianData as ɵnormalizeCartesianData, readCartesianTheme as ɵreadCartesianTheme, resolveCartesianState as ɵresolveCartesianState, tooltipMarkup as ɵtooltipMarkup, tooltipStyle as ɵtooltipStyle };
579
+ declare function buildAreaFill(color: string, gradient: boolean): LineSeriesOption['areaStyle'];
580
+ export { type BarLayout, type CategoryTickFormatter, type CategoryVisibilityChange, type ChartMeasure, type ChartSeries, type ChartTheme, type LegendVisibilityChange, type NumericKey, type PointPreview, type PointSelection, type StringKey, type ValueFormatter, CartesianChart as ɵCartesianChart, type CartesianContext as ɵCartesianContext, type CartesianModel as ɵCartesianModel, type CartesianPoint as ɵCartesianPoint, type CartesianRow as ɵCartesianRow, type CartesianThemeTokens as ɵCartesianThemeTokens, ChartFocusKeeper as ɵChartFocusKeeper, ChartStage as ɵChartStage, type ChartState as ɵChartState, type CurveOption as ɵCurveOption, PlotController as ɵPlotController, type PlotEnvironment as ɵPlotEnvironment, type PlotPoint as ɵPlotPoint, type PlotRenderer as ɵPlotRenderer, type PlotRendererFactory as ɵPlotRendererFactory, TablePager as ɵTablePager, TablePagination as ɵTablePagination, browserPlotEnvironment as ɵbrowserPlotEnvironment, buildAreaFill as ɵbuildAreaFill, buildCartesianOptions as ɵbuildCartesianOptions, buildCurveOptions as ɵbuildCurveOptions, createValueFormatting as ɵcreateValueFormatting, curvePoint as ɵcurvePoint, defaultCartesianTheme as ɵdefaultCartesianTheme, escapeTooltipText as ɵescapeTooltipText, formatCategoryTicks as ɵformatCategoryTicks, normalizeCartesianData as ɵnormalizeCartesianData, readCartesianTheme as ɵreadCartesianTheme, resolveCartesianState as ɵresolveCartesianState, tooltipMarkup as ɵtooltipMarkup, tooltipStyle as ɵtooltipStyle };
@@ -3,5 +3,5 @@ import { LineChart } from "@mantha911/ng-echarts/line";
3
3
  import { BarChart, BarRangeSelection } from "@mantha911/ng-echarts/bar";
4
4
  import { BarLayout, CategoryTickFormatter, CategoryVisibilityChange, ChartFrame, ChartMeasure, ChartSeries, ChartTheme, LegendVisibilityChange, NumericKey, PointPreview, PointSelection, StringKey, ValueFormatter } from "@mantha911/ng-echarts/core";
5
5
  import { PieChart } from "@mantha911/ng-echarts/pie";
6
- import { ComposedBarSeries, ComposedChart, ComposedLineSeries, ComposedSeries } from "@mantha911/ng-echarts/composed";
7
- export { AreaChart, BarChart, type BarLayout, type BarRangeSelection, type CategoryTickFormatter, type CategoryVisibilityChange, ChartFrame, type ChartMeasure, type ChartSeries, type ChartTheme, type ComposedBarSeries, ComposedChart, type ComposedLineSeries, type ComposedSeries, type LegendVisibilityChange, LineChart, type NumericKey, PieChart, type PointPreview, type PointSelection, type StringKey, type ValueFormatter };
6
+ import { ComposedAreaSeries, ComposedBarSeries, ComposedChart, ComposedLineSeries, ComposedSeries } from "@mantha911/ng-echarts/composed";
7
+ export { AreaChart, BarChart, type BarLayout, type BarRangeSelection, type CategoryTickFormatter, type CategoryVisibilityChange, ChartFrame, type ChartMeasure, type ChartSeries, type ChartTheme, type ComposedAreaSeries, type ComposedBarSeries, ComposedChart, type ComposedLineSeries, type ComposedSeries, type LegendVisibilityChange, LineChart, type NumericKey, PieChart, type PointPreview, type PointSelection, type StringKey, type ValueFormatter };