@pinkpixel/marzipan 1.2.0 → 1.2.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/README.md +1 -1
- package/docs/plugins.md +26 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
[](LICENSE)
|
|
9
|
-
[](CHANGELOG.md)
|
|
10
10
|
[](https://marzipan.pinkpixel.dev)
|
|
11
11
|
|
|
12
12
|
## ✨ Highlights
|
package/docs/plugins.md
CHANGED
|
@@ -67,9 +67,9 @@ The table plugins now support rich styling via GFM alignment markers and an HTML
|
|
|
67
67
|
GFM column alignment is fully supported. Use `:---` (left), `:---:` (center), or `---:` (right) in the separator row:
|
|
68
68
|
|
|
69
69
|
```markdown
|
|
70
|
-
| Left
|
|
71
|
-
|
|
|
72
|
-
| A
|
|
70
|
+
| Left | Center | Right |
|
|
71
|
+
| :--- | :----: | ----: |
|
|
72
|
+
| A | B | C |
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
The `tableGridPlugin` popover includes alignment buttons (Left / Center / Right) that set the alignment for all columns.
|
|
@@ -78,24 +78,24 @@ The `tableGridPlugin` popover includes alignment buttons (Left / Center / Right)
|
|
|
78
78
|
|
|
79
79
|
Four style presets are available via the `<!-- mz-table: style=<preset> -->` annotation:
|
|
80
80
|
|
|
81
|
-
| Preset | Description
|
|
82
|
-
| --------- |
|
|
83
|
-
| `default` | Standard table styling — no extra classes.
|
|
84
|
-
| `striped` | Alternating row backgrounds for readability.
|
|
85
|
-
| `rainbow` | Cycles through six pastel colours per row.
|
|
86
|
-
| `minimal` | Light borders with a clean, reduced-chrome appearance.
|
|
81
|
+
| Preset | Description |
|
|
82
|
+
| --------- | ------------------------------------------------------ |
|
|
83
|
+
| `default` | Standard table styling — no extra classes. |
|
|
84
|
+
| `striped` | Alternating row backgrounds for readability. |
|
|
85
|
+
| `rainbow` | Cycles through six pastel colours per row. |
|
|
86
|
+
| `minimal` | Light borders with a clean, reduced-chrome appearance. |
|
|
87
87
|
|
|
88
88
|
### Border Styles
|
|
89
89
|
|
|
90
90
|
Border styles are set via the `border=<style>` annotation parameter:
|
|
91
91
|
|
|
92
|
-
| Style | Description
|
|
93
|
-
| -------- |
|
|
94
|
-
| `solid` | Standard solid borders (default).
|
|
95
|
-
| `dashed` | Dashed cell borders.
|
|
96
|
-
| `dotted` | Dotted cell borders.
|
|
97
|
-
| `double` | Double-line cell borders.
|
|
98
|
-
| `none` | No visible borders.
|
|
92
|
+
| Style | Description |
|
|
93
|
+
| -------- | --------------------------------- |
|
|
94
|
+
| `solid` | Standard solid borders (default). |
|
|
95
|
+
| `dashed` | Dashed cell borders. |
|
|
96
|
+
| `dotted` | Dotted cell borders. |
|
|
97
|
+
| `double` | Double-line cell borders. |
|
|
98
|
+
| `none` | No visible borders. |
|
|
99
99
|
|
|
100
100
|
### Annotation Syntax
|
|
101
101
|
|
|
@@ -103,10 +103,11 @@ Place a hidden HTML comment immediately before the table to apply style and bord
|
|
|
103
103
|
|
|
104
104
|
```markdown
|
|
105
105
|
<!-- mz-table: style=rainbow border=dashed -->
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
106
|
+
|
|
107
|
+
| Name | Score |
|
|
108
|
+
| ----- | ----- |
|
|
109
|
+
| Alice | 95 |
|
|
110
|
+
| Bob | 87 |
|
|
110
111
|
```
|
|
111
112
|
|
|
112
113
|
The comment is invisible to standard markdown renderers and only parsed by Marzipan.
|
|
@@ -126,15 +127,15 @@ Preferences are persisted to `localStorage` (key `marzipan.table.prefs`) so they
|
|
|
126
127
|
The `buildTableMarkdown()` helper (exported from `@pinkpixel/marzipan/plugins/utils/table`) now accepts a `TableBuildOptions` object:
|
|
127
128
|
|
|
128
129
|
```ts
|
|
129
|
-
import { buildTableMarkdown } from
|
|
130
|
-
import type { TableBuildOptions } from
|
|
130
|
+
import { buildTableMarkdown } from "@pinkpixel/marzipan";
|
|
131
|
+
import type { TableBuildOptions } from "@pinkpixel/marzipan";
|
|
131
132
|
|
|
132
133
|
const md = buildTableMarkdown({
|
|
133
134
|
rows: 3,
|
|
134
135
|
cols: 4,
|
|
135
|
-
alignment: [
|
|
136
|
-
style:
|
|
137
|
-
borderStyle:
|
|
136
|
+
alignment: ["left", "center", "right", "left"],
|
|
137
|
+
style: "striped",
|
|
138
|
+
borderStyle: "dashed",
|
|
138
139
|
});
|
|
139
140
|
```
|
|
140
141
|
|