table 6.3.0 → 6.3.1
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/dist/src/alignString.d.ts +6 -0
- package/dist/src/alignTableData.d.ts +3 -0
- package/dist/src/calculateCellHeight.d.ts +2 -0
- package/dist/src/calculateCellWidthIndex.d.ts +6 -0
- package/dist/src/calculateMaximumColumnWidthIndex.d.ts +6 -0
- package/dist/src/calculateRowHeightIndex.d.ts +6 -0
- package/dist/src/createStream.d.ts +3 -0
- package/dist/src/drawBorder.d.ts +25 -0
- package/dist/src/drawHorizontalContent.d.ts +11 -0
- package/dist/src/drawRow.d.ts +7 -0
- package/dist/src/drawTable.d.ts +3 -0
- package/dist/src/getBorderCharacters.d.ts +3 -0
- package/dist/src/makeConfig.d.ts +8 -0
- package/dist/src/makeStreamConfig.d.ts +8 -0
- package/dist/src/mapDataUsingRowHeightIndex.d.ts +3 -0
- package/dist/src/padTableData.d.ts +3 -0
- package/dist/src/stringifyTableData.d.ts +3 -0
- package/dist/src/table.d.ts +3 -0
- package/dist/src/truncateTableData.d.ts +6 -0
- package/dist/src/types/api.d.ts +1 -0
- package/dist/src/types/internal.d.ts +1 -0
- package/dist/src/validateConfig.d.ts +3 -0
- package/dist/src/validateTableData.d.ts +2 -0
- package/dist/src/wrapCell.d.ts +9 -0
- package/dist/src/wrapString.d.ts +10 -0
- package/dist/src/wrapWord.d.ts +2 -0
- package/package.json +2 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DrawVerticalLine } from './types/api';
|
|
2
|
+
import type { BottomBorderConfig, JoinBorderConfig, TopBorderConfig } from './types/internal';
|
|
3
|
+
declare type Separator = {
|
|
4
|
+
readonly left: string;
|
|
5
|
+
readonly right: string;
|
|
6
|
+
readonly body: string;
|
|
7
|
+
readonly join: string;
|
|
8
|
+
};
|
|
9
|
+
declare const drawBorder: (columnSizeIndex: number[], config: {
|
|
10
|
+
separator: Separator;
|
|
11
|
+
drawVerticalLine: DrawVerticalLine;
|
|
12
|
+
}) => string;
|
|
13
|
+
declare const drawBorderTop: (columnSizeIndex: number[], config: {
|
|
14
|
+
border: TopBorderConfig;
|
|
15
|
+
drawVerticalLine: DrawVerticalLine;
|
|
16
|
+
}) => string;
|
|
17
|
+
declare const drawBorderJoin: (columnSizeIndex: number[], config: {
|
|
18
|
+
border: JoinBorderConfig;
|
|
19
|
+
drawVerticalLine: DrawVerticalLine;
|
|
20
|
+
}) => string;
|
|
21
|
+
declare const drawBorderBottom: (columnSizeIndex: number[], config: {
|
|
22
|
+
border: BottomBorderConfig;
|
|
23
|
+
drawVerticalLine: DrawVerticalLine;
|
|
24
|
+
}) => string;
|
|
25
|
+
export { drawBorder, drawBorderBottom, drawBorderJoin, drawBorderTop, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DrawVerticalLine } from './types/api';
|
|
2
|
+
declare type Separator = {
|
|
3
|
+
readonly left: string;
|
|
4
|
+
readonly right: string;
|
|
5
|
+
readonly join: string;
|
|
6
|
+
};
|
|
7
|
+
export default function drawHorizontalContent(contents: string[], config: {
|
|
8
|
+
separator: Separator;
|
|
9
|
+
drawVerticalLine: DrawVerticalLine;
|
|
10
|
+
}): string;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DrawVerticalLine } from './types/api';
|
|
2
|
+
import type { BodyBorderConfig, Row } from './types/internal';
|
|
3
|
+
declare const _default: (row: Row, config: {
|
|
4
|
+
border: BodyBorderConfig;
|
|
5
|
+
drawVerticalLine: DrawVerticalLine;
|
|
6
|
+
}) => string;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TableUserConfig } from './types/api';
|
|
2
|
+
import type { Row, TableConfig } from './types/internal';
|
|
3
|
+
declare const _default: (rows: Row[], userConfig?: TableUserConfig) => TableConfig;
|
|
4
|
+
/**
|
|
5
|
+
* Makes a new configuration object out of the userConfig object
|
|
6
|
+
* using default values for the missing configuration properties.
|
|
7
|
+
*/
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StreamUserConfig } from './types/api';
|
|
2
|
+
import type { StreamConfig } from './types/internal';
|
|
3
|
+
declare const _default: (userConfig: StreamUserConfig) => StreamConfig;
|
|
4
|
+
/**
|
|
5
|
+
* Makes a new configuration object out of the userConfig object
|
|
6
|
+
* using default values for the missing configuration properties.
|
|
7
|
+
*/
|
|
8
|
+
export default _default;
|
package/dist/src/types/api.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare type BorderUserConfig = {
|
|
|
18
18
|
readonly joinBody?: string;
|
|
19
19
|
readonly joinJoin?: string;
|
|
20
20
|
};
|
|
21
|
+
export declare type BorderConfig = Required<BorderUserConfig>;
|
|
21
22
|
export declare type ColumnUserConfig = {
|
|
22
23
|
/**
|
|
23
24
|
* Cell content horizontal alignment (default: left)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: (cellValue: string, columnWidth: number, useWrapWord: boolean) => string[];
|
|
2
|
+
/**
|
|
3
|
+
* Wrap a single cell value into a list of lines
|
|
4
|
+
*
|
|
5
|
+
* Always wraps on newlines, for the remainder uses either word or string wrapping
|
|
6
|
+
* depending on user configuration.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: (subject: string, size: number) => string[];
|
|
2
|
+
/**
|
|
3
|
+
* Creates an array of strings split into groups the length of size.
|
|
4
|
+
* This function works with strings that contain ASCII characters.
|
|
5
|
+
*
|
|
6
|
+
* wrapText is different from would-be "chunk" implementation
|
|
7
|
+
* in that whitespace characters that occur on a chunk size limit are trimmed.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -66,8 +66,7 @@
|
|
|
66
66
|
"main": "./dist/src/index.js",
|
|
67
67
|
"files": [
|
|
68
68
|
"dist/src/**/*.js",
|
|
69
|
-
"dist/src
|
|
70
|
-
"dist/src/index.d.ts"
|
|
69
|
+
"dist/src/**/*.d.ts"
|
|
71
70
|
],
|
|
72
71
|
"name": "table",
|
|
73
72
|
"nyc": {
|
|
@@ -95,5 +94,5 @@
|
|
|
95
94
|
"lint": "eslint ./src ./test",
|
|
96
95
|
"test": "mocha ./dist/test/**/*.js"
|
|
97
96
|
},
|
|
98
|
-
"version": "6.3.
|
|
97
|
+
"version": "6.3.1"
|
|
99
98
|
}
|