@fusion.dev/helix-docs 0.107.0 → 0.108.0

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.
@@ -403,7 +403,7 @@ stripped column shows the bytes we removed.
403
403
  | `@fusion.dev/helix-icons` | 150,162 | 21 | 50,346 | `svgo` |
404
404
  | `@fusion.dev/helix-styles` | 102,108 | 6 | 0 | none |
405
405
  | `@fusion.dev/helix-theme` | 465,413 | 8 | 4,703 | none |
406
- | `@fusion.dev/helix` | 14,179,532 | 868 | 362,883 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
406
+ | `@fusion.dev/helix` | 14,185,818 | 870 | 368,333 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
407
407
 
408
408
  ## Not measured yet
409
409
 
@@ -112,14 +112,40 @@ In prose:
112
112
 
113
113
  See [Typography](./typography).
114
114
 
115
- If you control the Markdown renderer, map two elements to components, because
116
- HTML alone cannot hold what they need:
117
-
118
- - **Fenced code** to `helix-code-block`, with the fence's language as its `label`.
119
- A `<pre>` has no label or copy button.
120
- - **Alerts** such as `> [!WARNING]` to `helix-callout`. A `<blockquote>` has no
121
- tone. `NOTE` and `IMPORTANT` become `tone="info"`, `TIP` becomes `success`,
122
- `WARNING` becomes `warning`, and `CAUTION` becomes `danger`.
115
+ Two Markdown constructs need components, because HTML alone cannot hold what
116
+ they need:
117
+
118
+ - **Fenced code** becomes `helix-code-block`, with the fence's language as its
119
+ `label`. A `<pre>` has no label or copy button.
120
+ - **Alerts** such as `> [!WARNING]` become `helix-callout`. A `<blockquote>` has no
121
+ tone. `NOTE` becomes `tone="info"`, `TIP` becomes `success`, `WARNING` becomes
122
+ `warning`, and `CAUTION` becomes `danger`. `IMPORTANT` has no tone. Each
123
+ callout is headed by its kind, as GitHub shows it.
124
+
125
+ The `rehype` plugin from `@fusion.dev/helix/rehype` makes both changes in the
126
+ tree your Markdown library has already built. It parses nothing, so your
127
+ library, its dialect, and your sanitizing stay yours. Add it to any pipeline
128
+ that reaches rehype, such as `remark` with `remark-rehype`, `react-markdown`, or
129
+ MDX:
130
+
131
+ ```js
132
+ import rehypeHelix from '@fusion.dev/helix/rehype'
133
+
134
+ const html = await unified()
135
+ .use(remarkParse)
136
+ .use(remarkRehype)
137
+ .use(rehypeHelix)
138
+ .use(rehypeStringify)
139
+ .process(markdown)
140
+ ```
141
+
142
+ Code that a highlighter colored before the plugin ran keeps its colors. Pass
143
+ `fences: false` if your page draws its own code blocks, `alerts: false` to keep
144
+ alerts as quotes, and `headings` to name each kind in your page's language.
145
+
146
+ > [!NOTE]
147
+ > The plugin changes only these two constructs. If the Markdown comes from your
148
+ > users, sanitize it in your pipeline before the plugin runs.
123
149
 
124
150
  Prose spaces each component the same as the element it replaces.
125
151
 
@@ -3146,7 +3146,7 @@ stripped column shows the bytes we removed.
3146
3146
  | \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
3147
3147
  | \`@fusion.dev/helix-styles\` | 102,108 | 6 | 0 | none |
3148
3148
  | \`@fusion.dev/helix-theme\` | 465,413 | 8 | 4,703 | none |
3149
- | \`@fusion.dev/helix\` | 14,179,532 | 868 | 362,883 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3149
+ | \`@fusion.dev/helix\` | 14,185,818 | 870 | 368,333 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3150
3150
 
3151
3151
  ## Not measured yet
3152
3152
 
@@ -3894,14 +3894,40 @@ In prose:
3894
3894
 
3895
3895
  See [Typography](./typography).
3896
3896
 
3897
- If you control the Markdown renderer, map two elements to components, because
3898
- HTML alone cannot hold what they need:
3897
+ Two Markdown constructs need components, because HTML alone cannot hold what
3898
+ they need:
3899
3899
 
3900
- - **Fenced code** to \`helix-code-block\`, with the fence's language as its \`label\`.
3901
- A \`<pre>\` has no label or copy button.
3902
- - **Alerts** such as \`> [!WARNING]\` to \`helix-callout\`. A \`<blockquote>\` has no
3903
- tone. \`NOTE\` and \`IMPORTANT\` become \`tone="info"\`, \`TIP\` becomes \`success\`,
3904
- \`WARNING\` becomes \`warning\`, and \`CAUTION\` becomes \`danger\`.
3900
+ - **Fenced code** becomes \`helix-code-block\`, with the fence's language as its
3901
+ \`label\`. A \`<pre>\` has no label or copy button.
3902
+ - **Alerts** such as \`> [!WARNING]\` become \`helix-callout\`. A \`<blockquote>\` has no
3903
+ tone. \`NOTE\` becomes \`tone="info"\`, \`TIP\` becomes \`success\`, \`WARNING\` becomes
3904
+ \`warning\`, and \`CAUTION\` becomes \`danger\`. \`IMPORTANT\` has no tone. Each
3905
+ callout is headed by its kind, as GitHub shows it.
3906
+
3907
+ The \`rehype\` plugin from \`@fusion.dev/helix/rehype\` makes both changes in the
3908
+ tree your Markdown library has already built. It parses nothing, so your
3909
+ library, its dialect, and your sanitizing stay yours. Add it to any pipeline
3910
+ that reaches rehype, such as \`remark\` with \`remark-rehype\`, \`react-markdown\`, or
3911
+ MDX:
3912
+
3913
+ \`\`\`js
3914
+ import rehypeHelix from '@fusion.dev/helix/rehype'
3915
+
3916
+ const html = await unified()
3917
+ .use(remarkParse)
3918
+ .use(remarkRehype)
3919
+ .use(rehypeHelix)
3920
+ .use(rehypeStringify)
3921
+ .process(markdown)
3922
+ \`\`\`
3923
+
3924
+ Code that a highlighter colored before the plugin ran keeps its colors. Pass
3925
+ \`fences: false\` if your page draws its own code blocks, \`alerts: false\` to keep
3926
+ alerts as quotes, and \`headings\` to name each kind in your page's language.
3927
+
3928
+ > [!NOTE]
3929
+ > The plugin changes only these two constructs. If the Markdown comes from your
3930
+ > users, sanitize it in your pipeline before the plugin runs.
3905
3931
 
3906
3932
  Prose spaces each component the same as the element it replaces.
3907
3933
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-docs",
3
3
  "description": "Versioned documentation content and registry for Helix.",
4
- "version": "0.107.0",
4
+ "version": "0.108.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "bugs": "https://github.com/project-fusion/fusion/issues",
38
38
  "devDependencies": {
39
- "@fusion.dev/helix-cem": "0.107.0",
40
- "@fusion.dev/helix-testing": "0.107.0",
39
+ "@fusion.dev/helix-cem": "0.108.0",
40
+ "@fusion.dev/helix-testing": "0.108.0",
41
41
  "@fusion.dev/scripts": "0.0.0-dev",
42
42
  "lit": "^3.2.1",
43
43
  "playwright": "^1.62.1"