Skip to content

Commit 19cc939

Browse files
committed
rehype-vizdom v0.3.1
1 parent cc6c72e commit 19cc939

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

packages/docs/src/content/docs/diagrams/vizdom.mdx

-1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,5 @@ You probaly want to use [`inline`](/start-here/strategy/#inline) strategy and im
189189

190190
## Issues
191191

192-
- [ ] [HTML classes are not supported](https://github.com/vizdom-dev/vizdom/issues/11)
193192
- [ ] [Text is transformed to path, so <kbd>Cmd</kbd> + <kbd>F</kbd> doesn't work](https://github.com/vizdom-dev/vizdom/issues/12)
194193
- [ ] Doesn't support some unicode chars, like `label="∅"`

packages/docs/src/content/docs/start-here/styling-with-css.mdx

+16-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ Works only with strategy [`inline`](/start-here/strategy/#inline).
3434
}
3535
```
3636

37-
Graphviz allows to expose HTML classes, that can be used for further styling:
37+
Graphviz and Vizdom allow to expose HTML classes, that can be used for further styling:
3838

3939
<Tabs>
40-
<TabItem label="Diagram">
40+
<TabItem label="Grapviz">
4141
```dot strategy=inline
4242
digraph g {
4343
bgcolor="transparent";
@@ -46,6 +46,17 @@ digraph g {
4646
a -> b -> c -> d -> e -> f
4747
a[class="style-me"]
4848
}
49+
```
50+
</TabItem>
51+
<TabItem label="Vizdom">
52+
```vizdom strategy=inline
53+
digraph g {
54+
bgcolor="transparent";
55+
rankdir=LR;
56+
node [shape=rect];
57+
a -> b -> c -> d -> e -> f
58+
a[class="style-me"]
59+
}
4960
```
5061
</TabItem>
5162
<TabItem label="Markdown">
@@ -63,8 +74,9 @@ digraph g {
6374
.graphviz .style-me path {
6475
fill: lightblue;
6576
}
77+
.vizdom .style-me :first-child {
78+
fill: lightblue;
79+
}
6680
```
6781
</TabItem>
6882
</Tabs>
69-
70-
**⚠️ Note**: this doesn't work for Vizdom.

packages/docs/src/styles/custom.css

+3
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,6 @@ html[data-theme="dark"] .beoe-light {
130130
.graphviz .style-me path {
131131
fill: lightblue;
132132
}
133+
.vizdom .style-me :first-child {
134+
fill: lightblue;
135+
}

packages/rehype-vizdom/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@beoe/rehype-vizdom",
33
"type": "module",
4-
"version": "0.3.0",
4+
"version": "0.3.1",
55
"description": "rehype vizdom plugin",
66
"keywords": [
77
"rehype",
@@ -34,7 +34,7 @@
3434
},
3535
"dependencies": {
3636
"@beoe/rehype-code-hook-img": "workspace:*",
37-
"@vizdom/vizdom-ts-node": "^0.1.17"
37+
"@vizdom/vizdom-ts-node": "^0.1.18"
3838
},
3939
"devDependencies": {
4040
"@types/hast": "^3.0.4",

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)