Skip to content

Commit db63ac9

Browse files
authored
chore: trim lib exports (#16)
* chore: trim package exports * docs: split module into public/internal API * chore: bump v1.2.2
1 parent 56105b1 commit db63ac9

3 files changed

Lines changed: 19 additions & 18 deletions

File tree

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,31 @@ Core library for gh-top-languages — chart generation, SVG output, and paramete
77
![Node](https://img.shields.io/badge/Node.js-22+-green)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-green)](./LICENSE)
99

10-
## Modules
10+
## Module APIs
11+
### Public
12+
Importable via `@gh-top-languages/lib/<path>`:
1113
| Path | Description |
1214
| --- | --- |
15+
| `charts/types.js` | Shared types |
16+
| `charts/generate.js` | Chart geometry dispatch, segment and legend generation |
17+
| `render/svg.js` | SVG document rendering |
18+
| `render/error.js` | Error SVG rendering |
19+
| `utils/params.js` | Query parameter parsing and normalization |
20+
| `utils/sanitize.js` | HTML entity sanitization |
1321
| `constants/config.js` | Default configuration values |
22+
| `constants/themes.js` | Built-in colour themes |
23+
24+
### Internal
25+
Shipped in the package but not part of the public API:
26+
| Path | Description |
27+
| --- | --- |
1428
| `constants/geometry.js` | Geometry constants |
1529
| `constants/styles.js` | Style and layout constants |
16-
| `constants/themes.js` | Built-in colour themes |
1730
| `constants/types.js` | Valid chart type values |
18-
| `charts/types.js` | Shared types |
19-
| `utils/params.js` | Query parameter parsing and normalization |
20-
| `utils/sanitize.js` | HTML entity sanitization |
2131
| `charts/geometry.js` | SVG arc path math and segment helpers |
2232
| `charts/helpers.js` | Percent display and colour-resolution helpers |
2333
| `charts/legend.js` | Legend element generation |
2434
| `charts/layout.js` | Shared layout calculations |
25-
| `charts/generate.js` | Chart geometry dispatch, segment and legend generation |
26-
| `render/svg.js` | SVG document rendering |
27-
| `render/error.js` | Error SVG rendering |
2835

2936
## Query parameters
3037
All parsing lives in `parseQueryParams`(utils/params.js), invalid params fall back to defaults.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gh-top-languages/lib",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Library for gh-top-languages — chart generation, SVG output, and parameter parsing",
55
"keywords": [
66
"svg",
@@ -22,19 +22,13 @@
2222
"engines": { "node": ">=22" },
2323
"exports": {
2424
"./charts/types.js": { "types": "./dist/charts/types.d.ts", "import": "./dist/charts/types.js" },
25-
"./charts/geometry.js": { "types": "./dist/charts/geometry.d.ts", "import": "./dist/charts/geometry.js" },
26-
"./charts/legend.js": { "types": "./dist/charts/legend.d.ts", "import": "./dist/charts/legend.js" },
27-
"./charts/layout.js": { "types": "./dist/charts/layout.d.ts", "import": "./dist/charts/layout.js" },
2825
"./charts/generate.js": { "types": "./dist/charts/generate.d.ts", "import": "./dist/charts/generate.js" },
2926
"./render/svg.js": { "types": "./dist/render/svg.d.ts", "import": "./dist/render/svg.js" },
3027
"./render/error.js": { "types": "./dist/render/error.d.ts", "import": "./dist/render/error.js" },
3128
"./utils/params.js": { "types": "./dist/utils/params.d.ts", "import": "./dist/utils/params.js" },
3229
"./utils/sanitize.js": { "types": "./dist/utils/sanitize.d.ts", "import": "./dist/utils/sanitize.js" },
3330
"./constants/config.js": { "types": "./dist/constants/config.d.ts", "import": "./dist/constants/config.js" },
34-
"./constants/geometry.js": { "types": "./dist/constants/geometry.d.ts", "import": "./dist/constants/geometry.js" },
35-
"./constants/styles.js": { "types": "./dist/constants/styles.d.ts", "import": "./dist/constants/styles.js" },
36-
"./constants/themes.js": { "types": "./dist/constants/themes.d.ts", "import": "./dist/constants/themes.js" },
37-
"./constants/types.js": { "types": "./dist/constants/types.d.ts", "import": "./dist/constants/types.js" }
31+
"./constants/themes.js": { "types": "./dist/constants/themes.d.ts", "import": "./dist/constants/themes.js" }
3832
},
3933
"files": [
4034
"dist",

0 commit comments

Comments
 (0)