ai-localize-reporting 2.0.5 → 2.0.6

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,5 +1,12 @@
1
1
  # ai-localize-reporting
2
2
 
3
+ ## 2.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Add per-package README.md files so each package displays documentation on npmjs.com
8
+ - Update README version badge to 2.0.6
9
+
3
10
  ## 2.0.5
4
11
 
5
12
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # ai-localize-reporting
2
+
3
+ > HTML analytics dashboard + rich CLI terminal reporter for the [ai-localize-core](https://github.com/ai-localize/ai-localize-core) platform.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/ai-localize-reporting.svg)](https://www.npmjs.com/package/ai-localize-reporting)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+
8
+ ---
9
+
10
+ ## What it does
11
+
12
+ - **`buildReport()`** — assembles a `Report` object from scan + validation results
13
+ - **`generateHtmlReport()`** — writes a self-contained, interactive HTML analytics dashboard
14
+ - **`printCliSummary()`** — prints a rich structured terminal summary with ANSI colour, bar charts, and tables
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install ai-localize-reporting
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ```ts
25
+ import { buildReport, generateHtmlReport, printCliSummary } from 'ai-localize-reporting';
26
+
27
+ const report = buildReport({
28
+ scanResult,
29
+ validationResult,
30
+ uploadedAssets, // optional
31
+ replacedUrls, // optional
32
+ });
33
+
34
+ // Write HTML dashboard
35
+ generateHtmlReport(report, './.reports/report.html');
36
+
37
+ // Print terminal summary
38
+ printCliSummary(report);
39
+ ```
40
+
41
+ ## HTML report features
42
+
43
+ - **Sticky sidebar navigation** with active section highlighting and alert indicators
44
+ - **Light / dark theme** — system preference, `localStorage`, `Cmd+D` / `Ctrl+D` shortcut
45
+ - **9 stat cards** — top-border colour coding (ok / warn / error / info)
46
+ - **SVG donut chart** — translation coverage % (no external dependencies)
47
+ - **Bar charts** — keys by namespace, texts by AST context
48
+ - **Interactive tables** — search, sort, CSV/JSON export, pagination (50 rows/page)
49
+ - **AI Insights** (100% deterministic) — duplicate text detection, translation inconsistency, unused keys, namespace cleanup hints
50
+ - **Export panel** — full report JSON, summary CSV, print/PDF
51
+ - **Responsive + accessible** — ARIA roles, keyboard navigation, mobile sidebar
52
+
53
+ ## CLI terminal summary features
54
+
55
+ - **Zero new dependencies** — all ANSI codes inlined; `NO_COLOR` env var respected
56
+ - **Full-width banner** with centred title
57
+ - **9 stat lines** with status dots (green/yellow/red) and contextual hints
58
+ - **Coverage progress bar** (24-block, colour-coded)
59
+ - **Top-files bar chart**, missing-translations ranking, namespace distribution, AST context distribution
60
+ - **AI Insights block** and recommended next steps
61
+ - **Responsive width** — reads `process.stdout.columns`, caps at 120 chars
62
+
63
+ ## Coverage calculation (v2.0.5+)
64
+
65
+ Coverage % is computed using **distinct missing key names** (not raw per-language count), so it correctly reflects the fraction of unique keys that have been translated:
66
+
67
+ ```
68
+ coverage = (totalUniqueKeys - distinctMissingKeys) / totalUniqueKeys × 100
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Part of ai-localize-core
74
+
75
+ Install the CLI for the complete toolset: `npm install -g ai-localize-cli`
76
+
77
+ MIT © ai-localize-core contributors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-localize-reporting",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Localization scan reporting: JSON, HTML analytics dashboard and CLI summary",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -33,7 +33,7 @@
33
33
  "node": ">=18.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "ai-localize-shared": "2.0.5"
36
+ "ai-localize-shared": "2.0.6"
37
37
  },
38
38
  "devDependencies": {
39
39
  "tsup": "^8.0.1",