Skip to content

Commit a752b76

Browse files
authored
Docs: Make menu labels consistent with the page titles in the API ref (#1399)
* Rename API reference menu items in the docs * Rename docs/api-template.md to docs/api-ref-readme.md * Extract ConfigParams interface to separate file * Fix jsdoc formatting
1 parent 48bceb0 commit a752b76

11 files changed

+422
-477
lines changed

.typedoc.md.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module.exports = {
22
...require('./.typedoc.ts'),
33
"theme": "./docs/.vuepress/subtheme",
44
"out": "docs/api",
5-
"name": "HyperFormula API reference",
5+
"name": "API Reference Overview",
66
"categorizeByGroup": true,
7-
"readme": "./docs/api-template.md",
7+
"readme": "./docs/api-ref-readme.md",
88
"plugin": ["typedoc-plugin-markdown"],
99
}

.typedoc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"inputFiles": [
33
"./src/HyperFormula.ts",
4-
"./src/Config.ts",
4+
"./src/ConfigParams.ts",
55
"./src/Emitter.ts",
66
],
77
"exclude": [
@@ -47,7 +47,7 @@ module.exports = {
4747
],
4848
"toc": [
4949
"HyperFormula",
50-
"Config",
50+
"ConfigParams",
5151
"Emitter"
5252
]
5353
}

docs/.vuepress/config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,21 @@ module.exports = {
140140
sidebar: {
141141
'/api/': [
142142
{
143-
title: 'Introduction',
143+
title: 'API Reference Overview',
144144
path: '/api/',
145145
},
146146
{
147-
title: 'HyperFormula Class',
147+
title: 'HyperFormula',
148148
path: '/api/classes/hyperformula',
149149
collapsable: true,
150150
},
151151
{
152-
title: 'Configuration Options',
152+
title: 'ConfigParams ',
153153
path: '/api/interfaces/configparams',
154154
collapsable: true,
155155
},
156156
{
157-
title: 'Event Types',
157+
title: 'Listeners',
158158
path: '/api/interfaces/listeners',
159159
alias: '/api/events',
160160
collapsable: true,

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ docs # All documentation files
5252
│   └── highlight.js # Code highlight configuration
5353
├── api # The API reference files, generated automatically from JsDoc. Do not edit!
5454
├── guide # The docs source files: Markdown content
55-
├── api-template.md # The API reference welcome page
55+
├── api-ref-readme.md # The API reference welcome page
5656
├── index.md # The main docs portal welcome page
5757
└── README.md # The file you're looking at right now!
5858
```

docs/api-template.md docs/api-ref-readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const sheetData = [
2222
const hfInstance = HyperFormula.buildFromArray(sheetData, options);
2323
```
2424

25-
#### Configuration Options
25+
#### ConfigParams
2626
This section contains information about options that allow you to configure the instance of HyperFormula.
2727

2828
An example set of options:
@@ -34,7 +34,7 @@ const options = {
3434
};
3535
```
3636

37-
#### Event Types
37+
#### Listeners
3838
In this section, you can find information about all events you can subscribe to.
3939

4040
For example, subscribing to `sheetAdded` event:

src/ArgumentSanitization.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
* Copyright (c) 2024 Handsoncode. All rights reserved.
44
*/
55

6-
import {Config, ConfigParamsList} from './Config'
6+
import {Config} from './Config'
77
import {
88
ConfigValueTooBigError,
99
ConfigValueTooSmallError,
1010
ExpectedOneOfValuesError,
1111
ExpectedValueOfTypeError
1212
} from './errors'
13+
import {ConfigParamsList} from './ConfigParams'
1314

1415
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1516
export function configValueFromParam(inputValue: any, expectedType: string | string[], paramName: ConfigParamsList) {

src/BuildEngineFactory.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import {ArraySizePredictor} from './ArraySize'
77
import {CellContentParser} from './CellContentParser'
88
import {ClipboardOperations} from './ClipboardOperations'
9-
import {Config, ConfigParams} from './Config'
9+
import {Config} from './Config'
1010
import {CrudOperations} from './CrudOperations'
1111
import {DateTimeHelper} from './DateTimeHelper'
1212
import {DependencyGraph} from './DependencyGraph'
@@ -28,6 +28,7 @@ import {Serialization, SerializedNamedExpression} from './Serialization'
2828
import {findBoundaries, Sheet, Sheets, validateAsSheet} from './Sheet'
2929
import {EmptyStatistics, Statistics, StatType} from './statistics'
3030
import {UndoRedo} from './UndoRedo'
31+
import {ConfigParams} from './ConfigParams'
3132

3233
export type EngineState = {
3334
config: Config,

0 commit comments

Comments
 (0)