@wireweave/markdown-plugin 1.2.1-beta.0 → 1.2.1-beta.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 +12 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,7 +32,8 @@ import { markdownItWireframe } from '@wireweave/markdown-plugin';
|
|
|
32
32
|
|
|
33
33
|
const md = new MarkdownIt();
|
|
34
34
|
md.use(markdownItWireframe, {
|
|
35
|
-
format: 'svg-img', // or 'html', 'svg'
|
|
35
|
+
format: 'svg-img', // or 'html', 'html-preview', 'svg'
|
|
36
|
+
theme: 'light', // or 'dark'
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
const html = md.render(`
|
|
@@ -59,6 +60,7 @@ import { markedWireframe } from '@wireweave/markdown-plugin';
|
|
|
59
60
|
|
|
60
61
|
marked.use(markedWireframe({
|
|
61
62
|
format: 'svg-img',
|
|
63
|
+
theme: 'light',
|
|
62
64
|
}));
|
|
63
65
|
|
|
64
66
|
const html = marked.parse(`
|
|
@@ -79,6 +81,7 @@ import { remarkableWireframe } from '@wireweave/markdown-plugin';
|
|
|
79
81
|
const md = new Remarkable();
|
|
80
82
|
remarkableWireframe(md, {
|
|
81
83
|
format: 'svg-img',
|
|
84
|
+
theme: 'light',
|
|
82
85
|
});
|
|
83
86
|
|
|
84
87
|
const html = md.render(`
|
|
@@ -94,15 +97,19 @@ All plugins accept the same options:
|
|
|
94
97
|
|
|
95
98
|
| Option | Type | Default | Description |
|
|
96
99
|
|--------|------|---------|-------------|
|
|
97
|
-
| `format` | `'html' \| 'svg' \| 'svg-img'` | `'svg-img'` | Output format |
|
|
100
|
+
| `format` | `'html' \| 'html-preview' \| 'svg' \| 'svg-img'` | `'svg-img'` | Output format |
|
|
101
|
+
| `theme` | `'light' \| 'dark'` | `'light'` | Theme for rendering |
|
|
98
102
|
| `containerClass` | `string` | `'wireframe-container'` | CSS class for wrapper div |
|
|
99
103
|
| `errorHandling` | `'code' \| 'error' \| 'both'` | `'both'` | How to handle parse errors |
|
|
104
|
+
| `containerWidth` | `number` | `0` | Container width for preview scaling (0 = no scaling) |
|
|
105
|
+
| `maxScale` | `number` | `1` | Maximum scale factor (prevents upscaling beyond this value) |
|
|
100
106
|
|
|
101
107
|
### Output Formats
|
|
102
108
|
|
|
103
109
|
- **`svg-img`** (default): Base64-encoded SVG in an `<img>` tag. Best for compatibility.
|
|
104
110
|
- **`svg`**: Inline SVG. Allows CSS styling but may conflict with page styles.
|
|
105
111
|
- **`html`**: Full HTML/CSS rendering. Interactive but may conflict with page styles.
|
|
112
|
+
- **`html-preview`**: HTML with preview container that supports scaling to fit container width.
|
|
106
113
|
|
|
107
114
|
### Error Handling
|
|
108
115
|
|
|
@@ -120,8 +127,10 @@ import { renderWireframe } from '@wireweave/markdown-plugin';
|
|
|
120
127
|
const html = renderWireframe(`
|
|
121
128
|
page { button "Click" primary }
|
|
122
129
|
`, {
|
|
123
|
-
format: '
|
|
130
|
+
format: 'html-preview',
|
|
131
|
+
theme: 'light',
|
|
124
132
|
containerClass: 'my-wireframe',
|
|
133
|
+
containerWidth: 600, // Scale to fit 600px width
|
|
125
134
|
});
|
|
126
135
|
```
|
|
127
136
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wireweave/markdown-plugin",
|
|
3
|
-
"version": "1.2.1-beta.
|
|
3
|
+
"version": "1.2.1-beta.1",
|
|
4
4
|
"description": "Markdown plugins for wireweave",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@wireweave/core": "1.1
|
|
59
|
+
"@wireweave/core": "^1.4.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@release-it/conventional-changelog": "^10.0.4",
|