@fusion.dev/helix-docs 0.107.0 → 0.108.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/content/maps.mdx +15 -5
- package/content/metrics.mdx +1 -1
- package/content/recipes.mdx +34 -8
- package/dist/sources.generated.js +49 -13
- package/package.json +3 -3
package/content/maps.mdx
CHANGED
|
@@ -40,7 +40,10 @@ import '@fusion.dev/helix'
|
|
|
40
40
|
import 'maplibre-gl/dist/maplibre-gl.css'
|
|
41
41
|
import { colorsReady, connectMap } from '@fusion.dev/helix-map'
|
|
42
42
|
import { followTheme, mapLibreDriver, mapLibreStyle } from '@fusion.dev/helix-map/maplibre'
|
|
43
|
-
import maplibregl from 'maplibre-gl'
|
|
43
|
+
import * as maplibregl from 'maplibre-gl'
|
|
44
|
+
|
|
45
|
+
// MapLibre 6 runs its worker from a file of its own. Point it there once.
|
|
46
|
+
maplibregl.setWorkerUrl('/maplibre/maplibre-gl-worker.mjs')
|
|
44
47
|
|
|
45
48
|
const frame = document.querySelector('helix-map')
|
|
46
49
|
const style = (colors) => mapLibreStyle(colors)
|
|
@@ -68,10 +71,17 @@ followTheme(map, frame, style)
|
|
|
68
71
|
- `connection.fit()` frames every place on the map.
|
|
69
72
|
- `connection.disconnect()` puts back everything `connectMap` changed.
|
|
70
73
|
|
|
71
|
-
Use `mapLibreDriver(map)` for MapLibre GL JS 5 and `leafletDriver(map, L)`
|
|
72
|
-
Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
|
|
73
|
-
you already have. Leaflet draws routes, areas, and points only when you
|
|
74
|
-
`L`.
|
|
74
|
+
Use `mapLibreDriver(map)` for MapLibre GL JS 5 or 6 and `leafletDriver(map, L)`
|
|
75
|
+
for Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
|
|
76
|
+
version you already have. Leaflet draws routes, areas, and points only when you
|
|
77
|
+
pass it `L`.
|
|
78
|
+
|
|
79
|
+
MapLibre 6 ships as modules and runs its worker from its own file,
|
|
80
|
+
`maplibre-gl-worker.mjs`, which imports `maplibre-gl-shared.mjs` beside it.
|
|
81
|
+
Serve both from one folder and call `setWorkerUrl` with the worker's address
|
|
82
|
+
before you create a map, as MapLibre's installation guide shows for your
|
|
83
|
+
bundler. In Next.js, copy both files into `public/` at build time. MapLibre 6
|
|
84
|
+
fixes a sanitizing flaw in earlier versions, so use 6.4.1 or later.
|
|
75
85
|
|
|
76
86
|
## Style the map with your theme
|
|
77
87
|
|
package/content/metrics.mdx
CHANGED
|
@@ -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,
|
|
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
|
|
package/content/recipes.mdx
CHANGED
|
@@ -112,14 +112,40 @@ In prose:
|
|
|
112
112
|
|
|
113
113
|
See [Typography](./typography).
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- **Fenced code**
|
|
119
|
-
A `<pre>` has no label or copy button.
|
|
120
|
-
- **Alerts** such as `> [!WARNING]`
|
|
121
|
-
tone. `NOTE`
|
|
122
|
-
`
|
|
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
|
|
|
@@ -2315,7 +2315,10 @@ import '@fusion.dev/helix'
|
|
|
2315
2315
|
import 'maplibre-gl/dist/maplibre-gl.css'
|
|
2316
2316
|
import { colorsReady, connectMap } from '@fusion.dev/helix-map'
|
|
2317
2317
|
import { followTheme, mapLibreDriver, mapLibreStyle } from '@fusion.dev/helix-map/maplibre'
|
|
2318
|
-
import maplibregl from 'maplibre-gl'
|
|
2318
|
+
import * as maplibregl from 'maplibre-gl'
|
|
2319
|
+
|
|
2320
|
+
// MapLibre 6 runs its worker from a file of its own. Point it there once.
|
|
2321
|
+
maplibregl.setWorkerUrl('/maplibre/maplibre-gl-worker.mjs')
|
|
2319
2322
|
|
|
2320
2323
|
const frame = document.querySelector('helix-map')
|
|
2321
2324
|
const style = (colors) => mapLibreStyle(colors)
|
|
@@ -2343,10 +2346,17 @@ followTheme(map, frame, style)
|
|
|
2343
2346
|
- \`connection.fit()\` frames every place on the map.
|
|
2344
2347
|
- \`connection.disconnect()\` puts back everything \`connectMap\` changed.
|
|
2345
2348
|
|
|
2346
|
-
Use \`mapLibreDriver(map)\` for MapLibre GL JS 5 and \`leafletDriver(map, L)\`
|
|
2347
|
-
Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
|
|
2348
|
-
you already have. Leaflet draws routes, areas, and points only when you
|
|
2349
|
-
\`L\`.
|
|
2349
|
+
Use \`mapLibreDriver(map)\` for MapLibre GL JS 5 or 6 and \`leafletDriver(map, L)\`
|
|
2350
|
+
for Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
|
|
2351
|
+
version you already have. Leaflet draws routes, areas, and points only when you
|
|
2352
|
+
pass it \`L\`.
|
|
2353
|
+
|
|
2354
|
+
MapLibre 6 ships as modules and runs its worker from its own file,
|
|
2355
|
+
\`maplibre-gl-worker.mjs\`, which imports \`maplibre-gl-shared.mjs\` beside it.
|
|
2356
|
+
Serve both from one folder and call \`setWorkerUrl\` with the worker's address
|
|
2357
|
+
before you create a map, as MapLibre's installation guide shows for your
|
|
2358
|
+
bundler. In Next.js, copy both files into \`public/\` at build time. MapLibre 6
|
|
2359
|
+
fixes a sanitizing flaw in earlier versions, so use 6.4.1 or later.
|
|
2350
2360
|
|
|
2351
2361
|
## Style the map with your theme
|
|
2352
2362
|
|
|
@@ -3146,7 +3156,7 @@ stripped column shows the bytes we removed.
|
|
|
3146
3156
|
| \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
|
|
3147
3157
|
| \`@fusion.dev/helix-styles\` | 102,108 | 6 | 0 | none |
|
|
3148
3158
|
| \`@fusion.dev/helix-theme\` | 465,413 | 8 | 4,703 | none |
|
|
3149
|
-
| \`@fusion.dev/helix\` | 14,
|
|
3159
|
+
| \`@fusion.dev/helix\` | 14,185,818 | 870 | 368,333 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
|
|
3150
3160
|
|
|
3151
3161
|
## Not measured yet
|
|
3152
3162
|
|
|
@@ -3894,14 +3904,40 @@ In prose:
|
|
|
3894
3904
|
|
|
3895
3905
|
See [Typography](./typography).
|
|
3896
3906
|
|
|
3897
|
-
|
|
3898
|
-
|
|
3907
|
+
Two Markdown constructs need components, because HTML alone cannot hold what
|
|
3908
|
+
they need:
|
|
3909
|
+
|
|
3910
|
+
- **Fenced code** becomes \`helix-code-block\`, with the fence's language as its
|
|
3911
|
+
\`label\`. A \`<pre>\` has no label or copy button.
|
|
3912
|
+
- **Alerts** such as \`> [!WARNING]\` become \`helix-callout\`. A \`<blockquote>\` has no
|
|
3913
|
+
tone. \`NOTE\` becomes \`tone="info"\`, \`TIP\` becomes \`success\`, \`WARNING\` becomes
|
|
3914
|
+
\`warning\`, and \`CAUTION\` becomes \`danger\`. \`IMPORTANT\` has no tone. Each
|
|
3915
|
+
callout is headed by its kind, as GitHub shows it.
|
|
3916
|
+
|
|
3917
|
+
The \`rehype\` plugin from \`@fusion.dev/helix/rehype\` makes both changes in the
|
|
3918
|
+
tree your Markdown library has already built. It parses nothing, so your
|
|
3919
|
+
library, its dialect, and your sanitizing stay yours. Add it to any pipeline
|
|
3920
|
+
that reaches rehype, such as \`remark\` with \`remark-rehype\`, \`react-markdown\`, or
|
|
3921
|
+
MDX:
|
|
3922
|
+
|
|
3923
|
+
\`\`\`js
|
|
3924
|
+
import rehypeHelix from '@fusion.dev/helix/rehype'
|
|
3925
|
+
|
|
3926
|
+
const html = await unified()
|
|
3927
|
+
.use(remarkParse)
|
|
3928
|
+
.use(remarkRehype)
|
|
3929
|
+
.use(rehypeHelix)
|
|
3930
|
+
.use(rehypeStringify)
|
|
3931
|
+
.process(markdown)
|
|
3932
|
+
\`\`\`
|
|
3933
|
+
|
|
3934
|
+
Code that a highlighter colored before the plugin ran keeps its colors. Pass
|
|
3935
|
+
\`fences: false\` if your page draws its own code blocks, \`alerts: false\` to keep
|
|
3936
|
+
alerts as quotes, and \`headings\` to name each kind in your page's language.
|
|
3899
3937
|
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
tone. \`NOTE\` and \`IMPORTANT\` become \`tone="info"\`, \`TIP\` becomes \`success\`,
|
|
3904
|
-
\`WARNING\` becomes \`warning\`, and \`CAUTION\` becomes \`danger\`.
|
|
3938
|
+
> [!NOTE]
|
|
3939
|
+
> The plugin changes only these two constructs. If the Markdown comes from your
|
|
3940
|
+
> users, sanitize it in your pipeline before the plugin runs.
|
|
3905
3941
|
|
|
3906
3942
|
Prose spaces each component the same as the element it replaces.
|
|
3907
3943
|
|
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.
|
|
4
|
+
"version": "0.108.1",
|
|
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.
|
|
40
|
-
"@fusion.dev/helix-testing": "0.
|
|
39
|
+
"@fusion.dev/helix-cem": "0.108.1",
|
|
40
|
+
"@fusion.dev/helix-testing": "0.108.1",
|
|
41
41
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
42
42
|
"lit": "^3.2.1",
|
|
43
43
|
"playwright": "^1.62.1"
|