react-markdown-table-ts 0.4.10 → 0.4.12
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/index.cjs.js +12 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/utils.d.ts +4 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
package/dist/utils.d.ts
CHANGED
@@ -14,9 +14,10 @@ export declare function calculateColumnWidths(tableRows: readonly TableRow[], ma
|
|
14
14
|
* @param columnWidths - Widths of each column.
|
15
15
|
* @param useTabs - Flag to use tabs between columns.
|
16
16
|
* @param canReplaceNewlines - Flag to replace newlines with <br> tags.
|
17
|
+
* @param hasPadding - Flag to add padding spaces around cell content.
|
17
18
|
* @returns The Markdown string for the row.
|
18
19
|
*/
|
19
|
-
export declare function formatMarkdownRow(columnCount: number, currentRow: TableRow, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], columnWidths?: readonly number[], useTabs?: boolean, canReplaceNewlines?: boolean): string;
|
20
|
+
export declare function formatMarkdownRow(columnCount: number, currentRow: TableRow, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], columnWidths?: readonly number[], useTabs?: boolean, canReplaceNewlines?: boolean, hasPadding?: boolean): string;
|
20
21
|
/**
|
21
22
|
* Generates the alignment row for the Markdown table syntax.
|
22
23
|
* @param columnCount - The number of columns in the table.
|
@@ -33,9 +34,10 @@ export declare function formatAlignmentRow(columnCount: number, columnAlignments
|
|
33
34
|
* @param canAdjustColumnWidths - Flag to adjust column widths based on content.
|
34
35
|
* @param useTabs - Flag to use tabs between columns.
|
35
36
|
* @param replaceNewlines - Flag to replace newlines with <br> tags.
|
37
|
+
* @param hasPadding - Flag to add padding spaces around cell content.
|
36
38
|
* @returns The complete Markdown table string.
|
37
39
|
*/
|
38
|
-
export declare function generateMarkdownTableString(inputData: InputData, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], canAdjustColumnWidths?: boolean, useTabs?: boolean, replaceNewlines?: boolean): string;
|
40
|
+
export declare function generateMarkdownTableString(inputData: InputData, columnAlignments: readonly ('left' | 'right' | 'center' | 'none')[], canAdjustColumnWidths?: boolean, useTabs?: boolean, replaceNewlines?: boolean, hasPadding?: boolean): string;
|
39
41
|
/**
|
40
42
|
* Replaces newline characters in a string with <br> tags.
|
41
43
|
* @param cell - The cell content to process.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-markdown-table-ts",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.12",
|
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",
|