@md-plugins/md-plugin-table 0.1.0-alpha.1 → 0.1.0-alpha.5

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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024-present, Jeff Galbraith
3
+ Copyright (c) 2024-present, MD-PLUGINS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -27,10 +27,10 @@ pnpm add @md-plugins/md-plugin-table
27
27
  ### Basic Setup
28
28
 
29
29
  ```js
30
- import MarkdownIt from 'markdown-it';
31
- import { tablePlugin } from '@md-plugins/md-plugin-table';
30
+ import MarkdownIt from 'markdown-it'
31
+ import { tablePlugin } from '@md-plugins/md-plugin-table'
32
32
 
33
- const md = new MarkdownIt();
33
+ const md = new MarkdownIt()
34
34
  md.use(tablePlugin, {
35
35
  tableClass: 'custom-table-class',
36
36
  tableToken: 'custom-table-tag',
@@ -38,18 +38,18 @@ md.use(tablePlugin, {
38
38
  [':wrap-cells', 'true'],
39
39
  [':flat', 'true'],
40
40
  ],
41
- });
41
+ })
42
42
 
43
43
  const markdownContent = `
44
44
  | Header 1 | Header 2 |
45
45
  |----------|----------|
46
46
  | Cell 1 | Cell 2 |
47
47
  | Cell 3 | Cell 4 |
48
- `;
48
+ `
49
49
 
50
- const renderedOutput = md.render(markdownContent);
50
+ const renderedOutput = md.render(markdownContent)
51
51
 
52
- console.log('Rendered Output:', renderedOutput);
52
+ console.log('Rendered Output:', renderedOutput)
53
53
  ```
54
54
 
55
55
  ### Example Output
@@ -81,14 +81,14 @@ For the example above, the plugin produces the following output:
81
81
 
82
82
  The `md-plugin-table` plugin supports the following options:
83
83
 
84
- | Option | Type | Default | Description |
85
- | ---------------- | ------ | --------------------- | -------------------------------------------------- |
86
- | tableClass | string | 'markdown-page-table' | CSS class for the `<table>` or custom tag. |
87
- | tableToken | string | 'q-markup-table' | Tag name to replace the default `<table>` tag. |
88
- | tableAttributes | Array | [] | Array of attribute name-value pairs for the table. |
89
- | tableHeaderClass | string | 'text-left' | CSS class for `<th>` elements. |
90
- | tableRowClass | string | '' | CSS class for `<tr>` elements. |
91
- | tableCellClass | string | '' | CSS class for `<td>` elements. |
84
+ | Option | Type | Default | Description |
85
+ | ---------------- | ------ | ---------------- | -------------------------------------------------- |
86
+ | tableClass | string | 'markdown-table' | CSS class for the `<table>` or custom tag. |
87
+ | tableToken | string | 'q-markup-table' | Tag name to replace the default `<table>` tag. |
88
+ | tableAttributes | Array | [] | Array of attribute name-value pairs for the table. |
89
+ | tableHeaderClass | string | 'text-left' | CSS class for `<th>` elements. |
90
+ | tableRowClass | string | '' | CSS class for `<tr>` elements. |
91
+ | tableCellClass | string | '' | CSS class for `<td>` elements. |
92
92
 
93
93
  ## Advanced Usage
94
94
 
@@ -102,7 +102,7 @@ md.use(tablePlugin, {
102
102
  tableHeaderClass: 'custom-header',
103
103
  tableRowClass: 'custom-row',
104
104
  tableCellClass: 'custom-cell',
105
- });
105
+ })
106
106
  ```
107
107
 
108
108
  Renered output:
@@ -134,15 +134,13 @@ md.use(tablePlugin, {
134
134
  [':bordered', 'true'],
135
135
  [':flat', 'true'],
136
136
  ],
137
- });
137
+ })
138
138
  ```
139
139
 
140
140
  Rendered output:
141
141
 
142
142
  ```html
143
- <q-markup-table class="markdown-page-table" :bordered="true" :flat="true">
144
- ...
145
- </q-markup-table>
143
+ <q-markup-table class="markdown-table" :bordered="true" :flat="true"> ... </q-markup-table>
146
144
  ```
147
145
 
148
146
  ## Testing
package/dist/index.d.mts CHANGED
@@ -4,7 +4,7 @@ interface TablePluginOptions {
4
4
  /**
5
5
  * The class for the table
6
6
  *
7
- * @default 'markdown-page-table'
7
+ * @default 'markdown-table'
8
8
  */
9
9
  tableClass?: string;
10
10
  /**
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ interface TablePluginOptions {
4
4
  /**
5
5
  * The class for the table
6
6
  *
7
- * @default 'markdown-page-table'
7
+ * @default 'markdown-table'
8
8
  */
9
9
  tableClass?: string;
10
10
  /**
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const tablePlugin = (md, {
2
- tableClass = "markdown-page-table",
2
+ tableClass = "markdown-table",
3
3
  tableHeaderClass = "text-left",
4
4
  tableRowClass = "",
5
5
  tableCellClass = "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/md-plugin-table",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "A markdown-it plugin for handling tables with custom tag and styles.",
5
5
  "keywords": [
6
6
  "markdown-it",
@@ -33,16 +33,21 @@
33
33
  "./dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@types/markdown-it": "^14.1.2",
37
36
  "markdown-it": "^14.1.0",
38
- "@md-plugins/shared": "0.1.0-alpha.1"
37
+ "@md-plugins/shared": "0.1.0-alpha.5"
38
+ },
39
+ "devDependencies": {
40
+ "@types/markdown-it": "^14.1.2"
41
+ },
42
+ "peerDependencies": {
43
+ "markdown-it": "^14.1.0"
39
44
  },
40
45
  "publishConfig": {
41
46
  "access": "public"
42
47
  },
43
48
  "scripts": {
44
49
  "build": "unbuild",
45
- "clean": "rm -rf dist",
50
+ "clean": "rm -rf dist/ node_modules/",
46
51
  "test": "vitest"
47
52
  }
48
53
  }