hd-garden 0.13.3 → 0.14.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.
Files changed (218) hide show
  1. package/.agents/skills/garden-compose/SKILL.md +24 -0
  2. package/.agents/skills/garden-compose/references/colors.md +11 -0
  3. package/.agents/skills/garden-compose/references/composition-patterns.md +162 -0
  4. package/.agents/skills/garden-compose/references/examples.md +55 -0
  5. package/.agents/skills/garden-compose/references/frames.md +7 -0
  6. package/.agents/skills/garden-compose/references/layout-recipes.md +84 -0
  7. package/.agents/skills/garden-compose/references/rendering-model.md +120 -0
  8. package/.agents/skills/garden-compose/references/static-play.md +19 -0
  9. package/.agents/skills/garden-compose/references/visual-selection.md +38 -0
  10. package/.agents/skills/garden-compose/references/workflow.md +27 -0
  11. package/.agents/skills/garden-compose/scripts/_cli.mjs +12 -0
  12. package/.agents/skills/garden-compose/scripts/apply.mjs +2 -0
  13. package/.agents/skills/garden-compose/scripts/check.mjs +2 -0
  14. package/.agents/skills/garden-compose/scripts/prompt.mjs +2 -0
  15. package/.agents/skills/garden-compose/scripts/scan.mjs +2 -0
  16. package/.agents/skills/garden-post-review/SKILL.md +5 -16
  17. package/Makefile +12 -3
  18. package/README.en.md +10 -5
  19. package/README.md +10 -5
  20. package/app/admin/preview/[...path]/page.tsx +4 -16
  21. package/app/api/admin/ui/blocks/route.ts +1 -1
  22. package/app/components/AdminUiPanels.tsx +6 -3
  23. package/app/components/GardenContentGuide.tsx +7 -8
  24. package/app/components/MarkdownArticle.tsx +2 -0
  25. package/app/components/UiStudio.tsx +29 -32
  26. package/app/components/garden/AuthorRich.tsx +5 -0
  27. package/app/components/garden/ComposePreview.tsx +9 -0
  28. package/app/components/garden/GardenBlock.tsx +12 -10
  29. package/app/components/garden/GardenFile.tsx +1 -1
  30. package/app/components/garden/blocks.tsx +9 -197
  31. package/app/components/garden/file-icons.tsx +1 -1
  32. package/app/components/garden/patterns.tsx +7 -65
  33. package/app/lib/rehype-garden-blocks.mjs +30 -0
  34. package/app/lib/remark-garden.mjs +0 -4
  35. package/app/lib/ui-model.ts +8 -9
  36. package/app/styles/a2.css +17 -1
  37. package/bin/garden.mjs +34 -35
  38. package/docs/handbook/ai-writing.md +19 -22
  39. package/docs/handbook/components/compose.md +16 -7
  40. package/docs/handbook/components/image.md +1 -1
  41. package/docs/handbook/components/link-card.md +2 -2
  42. package/docs/handbook/components.md +5 -213
  43. package/docs/handbook/deploy.md +11 -0
  44. package/docs/handbook/en/ai-writing.md +17 -20
  45. package/docs/handbook/en/components/compose.md +15 -6
  46. package/docs/handbook/en/components/image.md +1 -1
  47. package/docs/handbook/en/components/link-card.md +2 -2
  48. package/docs/handbook/en/components.md +7 -215
  49. package/docs/handbook/en/deploy.md +11 -0
  50. package/docs/handbook/en/index.md +29 -53
  51. package/docs/handbook/en/reference/compose.md +77 -148
  52. package/docs/handbook/en/reference.md +6 -22
  53. package/docs/handbook/en/start.md +1 -1
  54. package/docs/handbook/en/workflow.md +21 -17
  55. package/docs/handbook/en/writing.md +3 -3
  56. package/docs/handbook/index.md +26 -47
  57. package/docs/handbook/reference/compose.md +79 -148
  58. package/docs/handbook/reference.md +6 -22
  59. package/docs/handbook/start.md +1 -1
  60. package/docs/handbook/workflow.md +21 -17
  61. package/docs/handbook/writing.md +3 -3
  62. package/editors/dist/typora/main.js +324 -330
  63. package/editors/dist/typora/style.css +4299 -11
  64. package/editors/dist/vscode/garden-ui-0.14.2.vsix +0 -0
  65. package/eslint.config.mjs +3 -0
  66. package/package.json +5 -3
  67. package/public/images/compose-resources/resource-015b41eb0f32.svg +1 -0
  68. package/public/images/compose-resources/resource-ecee6b47f015.svg +1 -0
  69. package/public/images/compose-resources/resource-fd51121b5e8c.svg +1 -0
  70. package/scripts/build-content.mjs +40 -131
  71. package/scripts/build-ui-preview.mjs +7 -5
  72. package/scripts/check-post.mjs +10 -106
  73. package/scripts/check-site.mjs +80 -0
  74. package/scripts/compose-style-reference.mjs +22 -0
  75. package/scripts/editor-preview-css.mjs +14 -0
  76. package/scripts/file-preview.mjs +1 -1
  77. package/scripts/file-sizes.mjs +7 -7
  78. package/scripts/generated-cache.mjs +36 -0
  79. package/scripts/handbook-facts.mjs +10 -3
  80. package/scripts/image-sizes.mjs +6 -12
  81. package/scripts/link-assets.mjs +35 -10
  82. package/scripts/managed-skills.mjs +56 -0
  83. package/scripts/pack-editors.mjs +12 -1
  84. package/scripts/prepare-pages-output.mjs +1 -1
  85. package/scripts/site-guide.mjs +19 -0
  86. package/scripts/sync-editor-version.mjs +28 -0
  87. package/scripts/ui-cli.mjs +26 -33
  88. package/templates/garden-blocks.md +4 -180
  89. package/templates/garden-snippets.plist +2 -183
  90. package/templates/site/AGENTS.en.md +89 -0
  91. package/templates/site/AGENTS.md +72 -0
  92. package/templates/site/Makefile +12 -3
  93. package/templates/site/Makefile.en +12 -3
  94. package/templates/site/README.en.md +6 -1
  95. package/templates/site/README.md +6 -1
  96. package/templates/skills-en/garden-compose/SKILL.md +24 -0
  97. package/templates/skills-en/garden-post-review/SKILL.md +5 -16
  98. package/templates/workflows/pages.en.yml +11 -0
  99. package/templates/workflows/pages.yml +11 -0
  100. package/ui/compose/compose.css +54 -14
  101. package/ui/compose/contracts.mjs +16 -0
  102. package/ui/compose/dil.mjs +109 -48
  103. package/ui/compose/distribution.mjs +7 -0
  104. package/ui/compose/features.mjs +90 -0
  105. package/ui/compose/icons.mjs +8 -0
  106. package/ui/compose/index.mjs +2 -0
  107. package/ui/compose/inspect.mjs +11 -0
  108. package/ui/compose/markup.mjs +80 -23
  109. package/ui/compose/preview.mjs +13 -0
  110. package/ui/compose/prompt-catalog.mjs +15 -3
  111. package/ui/compose/render.mjs +46 -11
  112. package/ui/compose/scenes.mjs +10 -0
  113. package/ui/core/apply.mjs +12 -45
  114. package/ui/core/catalog.mjs +22 -32
  115. package/ui/core/cli-locale.mjs +8 -18
  116. package/ui/core/color.mjs +34 -0
  117. package/ui/core/compile.mjs +1 -8
  118. package/ui/core/demos.mjs +138 -108
  119. package/ui/core/fence.mjs +14 -70
  120. package/ui/core/fix-prompt.mjs +1 -3
  121. package/ui/core/garden-fence.mjs +3 -63
  122. package/ui/core/index.mjs +3 -5
  123. package/ui/core/parse.mjs +22 -8
  124. package/ui/core/scan.mjs +31 -43
  125. package/ui/core/starters.mjs +3 -3
  126. package/ui/core/static.mjs +36 -6
  127. package/ui/core/transform.mjs +64 -149
  128. package/ui/core/validate.mjs +20 -9
  129. package/ui/garden/article-content.mjs +98 -0
  130. package/ui/garden/catalog.mjs +21 -427
  131. package/ui/garden/check.mjs +18 -60
  132. package/ui/garden/file-block.mjs +1 -1
  133. package/ui/garden/file-paths.mjs +8 -6
  134. package/ui/garden/parse.mjs +19 -182
  135. package/ui/garden/relations.mjs +1 -1
  136. package/ui/garden/snippets.mjs +12 -153
  137. package/ui/garden/source-icon.mjs +17 -9
  138. package/ui/garden/word-count.mjs +16 -85
  139. package/ui/index.mjs +1 -5
  140. package/ui/preview/dist/garden-ui.css +4300 -11
  141. package/ui/preview/dist/garden-ui.esm.js +446 -418
  142. package/ui/preview/dist/garden-ui.iife.js +446 -418
  143. package/ui/preview/index.tsx +31 -98
  144. package/ui/preview/site-config.ts +4 -0
  145. package/ui/prompt/build.mjs +1 -4
  146. package/ui/prompt/recipes/code-walkthrough.md +17 -12
  147. package/ui/prompt/recipes/compare.md +14 -10
  148. package/ui/prompt/recipes/compose.md +3 -3
  149. package/ui/prompt/recipes/converter.md +17 -14
  150. package/ui/prompt/recipes/data-chart.md +9 -8
  151. package/ui/prompt/recipes/inspect-grid.md +9 -8
  152. package/ui/prompt/recipes/param-bench.md +17 -12
  153. package/ui/prompt/recipes/plan.md +4 -3
  154. package/ui/prompt/recipes/stepper.md +18 -16
  155. package/ui/prompt/recipes/trace.md +20 -18
  156. package/ui/prompt/rules.md +26 -133
  157. package/ui/prompt/studio.md +3 -18
  158. package/ui/react/CatalogPage.tsx +19 -21
  159. package/ui/react/recipes.ts +3 -3
  160. package/ui/react/runtime.tsx +23 -2
  161. package/ui/react/ui.css +17 -11
  162. package/vite.config.ts +16 -3
  163. package/.agents/skills/garden-interactive-chart/SKILL.md +0 -84
  164. package/.agents/skills/garden-interactive-chart/references/shell.html +0 -49
  165. package/.agents/skills/garden-interactive-chart/references/style.md +0 -61
  166. package/.agents/skills/garden-ui/SKILL.md +0 -125
  167. package/app/components/UiBlock.tsx +0 -23
  168. package/app/components/WidgetChart.tsx +0 -224
  169. package/app/lib/generated-content.ts +0 -385
  170. package/docs/handbook/components/card.md +0 -67
  171. package/docs/handbook/components/chart.md +0 -38
  172. package/docs/handbook/components/choice.md +0 -42
  173. package/docs/handbook/components/compare.md +0 -53
  174. package/docs/handbook/components/file.md +0 -29
  175. package/docs/handbook/components/html.md +0 -49
  176. package/docs/handbook/components/interactive.md +0 -48
  177. package/docs/handbook/components/list.md +0 -65
  178. package/docs/handbook/components/relations.md +0 -95
  179. package/docs/handbook/components/stat.md +0 -39
  180. package/docs/handbook/components/timeline.md +0 -37
  181. package/docs/handbook/en/components/card.md +0 -67
  182. package/docs/handbook/en/components/chart.md +0 -38
  183. package/docs/handbook/en/components/choice.md +0 -42
  184. package/docs/handbook/en/components/compare.md +0 -53
  185. package/docs/handbook/en/components/file.md +0 -29
  186. package/docs/handbook/en/components/html.md +0 -49
  187. package/docs/handbook/en/components/interactive.md +0 -44
  188. package/docs/handbook/en/components/list.md +0 -65
  189. package/docs/handbook/en/components/relations.md +0 -95
  190. package/docs/handbook/en/components/stat.md +0 -39
  191. package/docs/handbook/en/components/timeline.md +0 -37
  192. package/docs/handbook/en/reference/card.md +0 -85
  193. package/docs/handbook/en/reference/chart.md +0 -68
  194. package/docs/handbook/en/reference/choice.md +0 -69
  195. package/docs/handbook/en/reference/compare.md +0 -59
  196. package/docs/handbook/en/reference/file.md +0 -50
  197. package/docs/handbook/en/reference/html.md +0 -62
  198. package/docs/handbook/en/reference/interactive.md +0 -71
  199. package/docs/handbook/en/reference/list.md +0 -72
  200. package/docs/handbook/en/reference/relations.md +0 -113
  201. package/docs/handbook/en/reference/stat.md +0 -60
  202. package/docs/handbook/en/reference/timeline.md +0 -56
  203. package/docs/handbook/reference/card.md +0 -85
  204. package/docs/handbook/reference/chart.md +0 -68
  205. package/docs/handbook/reference/choice.md +0 -69
  206. package/docs/handbook/reference/compare.md +0 -59
  207. package/docs/handbook/reference/file.md +0 -50
  208. package/docs/handbook/reference/html.md +0 -62
  209. package/docs/handbook/reference/interactive.md +0 -71
  210. package/docs/handbook/reference/list.md +0 -72
  211. package/docs/handbook/reference/relations.md +0 -113
  212. package/docs/handbook/reference/stat.md +0 -60
  213. package/docs/handbook/reference/timeline.md +0 -56
  214. package/editors/dist/vscode/garden-ui-0.1.1.vsix +0 -0
  215. package/templates/skills-en/garden-interactive-chart/SKILL.md +0 -84
  216. package/templates/skills-en/garden-interactive-chart/references/shell.html +0 -49
  217. package/templates/skills-en/garden-interactive-chart/references/style.md +0 -61
  218. package/templates/skills-en/garden-ui/SKILL.md +0 -125
@@ -1,49 +0,0 @@
1
- ---
2
- title: Embedded Web Snippet (html)
3
- navTitle: html
4
- description: Run a self-contained HTML, CSS, and JavaScript demo inside a sandboxed iframe.
5
- section: components
6
- order: 37
7
- badge: html
8
- ---
9
-
10
- ```garden html
11
- title: Character Count Widget
12
- code: |
13
- <!doctype html>
14
- <html lang="en">
15
- <head>
16
- <meta charset="utf-8" />
17
- <style>
18
- body { margin: 0; padding: 16px 18px; font: 14px/1.6 system-ui, sans-serif; color: #1b1a18; background: #faf9f5; }
19
- input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d5d1c8; border-radius: 6px; font: inherit; background: #fff; color: #1b1a18; }
20
- .meta { margin-top: 10px; color: #6e6b64; font-variant-numeric: tabular-nums; }
21
- strong { color: #1b1a18; }
22
- </style>
23
- </head>
24
- <body>
25
- <input id="txt" value="Keep your posts in a Git repository and push to deploy." aria-label="Sample text input" />
26
- <div class="meta">Characters: <strong id="count">55</strong></div>
27
- <script>
28
- const input = document.getElementById("txt");
29
- const count = document.getElementById("count");
30
- input.addEventListener("input", () => { count.textContent = String(input.value.length); });
31
- </script>
32
- </body>
33
- </html>
34
- ```
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 of cards and notes (use [`compose`](/garden/en/components/compose)).
38
-
39
- You can tell the AI:
40
-
41
- ````markdown
42
- ```garden
43
- Embed a small widget where typing in an input box updates the character count in real time.
44
- ```
45
- ````
46
-
47
- ## Fields
48
-
49
- Every field, default, limit and error code is in [Component reference · html](/garden/en/reference/html).
@@ -1,44 +0,0 @@
1
- ---
2
- title: Interactive Formula & Parameters (interactive)
3
- navTitle: interactive
4
- description: Let readers drag sliders or switches to recalculate formulas and charts in real time.
5
- section: components
6
- order: 38
7
- badge: interactive
8
- ---
9
-
10
- > **Deprecated.** New posts should use [`compose`](/garden/en/components/compose) with ChatGPT-shaped DIL (`{@body}`, `{expr}`, `{#if}` / `{#each}`, lowercase tags). Old `garden interactive` fences still parse as compose play for compatibility and will be removed like `figure`.
11
-
12
-
13
- ```garden compose #reading-time
14
- caption: "Example: estimate reading time from word count, reading speed, and image count. Numbers are illustrative only."
15
- ---
16
- <State words={6000} speed={400} images={8} />
17
- <Let textMinutes={round(words / speed)} />
18
- <Let imageMinutes={round(images * 12 / 60)} />
19
- <Let parts={[{ part: "Prose", minutes: textMinutes }, { part: "Images", minutes: imageMinutes }]} />
20
-
21
- <Slider bind="words" label="Word count" min={1000} max={20000} step={500} unit="words" />
22
- <Slider bind="speed" label="Reading speed" min={200} max={800} step={50} unit="wpm" />
23
- <Slider bind="images" label="Image count" min={0} max={30} step={1} unit="images" />
24
-
25
- <Stat label="Example: estimated reading time" value={textMinutes + imageMinutes} unit="min" hint="Counting 12 seconds per image" />
26
- <Chart data={parts} x={part} yLabel="min">
27
- <Bar y={minutes} label="Example" />
28
- </Chart>
29
- ```
30
-
31
- - **When to use**: Explaining a multi-variable formula, capacity estimate, or parameter tradeoff where dragging a slider reveals how the output responds.
32
- - **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.
33
-
34
- You can tell the AI:
35
-
36
- ````markdown
37
- ```garden
38
- Let readers drag word count, reading speed, and image count sliders to see how estimated reading time changes.
39
- ```
40
- ````
41
-
42
- ## Fields
43
-
44
- Every field, default, limit and error code is in [Component reference · interactive](/garden/en/reference/interactive).
@@ -1,65 +0,0 @@
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).
@@ -1,95 +0,0 @@
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).
@@ -1,39 +0,0 @@
1
- ---
2
- title: Key Figures (stat)
3
- navTitle: stat
4
- description: Display 2 to 4 key numbers, units, and short captions side by side.
5
- section: components
6
- order: 32
7
- badge: stat
8
- ---
9
-
10
- ```garden stat
11
- items:
12
- - label: Reading Column
13
- value: "740"
14
- unit: px
15
- caption: Default prose column width
16
- - label: Wide Figure Limit
17
- value: "1040"
18
- unit: px
19
- caption: Extends up to 150px on each side
20
- - label: Wide Table Limit
21
- value: "1340"
22
- unit: px
23
- caption: Extends up to 300px on each side
24
- ```
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
-
31
- ````markdown
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.
34
- ```
35
- ````
36
-
37
- ## Fields
38
-
39
- Every field, default, limit and error code is in [Component reference · stat](/garden/en/reference/stat).
@@ -1,37 +0,0 @@
1
- ---
2
- title: Step Timeline (timeline)
3
- navTitle: timeline
4
- description: Order release milestones, incident steps, or build stages along a vertical sequence.
5
- section: components
6
- order: 34
7
- badge: timeline
8
- ---
9
-
10
- ```garden timeline
11
- title: Static Publishing Pipeline Stages
12
- items:
13
- - date: Step 1
14
- title: Sync Content and Assets
15
- text: Run `npx garden sync` to validate Front Matter, copy image attachments, and generate the search index and RSS feed.
16
- - date: Step 2
17
- title: Build Static Site Output
18
- text: Run `STATIC_EXPORT=1 npx garden build` to prerender every route into `dist/client/`.
19
- - date: Step 3
20
- title: Validate Output and Deploy
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.
22
- ```
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
-
29
- ````markdown
30
- ```garden
31
- List the three stages of static publishing in order as a timeline.
32
- ```
33
- ````
34
-
35
- ## Fields
36
-
37
- Every field, default, limit and error code is in [Component reference · timeline](/garden/en/reference/timeline).
@@ -1,85 +0,0 @@
1
- ---
2
- title: Component reference · card
3
- navTitle: card
4
- description: Summarize a paper, repository, or module in a card with metadata and numbered takeaways.
5
- section: reference
6
- order: 1
7
- badge: card
8
- ---
9
-
10
- [← Component reference](/garden/en/reference) · [Usage: card](/garden/en/components/card)
11
-
12
- ## Examples
13
-
14
- ```garden card
15
- title: SQLite Write-Ahead Logging
16
- url: https://www.sqlite.org/wal.html
17
- meta: Documentation · sqlite.org
18
- description: Appends changes sequentially to a write-ahead log while readers continue reading the original database pages, reducing read-write contention.
19
- points:
20
- - Writes append to the end of the `-wal` file instead of overwriting database pages in place on commit.
21
- - Readers record the current end-of-log mark to see a consistent snapshot without blocking concurrent writers.
22
- - Background checkpoints copy log pages back into the main database file in batches once a threshold is reached.
23
- ```
24
-
25
- ```garden card
26
- cards:
27
- - url: https://openlibrary.org/
28
- title: "Open Library: one page per book"
29
- description: An open catalogue run by the Internet Archive, with editions and e-book loans.
30
- image: /images/garden/ref-card-book.svg
31
- alt: A closed book
32
- source:
33
- - https://openlibrary.org/
34
- takeaway: "**Worth borrowing:** link the book's page when you pick, so everyone reads the same edition."
35
- - url: https://www.gutenberg.org/
36
- title: "Project Gutenberg: public-domain e-books"
37
- description: E-books that have entered the public domain, free to download.
38
- image: /images/garden/ref-card-lamp.svg
39
- alt: A desk lamp
40
- source:
41
- - https://www.gutenberg.org/
42
- - https://en.wikipedia.org/wiki/Project_Gutenberg
43
- takeaway: "**Worth borrowing:** pick a public-domain book now and then, so people without a copy can join at once."
44
- ```
45
-
46
- ## Syntax
47
-
48
- ````markdown
49
- ```garden card
50
- title: # recommended, heading
51
- url: # optional, heading link
52
- meta: # optional, subtitle
53
- description: # summary (or text)
54
- points: # key points (or items)
55
- image: # optional, thumbnail
56
- alt: # optional, alt text
57
- source: # optional, source URL
58
- site: # optional, site name
59
- takeaway: # optional, takeaway
60
- cards: # multi-card mode, same keys
61
- - url: # card link
62
- ```
63
- ````
64
-
65
- ## Fields
66
-
67
- Fence header: ` ```garden card ` (snippet trigger `;gcard`). Place fields at the top level for a single card, or pass a `cards` array for multiple horizontal row cards; invalid YAML or unknown top-level keys report `garden-yaml` on the block.
68
-
69
- | Field | Required | Default | Allowed Values & Limits | Description |
70
- | :--- | :--- | :--- | :--- | :--- |
71
- | `title` | Recommended | `url` | string | Card heading; falls back to `url` if omitted |
72
- | `url` | Optional | `""` | full `https://` or `http://` URL | External link on the heading; renders `title` as plain text if omitted |
73
- | `meta` | Optional | none | string | Subtitle or metadata line below the heading |
74
- | `description` | One of `description`, `points`, or `cards` | `""` | string (alias `text`) | Summary paragraph supporting inline bold and code |
75
- | `points` | One of `points`, `description`, or `cards` | `[]` | string[] or `{ title, text? }[]` (alias `items`; `2` to `4` points recommended, not checked) | Numbered list of takeaways below the summary |
76
- | `image` | Optional | none | image path or Data URL | Card thumbnail |
77
- | `alt` | Optional | `title` | string | Thumbnail alt text |
78
- | `source` | Optional | none | URL, `{ url, site?, icon? }`, or array | Source chip appended to `description`; multiple sources collapse to the first domain plus `+N` (such as `gutenberg.org +1`). `icon` defaults to the build-time downloaded favicon, then the uppercase first letter of the registrable domain's main label (e.g. `en.wikipedia.org` uses `W`, `bbc.co.uk` uses `B`) |
79
- | `site` | Optional | hostname of `url` without `www.` | string | Display name for the source site |
80
- | `takeaway` | Optional | none | string | One-line takeaway separated by a top border at the bottom of the card (e.g. `"**Worth borrowing:** ..."`) |
81
- | `cards` | Required for multi-card mode | none | object[] | Stack of horizontal row cards, each supporting `url`, `title`, `description` (or `text`), `image`, `alt`, `meta`, `source`, and `takeaway` |
82
-
83
- ## Limits & errors
84
-
85
- - Apart from the shared `garden-yaml`, this component has no error codes of its own; values marked "not checked" in the table never report an error.
@@ -1,68 +0,0 @@
1
- ---
2
- title: Component reference · chart
3
- navTitle: chart
4
- description: Render proportional horizontal bars with a built-in expandable data table underneath.
5
- section: reference
6
- order: 5
7
- badge: chart
8
- ---
9
-
10
- [← Component reference](/garden/en/reference) · [Usage: chart](/garden/en/components/chart)
11
-
12
- ## Examples
13
-
14
- ```garden chart
15
- title: Max Width by Layout Zone
16
- xLabel: Layout Zone
17
- yLabel: Max Width
18
- unit: px
19
- data:
20
- - x: Prose Column
21
- y: 740
22
- - x: Wide Figure Zone
23
- y: 1040
24
- - x: Wide Table Zone
25
- y: 1340
26
- caption: Click "View data table" below to expand the full numeric table.
27
- ```
28
-
29
- ## Syntax
30
-
31
- ````markdown
32
- ```garden chart
33
- type: # optional, bar only
34
- title: # recommended, heading
35
- data: # either this or series
36
- - x: # name
37
- y: # value
38
- label: # optional, value label
39
- x: # labels for series
40
- series: # either this or data
41
- - name: # optional, name
42
- data: # numbers
43
- unit: # optional, unit
44
- xLabel: # optional, 1st column
45
- yLabel: # optional, 2nd column
46
- caption: # optional, caption
47
- ```
48
- ````
49
-
50
- ## Fields
51
-
52
- Fence header: ` ```garden chart ` (snippet trigger `;gchart`). Provide rows via `data: [{ x, y, label? }]` or column arrays via `x` + `series`; invalid YAML or unknown top-level keys report `garden-yaml` on the block.
53
-
54
- | Field | Required | Default | Allowed Values & Limits | Description |
55
- | :--- | :--- | :--- | :--- | :--- |
56
- | `title` | Recommended | `"Chart"` for `aria-label` (no visible heading) | string | Heading above the chart |
57
- | `data` | Either `data` or `series` | `[]` | `{ x, y, label? }[]` (at least `2` rows and `2` to `8` rows recommended, not checked) | Row entries where `x` is the row label, `y` is the numeric value, and `label` defaults to `y` + `unit` |
58
- | `series` | Either `series` or `data` | none | `{ name?, data: number[] }[]` (at least `2` data points recommended, not checked) | Numeric series paired with an `x` label array (`series[0].data` is rendered) |
59
- | `x` | Optional | `["1", "2", ...]` (1-based row numbers) | string or string[] | Category labels when using `series`, or first-column header string when `xLabel` is omitted |
60
- | `type` | Optional | `"bar"` | `"bar"` | Chart type (horizontal bar chart) |
61
- | `unit` | Optional | `""` | string | Unit suffix appended to values when `data[].label` is omitted |
62
- | `xLabel` | Optional | string `x` or `"Item"` | string | Header for the first column of the expandable data table |
63
- | `yLabel` | Optional | `"Value"` | string | Header for the second column of the expandable data table |
64
- | `caption` | Optional | none | string | Caption below the chart |
65
-
66
- ## Limits & errors
67
-
68
- - Apart from the shared `garden-yaml`, this component has no error codes of its own; values marked "not checked" in the table never report an error.
@@ -1,69 +0,0 @@
1
- ---
2
- title: Component reference · choice
3
- navTitle: choice
4
- description: Present two or three option cards with an icon, headline value, and preference label, plus an optional fallback button and selection reply.
5
- section: reference
6
- order: 12
7
- badge: choice
8
- ---
9
-
10
- [← Component reference](/garden/en/reference) · [Usage: choice](/garden/en/components/choice)
11
-
12
- ## Examples
13
-
14
- ```garden choice
15
- title: Where should we meet next month?
16
- items:
17
- - icon: idea
18
- value: $6 each
19
- text: Corner café, one drink included
20
- label: Prefer the atmosphere
21
- reply: Café it is. We will book the long table by the window.
22
- - icon: book
23
- value: Free
24
- text: Library meeting room, booking needed
25
- label: Prefer the quiet
26
- reply: Library it is. We will book the room at the start of the month.
27
- none:
28
- label: Neither / not sure
29
- reply: No problem. We will share a few more venues in the group chat.
30
- caption: Illustrative only. Venues and prices are made up.
31
- ```
32
-
33
- ## Syntax
34
-
35
- ````markdown
36
- ```garden choice
37
- title: # optional, question
38
- items: # required, 2–3 suggested
39
- - icon: # optional, one of 23 icons
40
- value: # recommended, big value
41
- text: # recommended, short note
42
- label: # optional, preference tag
43
- reply: # optional, reply
44
- none: # optional, fallback button
45
- label: # button text
46
- reply: # optional, reply
47
- caption: # optional, caption
48
- ```
49
- ````
50
-
51
- ## Fields
52
-
53
- Fence header: ` ```garden choice ` (snippet trigger `;gchoice`). Renders as an accessible `role="radiogroup"` with arrow-key navigation; cards sit side by side on desktop and stack vertically in a single column on narrow screens. Invalid YAML or unknown top-level keys report `garden-yaml` on the block.
54
-
55
- | Field | Required | Default | Allowed Values & Limits | Description |
56
- | :--- | :--- | :--- | :--- | :--- |
57
- | `title` | Optional | `""` | string | Question or heading above the option cards |
58
- | `items` | Required | `[]` | object[] (`2` to `3` items recommended, not checked) | Option cards |
59
- | `items[].icon` | Optional | none (draws no icon) | one of the 23 built-in icon names | Line icon at the top of the card (shares the same 23 icon names as `garden list`) |
60
- | `items[].value` | Recommended | none | string or number | Prominent price, figure, or short headline on the card |
61
- | `items[].text` | Recommended | none | string | One-sentence description of the option |
62
- | `items[].label` | Optional | none | string | Preference tag with a dot indicator at the bottom of the card |
63
- | `items[].reply` | Optional | `""` | string | Response shown below the group when this card is selected |
64
- | `none` | Optional | none | `{ label: string, reply?: string }` | Full-width single-line fallback button underneath the cards (such as `"Neither / not sure"`) and its selection reply |
65
- | `caption` | Optional | none | string | Caption below the component |
66
-
67
- ## Limits & errors
68
-
69
- - Apart from the shared `garden-yaml`, this component has no error codes of its own; values marked "not checked" in the table never report an error.
@@ -1,59 +0,0 @@
1
- ---
2
- title: Component reference · compare
3
- navTitle: compare
4
- description: Place two or three options side by side to contrast tradeoffs, or stack good and bad practices.
5
- section: reference
6
- order: 3
7
- badge: compare
8
- ---
9
-
10
- [← Component reference](/garden/en/reference) · [Usage: compare](/garden/en/components/compare)
11
-
12
- ## Examples
13
-
14
- ```garden compare
15
- items:
16
- - title: Describe the change in one sentence
17
- text: Idea block under full code; garden-ui writes the diff.
18
- - title: Write the diff by hand
19
- text: Place a diff below full code; alone it raises diff-orphan.
20
- ```
21
-
22
- ```garden compare
23
- items:
24
- - title: A poor question
25
- verdict: bad
26
- text: "“Have you read this author's other books? Could you share a review?”"
27
- - title: A better question
28
- verdict: good
29
- text: "“When do you usually read? Would you like to sit in once first?”"
30
- ```
31
-
32
- ## Syntax
33
-
34
- ````markdown
35
- ```garden compare
36
- items: # required, 2–3 items
37
- - title: # option name
38
- text: # description
39
- verdict: # optional, good | bad
40
- <key>: # optional, as a tag
41
- ```
42
- ````
43
-
44
- ## Fields
45
-
46
- Fence header: ` ```garden compare ` (snippet trigger `;gcompare`). Invalid YAML or unknown top-level keys report `garden-yaml` on the block.
47
-
48
- | Field | Required | Default | Allowed Values & Limits | Description |
49
- | :--- | :--- | :--- | :--- | :--- |
50
- | `items` | Required | `[]` | array (at least `2` items and `2` to `3` in side-by-side mode recommended, not checked) | Options to compare; each entry can be an object or a single `"Title: description"` string |
51
- | `items[].title` | Recommended | `""` (text before `:` in single-line string form) | string | Item heading |
52
- | `items[].text` | Recommended | `[]` | string or string[]; in side-by-side mode, combined `text` and extra string fields per cell must be at most `60` characters (exceeding this reports `compare-long`) | Item description; in single-line `"Title: description"` form only the text after `:` counts toward the `60`-character limit |
53
- | `items[].verdict` | Optional | none (side-by-side layout) | `"good"` \| `"bad"` | Marks the item as a recommended practice (green check) or anti-pattern (red cross); when any item has `verdict`, items stack vertically and the `60`-character `compare-long` limit does not apply |
54
- | `items[].<customKey>` | Optional | none | string or number (in side-by-side mode, string values count toward the `60`-character cell limit and report `compare-long` if exceeded) | In side-by-side mode, extra key-value pairs render as attribute tags at the bottom of the card |
55
-
56
- ## Limits & errors
57
-
58
- - `compare-long`: in side-by-side mode, one cell's `text` plus its other string fields runs past 60 characters. Move that cell back into a list or paragraph.
59
- - When any item has `verdict: good | bad`, the group stacks vertically and the 60-character check is skipped.
@@ -1,50 +0,0 @@
1
- ---
2
- title: Component reference · file
3
- navTitle: file
4
- description: Attach one or more files with automatic format and size badges, download links, and inline preview.
5
- section: reference
6
- order: 9
7
- badge: file
8
- ---
9
-
10
- [← Component reference](/garden/en/reference) · [Usage: file](/garden/en/components/file)
11
-
12
- ## Examples
13
-
14
- ```garden file
15
- src: ./file/checklist.md
16
- title: Pre-publish Checklist
17
- note: Sample Markdown attachment; click Preview to read inline or Download to save the file
18
- ```
19
-
20
- ## Syntax
21
-
22
- ````markdown
23
- ```garden file
24
- src: # required for one file
25
- title: # optional, title
26
- note: # optional, short note
27
- files: # required for a group
28
- - src: # required, path
29
- title: # optional, file name
30
- note: # optional, note
31
- ```
32
- ````
33
-
34
- ## Fields
35
-
36
- Fence header: ` ```garden file ` (snippet trigger `;gfile`). Use top-level `src` for a single file, or `files` for multiple attachments; invalid YAML or unknown top-level keys report `garden-yaml` on the block.
37
-
38
- | Field | Required | Default | Allowed Values & Limits | Description |
39
- | :--- | :--- | :--- | :--- | :--- |
40
- | `src` | Required for single file | none | relative path, `/public` path, or `https://` URL; missing `src` or combining `src` with `files` reports `garden-file`, local paths outside `content/` report `file-outside`, missing local files report `missing-asset`, and a local file over `5 MB` reports a `file-large` warning | Attachment path |
41
- | `title` | Optional | decoded filename from `src` (single file) or `""` (multi-file) | string | Display title for a single file, or group heading when using `files` |
42
- | `note` | Optional | `""` | string (combining top-level `note` with `files` reports `garden-file`) | Short note shown below the filename in single-file mode |
43
- | `files` | Required for multi-file | none | `{ src, title?, note? }[]` (at least `1` item; empty array, non-array, combining with top-level `src`/`note`, item missing `src`, unknown item keys, or hand-writing `resolved` reports `garden-file`) | List of attachments, each requiring `src` with optional `title` (defaults to filename) and `note` (defaults to `""`) |
44
-
45
- ## Limits & errors
46
-
47
- - `garden-file`: neither `src` nor `files`; `files` empty or not a list; `files` together with a top-level `src` / `note`; an entry without `src` or with unknown keys; a hand-written `resolved`.
48
- - `file-outside`: a local path leaves the `content/` folder.
49
- - `missing-asset`: the local file does not exist.
50
- - `file-large` (warning): a single file is over 5 MB.