hd-garden 0.8.0 → 0.8.2
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/.agents/skills/garden-ui/SKILL.md +2 -2
- package/.env.en.example +67 -0
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/app/a2/[slug]/page.tsx +4 -3
- package/app/a2/page.tsx +4 -3
- package/app/about/page.tsx +8 -9
- package/app/admin/page.tsx +7 -6
- package/app/admin/preview/[...path]/page.tsx +2 -1
- package/app/admin/ui/blocks/page.tsx +2 -1
- package/app/admin/ui/catalog/page.tsx +2 -1
- package/app/admin/ui/evals/page.tsx +2 -1
- package/app/admin/ui/page.tsx +2 -1
- package/app/blog/[...path]/page.tsx +7 -6
- package/app/blog/page.tsx +4 -2
- package/app/columns/[column]/[...path]/page.tsx +8 -7
- package/app/columns/page.tsx +12 -8
- package/app/components/AdminUiShell.tsx +4 -3
- package/app/components/ArticleMeasure.tsx +6 -3
- package/app/components/ArticleReferences.tsx +4 -1
- package/app/components/ArticleTags.tsx +3 -2
- package/app/components/BlogArchive.tsx +20 -16
- package/app/components/Comments.tsx +16 -10
- package/app/components/ContentEmptyState.tsx +29 -28
- package/app/components/ExternalEmbed.tsx +15 -14
- package/app/components/GardenContentGuide.tsx +10 -2
- package/app/components/GardenDocsNav.tsx +4 -2
- package/app/components/GiscusComments.tsx +2 -1
- package/app/components/GithubLiveOverview.tsx +10 -8
- package/app/components/GithubProfile.tsx +31 -21
- package/app/components/HandbookLangSwitch.tsx +8 -4
- package/app/components/HandbookView.tsx +92 -9
- package/app/components/MarkdownArticle.tsx +31 -7
- package/app/components/MermaidDiagram.tsx +4 -3
- package/app/components/SiteChrome.tsx +3 -3
- package/app/components/SiteFooter.tsx +1 -1
- package/app/components/SiteHeader.tsx +13 -4
- package/app/components/ThoughtCard.tsx +16 -14
- package/app/components/UiBlock.tsx +3 -2
- package/app/components/Webmentions.tsx +11 -11
- package/app/components/WidgetChart.tsx +8 -6
- package/app/components/garden/FilePreview.tsx +2 -2
- package/app/components/garden/GardenBlock.tsx +7 -0
- package/app/components/garden/GardenFile.tsx +2 -2
- package/app/components/garden/RefDemo.tsx +62 -0
- package/app/components/garden/blocks.tsx +56 -8
- package/app/components/garden/patterns.tsx +497 -0
- package/app/garden/[...slug]/page.tsx +3 -2
- package/app/garden/en/page.tsx +7 -7
- package/app/garden/page.tsx +3 -2
- package/app/globals.css +49 -1
- package/app/lib/a2-meta.ts +26 -3
- package/app/lib/content.ts +2 -2
- package/app/lib/garden-docs-meta.ts +24 -0
- package/app/lib/github-id.mjs +8 -0
- package/app/lib/handbook-switch.mjs +12 -0
- package/app/lib/i18n.ts +401 -2
- package/app/lib/rehype-field-tables.mjs +47 -0
- package/app/lib/remark-a2.mjs +18 -8
- package/app/lib/remark-link-card.mjs +22 -0
- package/app/lib/remark-ref-demos.mjs +42 -0
- package/app/lib/tag-filter.ts +9 -2
- package/app/not-found.tsx +32 -4
- package/app/page.tsx +17 -14
- package/app/rss.xml/route.ts +2 -1
- package/app/styles/a2.css +338 -0
- package/app/styles/shell.css +15 -2
- package/app/tags/page.tsx +7 -5
- package/app/thoughts/[slug]/page.tsx +2 -1
- package/app/thoughts/page/[n]/page.tsx +1 -1
- package/app/thoughts/page.tsx +2 -1
- package/app/ui-parity/page.tsx +38 -22
- package/bin/garden.mjs +129 -19
- package/docs/handbook/ai-writing.md +2 -2
- package/docs/handbook/assets/reading-layout-en.svg +26 -0
- package/docs/handbook/components/card.md +43 -22
- package/docs/handbook/components/chart.md +10 -26
- package/docs/handbook/components/choice.md +42 -0
- package/docs/handbook/components/compare.md +32 -17
- package/docs/handbook/components/figure.md +33 -46
- package/docs/handbook/components/file.md +10 -15
- package/docs/handbook/components/html.md +10 -30
- package/docs/handbook/components/interactive.md +9 -35
- package/docs/handbook/components/list.md +65 -0
- package/docs/handbook/components/relations.md +95 -0
- package/docs/handbook/components/stat.md +10 -28
- package/docs/handbook/components/timeline.md +13 -28
- package/docs/handbook/components.md +210 -19
- package/docs/handbook/config.md +5 -3
- package/docs/handbook/deploy.md +1 -1
- package/docs/handbook/design.md +20 -12
- package/docs/handbook/en/ai-writing.md +2 -2
- package/docs/handbook/en/components/card.md +42 -21
- package/docs/handbook/en/components/chart.md +10 -26
- package/docs/handbook/en/components/choice.md +42 -0
- package/docs/handbook/en/components/compare.md +30 -15
- package/docs/handbook/en/components/figure.md +29 -42
- package/docs/handbook/en/components/file.md +9 -14
- package/docs/handbook/en/components/html.md +9 -29
- package/docs/handbook/en/components/interactive.md +8 -34
- package/docs/handbook/en/components/list.md +65 -0
- package/docs/handbook/en/components/relations.md +95 -0
- package/docs/handbook/en/components/stat.md +9 -27
- package/docs/handbook/en/components/timeline.md +9 -24
- package/docs/handbook/en/components.md +211 -19
- package/docs/handbook/en/config.md +32 -30
- package/docs/handbook/en/deploy.md +12 -12
- package/docs/handbook/en/design.md +19 -12
- package/docs/handbook/en/index.md +2 -2
- package/docs/handbook/en/reference/card.md +85 -0
- package/docs/handbook/en/reference/chart.md +68 -0
- package/docs/handbook/en/reference/choice.md +69 -0
- package/docs/handbook/en/reference/compare.md +59 -0
- package/docs/handbook/en/reference/figure.md +84 -0
- package/docs/handbook/en/reference/file/checklist.md +17 -0
- package/docs/handbook/en/reference/file.md +50 -0
- package/docs/handbook/en/reference/html.md +62 -0
- package/docs/handbook/en/reference/interactive.md +71 -0
- package/docs/handbook/en/reference/list.md +72 -0
- package/docs/handbook/en/reference/relations.md +113 -0
- package/docs/handbook/en/reference/stat.md +60 -0
- package/docs/handbook/en/reference/timeline.md +56 -0
- package/docs/handbook/en/reference.md +26 -0
- package/docs/handbook/en/start.md +2 -2
- package/docs/handbook/en/workflow.md +6 -5
- package/docs/handbook/en/writing.md +3 -2
- package/docs/handbook/index.md +1 -1
- package/docs/handbook/reference/card.md +85 -0
- package/docs/handbook/reference/chart.md +68 -0
- package/docs/handbook/reference/choice.md +69 -0
- package/docs/handbook/reference/compare.md +59 -0
- package/docs/handbook/reference/figure.md +84 -0
- package/docs/handbook/reference/file/checklist.md +17 -0
- package/docs/handbook/reference/file.md +50 -0
- package/docs/handbook/reference/html.md +62 -0
- package/docs/handbook/reference/interactive.md +71 -0
- package/docs/handbook/reference/list.md +72 -0
- package/docs/handbook/reference/relations.md +113 -0
- package/docs/handbook/reference/stat.md +60 -0
- package/docs/handbook/reference/timeline.md +56 -0
- package/docs/handbook/reference.md +26 -0
- package/docs/handbook/start.md +1 -1
- package/docs/handbook/workflow.md +6 -5
- package/docs/handbook/writing.md +3 -2
- package/next.config.ts +6 -0
- package/package.json +2 -1
- package/public/images/garden/ref-card-book.svg +1 -0
- package/public/images/garden/ref-card-lamp.svg +1 -0
- package/scripts/build-content.mjs +37 -16
- package/scripts/favicon-ico.mjs +9 -6
- package/scripts/file-preview.mjs +10 -7
- package/scripts/handbook-allowlist.mjs +18 -0
- package/scripts/handbook-facts.mjs +305 -11
- package/scripts/link-assets.mjs +7 -0
- package/scripts/new-post.mjs +18 -9
- package/scripts/prepare-pages-output.mjs +30 -18
- package/scripts/redirects.mjs +17 -6
- package/templates/garden-blocks.md +67 -0
- package/templates/garden-snippets.plist +61 -0
- package/templates/site/Makefile.en +45 -0
- package/templates/site/README.en.md +15 -0
- package/templates/site/site.config.en.yaml +55 -0
- package/templates/skills-en/garden-interactive-chart/SKILL.md +84 -0
- package/templates/skills-en/garden-interactive-chart/references/shell.html +49 -0
- package/templates/skills-en/garden-interactive-chart/references/style.md +61 -0
- package/templates/skills-en/garden-post-review/SKILL.md +63 -0
- package/templates/skills-en/garden-ui/SKILL.md +118 -0
- package/templates/workflows/pages.en.yml +195 -0
- package/templates/workflows/pages.yml +195 -0
- package/ui/garden/catalog.mjs +205 -4
- package/ui/garden/check.mjs +6 -0
- package/ui/garden/file-block.mjs +8 -7
- package/ui/garden/html-lang.mjs +73 -1
- package/ui/garden/markdown-links.mjs +7 -4
- package/ui/garden/parse.mjs +45 -0
- package/ui/garden/relations.mjs +252 -0
- package/ui/garden/search-index.mjs +6 -4
- package/ui/garden/source-icon.mjs +54 -0
- package/ui/parity-fixtures.mjs +77 -0
- package/ui/preview/dist/garden-ui.esm.js +41 -4
- package/ui/preview/dist/garden-ui.iife.js +41 -4
- package/ui/prompt/rules.md +28 -1
- package/ui/react/components/chart.tsx +1 -1
- package/ui/react/components/display.tsx +1 -1
- package/ui/react/lang.tsx +4 -0
- package/ui/react/parity.tsx +8 -6
- package/worker/index.ts +8 -2
|
@@ -7,23 +7,29 @@ order: 36
|
|
|
7
7
|
badge: figure
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "use `figure` to draw the static publishing flow where clicking each step highlights that box and shows what it does" inside a `garden` idea block, and the Agent generates the `garden figure` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden figure
|
|
13
11
|
caption: Click the buttons above to highlight each stage
|
|
14
12
|
svg: |
|
|
15
|
-
<svg viewBox="0 0
|
|
16
|
-
<rect data-p="sync" x="
|
|
17
|
-
<text data-p="sync" x="
|
|
18
|
-
<text data-p="sync" x="
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<text data-p="
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<text data-p="
|
|
26
|
-
<text data-p="
|
|
13
|
+
<svg viewBox="0 0 560 194" xmlns="http://www.w3.org/2000/svg" font-family="var(--sans)" style="max-width: 380px; margin-inline: auto">
|
|
14
|
+
<rect data-p="sync" x="2" y="4" width="180" height="186" rx="16" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="2.5"/>
|
|
15
|
+
<text data-p="sync" x="92" y="42" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">1. garden</text>
|
|
16
|
+
<text data-p="sync" x="92" y="72" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">sync</text>
|
|
17
|
+
<text data-p="sync" x="92" y="108" text-anchor="middle" font-size="24" fill="var(--muted)">Parse</text>
|
|
18
|
+
<text data-p="sync" x="92" y="137" text-anchor="middle" font-size="24" fill="var(--muted)">Markdown &</text>
|
|
19
|
+
<text data-p="sync" x="92" y="166" text-anchor="middle" font-size="24" fill="var(--muted)">image sizes</text>
|
|
20
|
+
<path d="M183.5 97 H188.5" stroke="var(--muted)" stroke-width="2.5"/>
|
|
21
|
+
<rect data-p="build" x="190" y="4" width="180" height="186" rx="16" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="2.5"/>
|
|
22
|
+
<text data-p="build" x="280" y="42" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">2. garden</text>
|
|
23
|
+
<text data-p="build" x="280" y="72" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">build</text>
|
|
24
|
+
<text data-p="build" x="280" y="108" text-anchor="middle" font-size="24" fill="var(--muted)">Build static</text>
|
|
25
|
+
<text data-p="build" x="280" y="137" text-anchor="middle" font-size="24" fill="var(--muted)">pages & index</text>
|
|
26
|
+
<path d="M371.5 97 H376.5" stroke="var(--muted)" stroke-width="2.5"/>
|
|
27
|
+
<rect data-p="validate" x="378" y="4" width="180" height="186" rx="16" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="2.5"/>
|
|
28
|
+
<text data-p="validate" x="468" y="42" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">3. pages:</text>
|
|
29
|
+
<text data-p="validate" x="468" y="72" text-anchor="middle" font-size="24" font-weight="600" fill="var(--ink)">validate</text>
|
|
30
|
+
<text data-p="validate" x="468" y="108" text-anchor="middle" font-size="24" fill="var(--muted)">Check</text>
|
|
31
|
+
<text data-p="validate" x="468" y="137" text-anchor="middle" font-size="24" fill="var(--muted)">index.html &</text>
|
|
32
|
+
<text data-p="validate" x="468" y="166" text-anchor="middle" font-size="24" fill="var(--muted)">files</text>
|
|
27
33
|
</svg>
|
|
28
34
|
parts:
|
|
29
35
|
- id: sync
|
|
@@ -37,36 +43,17 @@ parts:
|
|
|
37
43
|
text: Runs pages:validate to confirm `index.html` exists and no `.env`, source directories, `.map` or `.md` files, or symlinks are present.
|
|
38
44
|
```
|
|
39
45
|
|
|
46
|
+
- **When to use**: Walking through module boundaries or data flow where clicking each button highlights the matching part of the diagram and explains its role.
|
|
47
|
+
- **When to skip**: A static image or a `mermaid` diagram does not need interactive region highlighting.
|
|
48
|
+
|
|
49
|
+
You can tell the AI:
|
|
50
|
+
|
|
40
51
|
````markdown
|
|
41
|
-
```garden
|
|
42
|
-
|
|
43
|
-
svg: |
|
|
44
|
-
<svg viewBox="0 0 680 110" xmlns="http://www.w3.org/2000/svg" font-family="var(--sans)">
|
|
45
|
-
<rect data-p="sync" x="12" y="18" width="196" height="74" rx="10" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="1.5"/>
|
|
46
|
-
<text data-p="sync" x="110" y="50" text-anchor="middle" font-size="14" font-weight="600" fill="var(--ink)">1. garden sync</text>
|
|
47
|
-
<text data-p="sync" x="110" y="72" text-anchor="middle" font-size="12" fill="var(--muted)">Parse Markdown & image sizes</text>
|
|
48
|
-
<rect data-p="build" x="242" y="18" width="196" height="74" rx="10" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="1.5"/>
|
|
49
|
-
<rect data-p="validate" x="472" y="18" width="196" height="74" rx="10" fill="var(--card)" stroke="var(--rule-strong)" stroke-width="1.5"/>
|
|
50
|
-
</svg>
|
|
51
|
-
parts:
|
|
52
|
-
- id: sync
|
|
53
|
-
label: 1. Sync Content
|
|
54
|
-
text: Scans `content/` and `docs/handbook/`, copies sidecar assets, and generates `.garden/generated-content.ts`.
|
|
55
|
-
- id: build
|
|
56
|
-
label: 2. Build Pages
|
|
57
|
-
text: Prerenders all routes with `STATIC_EXPORT=1` and outputs RSS, sitemap, and full-text search indexes.
|
|
58
|
-
- id: validate
|
|
59
|
-
label: 3. Validate Export
|
|
60
|
-
text: Runs pages:validate to confirm `index.html` exists and no `.env`, source directories, `.map` or `.md` files, or symlinks are present.
|
|
52
|
+
```garden
|
|
53
|
+
Draw a diagram of the three static publishing steps where clicking each step highlights that box and shows what it does.
|
|
61
54
|
```
|
|
62
55
|
````
|
|
63
56
|
|
|
64
|
-
|
|
65
|
-
- **Skip when**: A static image or a `mermaid` diagram does not need interactive region highlighting.
|
|
57
|
+
## Fields
|
|
66
58
|
|
|
67
|
-
|
|
68
|
-
| :--- | :--- | :--- | :--- |
|
|
69
|
-
| `svg` | Either this or `image` | multiline string | Inline `<svg>` markup; tag elements to highlight with `data-p="<id>"` |
|
|
70
|
-
| `image` | Either this or `svg` | path string | Image path (or `{ src, alt }`) |
|
|
71
|
-
| `parts` | No | `{ id, label, text }[]` | Buttons shown above the diagram and the matching explanation below |
|
|
72
|
-
| `caption` | No | string | Caption below the frame |
|
|
59
|
+
Every field, default, limit and error code is in [Component reference · figure](/garden/en/reference/figure).
|
|
@@ -7,28 +7,23 @@ order: 39
|
|
|
7
7
|
badge: file
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "use `file` to attach a pre-publish checklist that readers can preview inline or download" inside a `garden` idea block, and the Agent generates the `garden file` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden file
|
|
13
11
|
src: ./file/checklist.md
|
|
14
12
|
title: Pre-publish Checklist
|
|
15
13
|
note: Sample Markdown attachment; click Preview to read inline or Download to save the file
|
|
16
14
|
```
|
|
17
15
|
|
|
16
|
+
- **When to use**: Attaching config files, datasets, PDFs, archives, or Markdown documents for readers to download or preview inline.
|
|
17
|
+
- **When to skip**: Referencing an external web page (use [`card`](/garden/en/components/card)) or showing a regular illustration in the middle of an article (use standard Markdown image syntax `![]()`).
|
|
18
|
+
|
|
19
|
+
You can tell the AI:
|
|
20
|
+
|
|
18
21
|
````markdown
|
|
19
|
-
```garden
|
|
20
|
-
|
|
21
|
-
title: Pre-publish Checklist
|
|
22
|
-
note: Sample Markdown attachment; click Preview to read inline or Download to save the file
|
|
22
|
+
```garden
|
|
23
|
+
Attach checklist.md here so readers can preview it inline or download it.
|
|
23
24
|
```
|
|
24
25
|
````
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
- **Skip when**: Showing a regular illustration in the middle of an article; use standard Markdown image syntax `![]()` instead.
|
|
27
|
+
## Fields
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
| :--- | :--- | :--- | :--- |
|
|
31
|
-
| `src` | Required for single file | path or URL | Relative path (must stay inside the content root), `/public` path, or `https://` URL |
|
|
32
|
-
| `title` | No | string | Display title (defaults to filename; serves as the group heading when using `files`) |
|
|
33
|
-
| `note` | No | string | Short note shown below the filename |
|
|
34
|
-
| `files` | Required for multi-file | `{ src, title?, note? }[]` | List of multiple attachments (mutually exclusive with top-level `src`) |
|
|
29
|
+
Every field, default, limit and error code is in [Component reference · file](/garden/en/reference/file).
|
|
@@ -7,11 +7,8 @@ order: 37
|
|
|
7
7
|
badge: html
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "use `html` to embed a small widget that counts characters as the reader types" inside a `garden` idea block, and the Agent generates the `garden html` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden html
|
|
13
11
|
title: Character Count Widget
|
|
14
|
-
height: 156
|
|
15
12
|
code: |
|
|
16
13
|
<!doctype html>
|
|
17
14
|
<html lang="en">
|
|
@@ -36,34 +33,17 @@ code: |
|
|
|
36
33
|
</html>
|
|
37
34
|
```
|
|
38
35
|
|
|
36
|
+
- **When to use**: Running custom DOM scripts, Canvas animations, physical simulations, or self-contained HTML widgets.
|
|
37
|
+
- **When to skip**: You only need sliders wired to a formula (use [`interactive`](/garden/en/components/interactive)) or a diagram with clickable regions (use [`figure`](/garden/en/components/figure)).
|
|
38
|
+
|
|
39
|
+
You can tell the AI:
|
|
40
|
+
|
|
39
41
|
````markdown
|
|
40
|
-
```garden
|
|
41
|
-
|
|
42
|
-
height: 156
|
|
43
|
-
code: |
|
|
44
|
-
<!doctype html>
|
|
45
|
-
<html lang="en">
|
|
46
|
-
<head><meta charset="utf-8" /></head>
|
|
47
|
-
<body>
|
|
48
|
-
<input id="txt" value="Keep your posts in a Git repository and push to deploy." />
|
|
49
|
-
<div>Characters: <strong id="count">55</strong></div>
|
|
50
|
-
<script>
|
|
51
|
-
const input = document.getElementById("txt");
|
|
52
|
-
const count = document.getElementById("count");
|
|
53
|
-
input.addEventListener("input", () => { count.textContent = String(input.value.length); });
|
|
54
|
-
</script>
|
|
55
|
-
</body>
|
|
56
|
-
</html>
|
|
42
|
+
```garden
|
|
43
|
+
Embed a small widget where typing in an input box updates the character count in real time.
|
|
57
44
|
```
|
|
58
45
|
````
|
|
59
46
|
|
|
60
|
-
|
|
61
|
-
- **Skip when**: You only need sliders wired to a formula (use [`interactive`](/garden/en/components/interactive)) or a diagram with clickable regions (use [`figure`](/garden/en/components/figure)).
|
|
47
|
+
## Fields
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
| :--- | :--- | :--- | :--- |
|
|
65
|
-
| `src` | Either this or `code` | relative path | Path to a `.html` file in the same directory or sibling asset directory |
|
|
66
|
-
| `code` | Either this or `src` | multiline string | Inline HTML markup (alias `html` is also accepted) |
|
|
67
|
-
| `title` | Recommended | string | Header bar title and accessible `iframe` title |
|
|
68
|
-
| `height` | No | number | Initial height in pixels (defaults to `260`; resizes to fit content after load) |
|
|
69
|
-
| `caption` | No | string | Caption shown below the frame |
|
|
49
|
+
Every field, default, limit and error code is in [Component reference · html](/garden/en/reference/html).
|
|
@@ -7,8 +7,6 @@ order: 38
|
|
|
7
7
|
badge: interactive
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "let readers drag word count, reading speed, and image count sliders to see how estimated reading time changes" inside a `garden` idea block, and the Agent generates the `garden interactive` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden interactive #reading-time
|
|
13
11
|
caption: "Example: estimate reading time from word count, reading speed, and image count. Numbers are illustrative only."
|
|
14
12
|
---
|
|
@@ -27,41 +25,17 @@ caption: "Example: estimate reading time from word count, reading speed, and ima
|
|
|
27
25
|
</Chart>
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
caption: "Example: estimate reading time from word count, reading speed, and image count. Numbers are illustrative only."
|
|
33
|
-
---
|
|
34
|
-
<State words={6000} speed={400} images={8} />
|
|
35
|
-
<Let textMinutes={round(words / speed)} />
|
|
36
|
-
<Let imageMinutes={round(images * 12 / 60)} />
|
|
37
|
-
<Let parts={[{ part: "Prose", minutes: textMinutes }, { part: "Images", minutes: imageMinutes }]} />
|
|
28
|
+
- **When to use**: Explaining a multi-variable formula, capacity estimate, or parameter tradeoff where dragging a slider reveals how the output responds.
|
|
29
|
+
- **When to skip**: A block has only `<Steps>` without any state or input control (fails with `steps-prose`), or every `<Let>` is a single multiplication like `a * b` (fails with `interactive-trivial`). Write plain prose in both cases.
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
<Slider bind="speed" label="Reading speed" min={200} max={800} step={50} unit="wpm" />
|
|
41
|
-
<Slider bind="images" label="Image count" min={0} max={30} step={1} unit="images" />
|
|
31
|
+
You can tell the AI:
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</Chart>
|
|
33
|
+
````markdown
|
|
34
|
+
```garden
|
|
35
|
+
Let readers drag word count, reading speed, and image count sliders to see how estimated reading time changes.
|
|
47
36
|
```
|
|
48
37
|
````
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
- **Skip when**: A block has only `<Steps>` without any state or input control (fails with `steps-prose`), or every `<Let>` is a single multiplication like `a * b` (fails with `interactive-trivial`). Write plain prose in both cases.
|
|
52
|
-
|
|
53
|
-
Metadata goes above `---`, and declarative tags go below it:
|
|
54
|
-
|
|
55
|
-
| Field or Tag | Required | Description |
|
|
56
|
-
| :--- | :--- | :--- |
|
|
57
|
-
| `#reading-time` | Recommended | Block identifier on the fence line (lowercase letters, digits, and hyphens) |
|
|
58
|
-
| `caption` | Yes | One sentence explaining what the reader can observe |
|
|
59
|
-
| `intent` | No | The original natural-language prompt this block was compiled from |
|
|
60
|
-
| `expect` | No | Array of `{ given: {...}, name: expectedValue }` assertions checked by `garden ui check` |
|
|
61
|
-
| `<State />` | Yes | Declares mutable state variables and their initial values, e.g. `<State words={6000} />` |
|
|
62
|
-
| `<Let />` | No | Computes derived values or data arrays from state |
|
|
63
|
-
| `<Slider />` / `<Choice />` / `<Toggle />` | Yes | Input controls bound to a state variable via `bind`; `Slider` requires `label`, `min`, and `max` |
|
|
64
|
-
| `<Stat />` | No | Displays a highlighted computed value; requires `label` and `value` |
|
|
65
|
-
| `<Chart />` | No | Plots a function curve with `sweep` or a bar/line chart with `data` and `<Bar>` / `<Line>` |
|
|
39
|
+
## Fields
|
|
66
40
|
|
|
67
|
-
|
|
41
|
+
Every field, default, limit and error code is in [Component reference · interactive](/garden/en/reference/interactive).
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Icon List (list)
|
|
3
|
+
navTitle: list
|
|
4
|
+
description: Pair line icons with short observations in a compact card, or add headings and multi-paragraph notes for divided steps.
|
|
5
|
+
section: components
|
|
6
|
+
order: 41
|
|
7
|
+
badge: list
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
```garden list
|
|
11
|
+
items:
|
|
12
|
+
- icon: search
|
|
13
|
+
text: Searches for this month's title
|
|
14
|
+
- icon: eye
|
|
15
|
+
text: Reads 3 reviews
|
|
16
|
+
- icon: heart
|
|
17
|
+
text: Saves the event page
|
|
18
|
+
- icon: chat
|
|
19
|
+
text: Asks in the group chat whether listening only is fine
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- **When to use**: Listing parallel actions, signals, or practices paired with an icon, or grouping titled steps with one or more paragraphs each.
|
|
23
|
+
- **When to skip**: Items follow a strict numbered sequence or chronological order; use a standard ordered list or [`timeline`](/garden/en/components/timeline) instead.
|
|
24
|
+
|
|
25
|
+
You can tell the AI:
|
|
26
|
+
|
|
27
|
+
````markdown
|
|
28
|
+
```garden
|
|
29
|
+
List the four things a newcomer usually does before signing up, each paired with a small icon.
|
|
30
|
+
```
|
|
31
|
+
````
|
|
32
|
+
|
|
33
|
+
## Divided Step List with Headings
|
|
34
|
+
|
|
35
|
+
When any item includes `title`, the component switches to a divided step list where `text` can hold multiple paragraphs:
|
|
36
|
+
|
|
37
|
+
```garden list
|
|
38
|
+
items:
|
|
39
|
+
- icon: flask
|
|
40
|
+
title: "Experiment 1: is one book a month too much?"
|
|
41
|
+
text:
|
|
42
|
+
- Pick a novella and a long novel for the first two meetings, and record how many people finish.
|
|
43
|
+
- If the share drops clearly, read only the first half next time.
|
|
44
|
+
- icon: chat
|
|
45
|
+
title: "Experiment 2: how do we get first-timers talking?"
|
|
46
|
+
text:
|
|
47
|
+
- Open half of the meetings with one sentence from each person, and the other half with free discussion.
|
|
48
|
+
- Compare how often first-timers speak.
|
|
49
|
+
- icon: bell
|
|
50
|
+
title: "Experiment 3: how early should the reminder go out?"
|
|
51
|
+
text:
|
|
52
|
+
- Send the reminder three days before one meeting and one day before another, and compare turnout.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
You can tell the AI:
|
|
56
|
+
|
|
57
|
+
````markdown
|
|
58
|
+
```garden
|
|
59
|
+
Organize these three small experiments into an icon list with a heading and two short notes per item.
|
|
60
|
+
```
|
|
61
|
+
````
|
|
62
|
+
|
|
63
|
+
## Fields
|
|
64
|
+
|
|
65
|
+
Every field, default, limit and error code is in [Component reference · list](/garden/en/reference/list).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Relationship diagram (relations)
|
|
3
|
+
navTitle: relations
|
|
4
|
+
description: Place 3 to 6 elements on an ellipse or around a center node and connect them with solid or dashed, one-way or two-way labeled links.
|
|
5
|
+
section: components
|
|
6
|
+
order: 40
|
|
7
|
+
badge: relations
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
```garden relations
|
|
11
|
+
items:
|
|
12
|
+
- title: Pick
|
|
13
|
+
text: Choose this month's book
|
|
14
|
+
- title: Read
|
|
15
|
+
text: Finish the agreed chapters each week
|
|
16
|
+
- title: Talk
|
|
17
|
+
text: Meet and share views
|
|
18
|
+
- title: Review
|
|
19
|
+
text: Note what to change next time
|
|
20
|
+
links:
|
|
21
|
+
- from: 1
|
|
22
|
+
to: 2
|
|
23
|
+
- from: 2
|
|
24
|
+
to: 3
|
|
25
|
+
- from: 3
|
|
26
|
+
to: 4
|
|
27
|
+
- from: 4
|
|
28
|
+
to: 1
|
|
29
|
+
- from: 3
|
|
30
|
+
to: 1
|
|
31
|
+
style: dashed
|
|
32
|
+
label: shapes the pick
|
|
33
|
+
- from: 2
|
|
34
|
+
to: 4
|
|
35
|
+
style: dashed
|
|
36
|
+
caption: The four steps feed each other instead of running once in a fixed order.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- **When to use**: Three to six key elements where the reader needs to see what influences what, which links run both ways, how steps form a repeating loop, or how one central element connects to the rest.
|
|
40
|
+
- **When to skip**: There are more elements, branches, or one-pass steps; use a `mermaid` flowchart for larger or branching diagrams, or [`list`](/garden/en/components/list) for one-pass steps.
|
|
41
|
+
|
|
42
|
+
You can tell the AI:
|
|
43
|
+
|
|
44
|
+
````markdown
|
|
45
|
+
```garden
|
|
46
|
+
Draw how picking, reading, talking, and reviewing feed into each other as a loop, and show that talking also shapes the next pick.
|
|
47
|
+
```
|
|
48
|
+
````
|
|
49
|
+
|
|
50
|
+
## Center Node & Outer Ring (`center`)
|
|
51
|
+
|
|
52
|
+
When one element sits in the middle and holds the others together, set `center: <number|title>` between `items` and `links` (there is no auto-detection; that element goes in the middle while the remaining elements are spaced evenly on the outer ring starting at the top, clockwise):
|
|
53
|
+
|
|
54
|
+
```garden relations
|
|
55
|
+
items:
|
|
56
|
+
- title: Organiser
|
|
57
|
+
text: Sends one notice a month
|
|
58
|
+
- title: Members
|
|
59
|
+
text: Eight to ten neighbours
|
|
60
|
+
- title: Venue
|
|
61
|
+
text: Café or library
|
|
62
|
+
- title: Reading list
|
|
63
|
+
text: Members take turns to nominate
|
|
64
|
+
center: Organiser
|
|
65
|
+
links:
|
|
66
|
+
- from: 1
|
|
67
|
+
to: 2
|
|
68
|
+
label: invites
|
|
69
|
+
- from: 1
|
|
70
|
+
to: 3
|
|
71
|
+
label: books
|
|
72
|
+
- from: 1
|
|
73
|
+
to: 4
|
|
74
|
+
label: collects
|
|
75
|
+
- from: 2
|
|
76
|
+
to: 4
|
|
77
|
+
style: dashed
|
|
78
|
+
direction: both
|
|
79
|
+
label: nominate
|
|
80
|
+
caption: The organiser sits in the center and links to the other three; members and the list shape each other.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
You can tell the AI:
|
|
84
|
+
|
|
85
|
+
````markdown
|
|
86
|
+
```garden
|
|
87
|
+
Put the organiser in the center with members, venue, and reading list around them: the organiser invites members, books the venue, and collects the reading list, while members and the reading list nominate each other.
|
|
88
|
+
```
|
|
89
|
+
````
|
|
90
|
+
|
|
91
|
+
Elements sit evenly on an ellipse starting at the top (12 o'clock) then clockwise (or with `center` in the middle and the remaining elements spaced evenly on the outer ring starting at the top, clockwise); links between neighbouring outer-ring elements bow gently outward, while non-neighbour or center links go straight through the middle.
|
|
92
|
+
|
|
93
|
+
## Fields
|
|
94
|
+
|
|
95
|
+
Every field, default, limit and error code is in [Component reference · relations](/garden/en/reference/relations).
|
|
@@ -7,8 +7,6 @@ order: 32
|
|
|
7
7
|
badge: stat
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "use `stat` to list the width limits for the prose column, wide figures, and wide tables" inside a `garden` idea block, and the Agent generates the `garden stat` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden stat
|
|
13
11
|
items:
|
|
14
12
|
- label: Reading Column
|
|
@@ -25,33 +23,17 @@ items:
|
|
|
25
23
|
caption: Extends up to 300px on each side
|
|
26
24
|
```
|
|
27
25
|
|
|
26
|
+
- **When to use**: Pulling 2 to 4 core numbers, thresholds, or specs out of prose so readers can scan them side by side.
|
|
27
|
+
- **When to skip**: You only have one number (keep it in prose), the number changes with user input (use [`interactive`](/garden/en/components/interactive)), or you have multiple rows and columns (use a Markdown table).
|
|
28
|
+
|
|
29
|
+
You can tell the AI:
|
|
30
|
+
|
|
28
31
|
````markdown
|
|
29
|
-
```garden
|
|
30
|
-
|
|
31
|
-
- label: Reading Column
|
|
32
|
-
value: "740"
|
|
33
|
-
unit: px
|
|
34
|
-
caption: Default prose column width
|
|
35
|
-
- label: Wide Figure Limit
|
|
36
|
-
value: "1040"
|
|
37
|
-
unit: px
|
|
38
|
-
caption: Extends up to 150px on each side
|
|
39
|
-
- label: Wide Table Limit
|
|
40
|
-
value: "1340"
|
|
41
|
-
unit: px
|
|
42
|
-
caption: Extends up to 300px on each side
|
|
32
|
+
```garden
|
|
33
|
+
Put the three width limits for the reading column, wide figures, and wide tables side by side so they are easy to scan.
|
|
43
34
|
```
|
|
44
35
|
````
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
- **Skip when**: You only have one number (keep it in prose) or you have multiple rows and columns (use a Markdown table).
|
|
37
|
+
## Fields
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
| :--- | :--- | :--- | :--- |
|
|
51
|
-
| `items` | No | object[] | Array of stat items; for a single stat you can place the fields at the top level |
|
|
52
|
-
| `label` | Yes | string | Metric name shown above the number |
|
|
53
|
-
| `value` | Yes | string or number | Primary figure rendered in large tabular type |
|
|
54
|
-
| `unit` | No | string | Unit shown immediately to the right of `value` |
|
|
55
|
-
| `caption` | No | string | Short note below the figure |
|
|
56
|
-
| `text` | No | string | Additional explanatory text |
|
|
57
|
-
| `source` | No | string or `{ title, url }` | Source attribution badge |
|
|
39
|
+
Every field, default, limit and error code is in [Component reference · stat](/garden/en/reference/stat).
|
|
@@ -7,8 +7,6 @@ order: 34
|
|
|
7
7
|
badge: timeline
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
Write "use `timeline` to list the three stages of the static publishing pipeline in order" inside a `garden` idea block, and the Agent generates the `garden timeline` block below via the `garden-ui` skill (hand-written syntax follows).
|
|
11
|
-
|
|
12
10
|
```garden timeline
|
|
13
11
|
title: Static Publishing Pipeline Stages
|
|
14
12
|
items:
|
|
@@ -23,30 +21,17 @@ items:
|
|
|
23
21
|
text: Run `npm run pages:validate` to confirm `index.html` exists and no `.env`, source directories, `.map` or `.md` files, or symlinks were included, then publish to GitHub Pages.
|
|
24
22
|
```
|
|
25
23
|
|
|
24
|
+
- **When to use**: Walking through incident timestamps, evolution stages, or pipeline steps in chronological order.
|
|
25
|
+
- **When to skip**: Listing unordered points with no sequence; use a regular bullet list or [`list`](/garden/en/components/list) instead.
|
|
26
|
+
|
|
27
|
+
You can tell the AI:
|
|
28
|
+
|
|
26
29
|
````markdown
|
|
27
|
-
```garden
|
|
28
|
-
|
|
29
|
-
items:
|
|
30
|
-
- date: Step 1
|
|
31
|
-
title: Sync Content and Assets
|
|
32
|
-
text: Run `npx garden sync` to validate Front Matter, copy image attachments, and generate the search index and RSS feed.
|
|
33
|
-
- date: Step 2
|
|
34
|
-
title: Build Static Site Output
|
|
35
|
-
text: Run `STATIC_EXPORT=1 npx garden build` to prerender every route into `dist/client/`.
|
|
36
|
-
- date: Step 3
|
|
37
|
-
title: Validate Output and Deploy
|
|
38
|
-
text: Run `npm run pages:validate` to confirm `index.html` exists and no `.env`, source directories, `.map` or `.md` files, or symlinks were included, then publish to GitHub Pages.
|
|
30
|
+
```garden
|
|
31
|
+
List the three stages of static publishing in order as a timeline.
|
|
39
32
|
```
|
|
40
33
|
````
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
- **Skip when**: Listing unordered points with no sequence; use a regular bullet list instead.
|
|
35
|
+
## Fields
|
|
44
36
|
|
|
45
|
-
|
|
46
|
-
| :--- | :--- | :--- | :--- |
|
|
47
|
-
| `title` | No | string | Heading above the timeline |
|
|
48
|
-
| `items` | Yes | object[] (at least 2) | Ordered list of steps |
|
|
49
|
-
| `items[].date` | No | string | Timestamp, stage label, or step number above the item title |
|
|
50
|
-
| `items[].title` | Yes | string | Step heading |
|
|
51
|
-
| `items[].text` | No | string | Detailed explanation for the step |
|
|
52
|
-
| `items[].source` | No | string or `{ title, url }` | Source attribution badge |
|
|
37
|
+
Every field, default, limit and error code is in [Component reference · timeline](/garden/en/reference/timeline).
|