@fusion.dev/helix-docs 0.243.0 → 0.244.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.
- package/content/coding-agents.mdx +3 -1
- package/content/metrics.mdx +278 -278
- package/content/using-helix-with-an-agent.mdx +1 -1
- package/dist/reference.d.ts +9 -2
- package/dist/reference.js +5 -1
- package/dist/sources.generated.js +282 -280
- package/package.json +12 -12
|
@@ -75,7 +75,7 @@ import '@fusion.dev/helix/option'
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Without the second line, the options are unknown elements and the Select offers
|
|
78
|
-
nothing. Each family's
|
|
78
|
+
nothing. Each family's Import block and each example list the lines to import.
|
|
79
79
|
Copy them with the markup.
|
|
80
80
|
|
|
81
81
|
### 2. Blocking a change without `preventDefault()`
|
package/dist/reference.d.ts
CHANGED
|
@@ -134,13 +134,20 @@ export interface ReferenceOptions {
|
|
|
134
134
|
* a reader scans the first line and `title` is what they want there.
|
|
135
135
|
*/
|
|
136
136
|
frontmatter?: Array<[string, string]>;
|
|
137
|
+
/**
|
|
138
|
+
* Each family's guidelines, keyed by family slug: the lines under a
|
|
139
|
+
* Guidelines heading, printed after the Import block, where the family page
|
|
140
|
+
* puts them. A line that opens with `#` is a heading one level below
|
|
141
|
+
* Guidelines, whatever depth the family's own headings are at.
|
|
142
|
+
*/
|
|
143
|
+
guidelines?: Record<string, string[]>;
|
|
137
144
|
/** Prose under the heading, already wrapped. Omitted where absent. */
|
|
138
145
|
lede?: string[];
|
|
139
146
|
/** Top-level heading. */
|
|
140
147
|
title?: string;
|
|
141
148
|
/**
|
|
142
|
-
* The import block for each family, keyed by family slug, printed under
|
|
143
|
-
*
|
|
149
|
+
* The import block for each family, keyed by family slug, printed under an
|
|
150
|
+
* Import heading before the first element. The catalog's `usage` is it.
|
|
144
151
|
*/
|
|
145
152
|
usage?: Record<string, string[]>;
|
|
146
153
|
}
|
package/dist/reference.js
CHANGED
|
@@ -132,7 +132,11 @@ export const reference = (manifest, options = {}) => {
|
|
|
132
132
|
}
|
|
133
133
|
const usage = options.usage?.[family] ?? [];
|
|
134
134
|
if (usage.length > 0) {
|
|
135
|
-
lines.push(`${'#'.repeat(depth)}
|
|
135
|
+
lines.push(`${'#'.repeat(depth)} Import`, '', '```js', ...usage, '```', '');
|
|
136
|
+
}
|
|
137
|
+
const guidelines = options.guidelines?.[family] ?? [];
|
|
138
|
+
if (guidelines.length > 0) {
|
|
139
|
+
lines.push(`${'#'.repeat(depth)} Guidelines`, '', ...guidelines.map((line) => (line.startsWith('#') ? `${'#'.repeat(depth)}${line}` : line)));
|
|
136
140
|
}
|
|
137
141
|
const status = parts.find((entry) => entry.part === 'root')?.declaration.helix?.status;
|
|
138
142
|
for (const { declaration, part } of parts) {
|