react-markdown-table-ts 0.6.0 → 0.6.2
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/README.md +64 -65
- package/dist/index.cjs.js +36 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +36 -52
- package/dist/index.esm.js.map +1 -1
- package/dist/utils.d.ts +0 -19
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
@@ -8,26 +8,7 @@ import { TableRow, InputData } from './types';
|
|
8
8
|
export declare function calculateColumnWidths(tableRows: readonly TableRow[], maxColumnCount: number): number[];
|
9
9
|
type Alignment = 'left' | 'right' | 'center' | 'none';
|
10
10
|
export declare function formatMarkdownRow(columnCount: number, currentRow: TableRow, columnAlignments: readonly Alignment[], columnWidths?: readonly number[], useTabs?: boolean, canReplaceNewlines?: boolean, hasPadding?: boolean): string;
|
11
|
-
/**
|
12
|
-
* Generates the alignment row for the Markdown table syntax.
|
13
|
-
* @param columnCount - The number of columns in the table.
|
14
|
-
* @param columnAlignments - Alignment settings for each column.
|
15
|
-
* @param columnWidths - Widths of each column.
|
16
|
-
* @param useTabs - Flag to use tabs between columns.
|
17
|
-
* @param hasPadding - Flag to add padding spaces around cell content.
|
18
|
-
* @returns The Markdown string for the alignment row.
|
19
|
-
*/
|
20
11
|
export declare function formatAlignmentRow(columnCount: number, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], columnWidths?: readonly number[], useTabs?: boolean, hasPadding?: boolean): string;
|
21
|
-
/**
|
22
|
-
* Generates a complete Markdown table string from the provided data.
|
23
|
-
* @param inputData - The table data including headers and rows.
|
24
|
-
* @param columnAlignments - Alignment settings for each column.
|
25
|
-
* @param canAdjustColumnWidths - Flag to adjust column widths based on content.
|
26
|
-
* @param useTabs - Flag to use tabs between columns.
|
27
|
-
* @param replaceNewlines - Flag to replace newlines with <br> tags.
|
28
|
-
* @param hasPadding - Flag to add padding spaces around cell content.
|
29
|
-
* @returns The complete Markdown table string.
|
30
|
-
*/
|
31
12
|
export declare function generateMarkdownTableString(inputData: InputData, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], canAdjustColumnWidths?: boolean, useTabs?: boolean, replaceNewlines?: boolean, hasPadding?: boolean): string;
|
32
13
|
/**
|
33
14
|
* Replaces newline characters in a string with <br> tags.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-markdown-table-ts",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.2",
|
4
4
|
"description": "A React component that converts structured data into Markdown table syntax and displays it within a `<pre>` tag.",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.esm.js",
|